[update] 企标新增和详情页修改
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
<template>
|
||||
<div class="detail-page">
|
||||
<div class="detail-page-title">{{ pageTitle }}{{ $t('enterpriseStandardLibrary.standard.detailTitle') }}</div>
|
||||
<div class="detail-page-title">{{ $t('enterpriseStandardLibrary.standard.detailTitle') }}</div>
|
||||
<div class="detail-page-part" v-for="(part, index) in partList" :key="part + index">
|
||||
<div class="detail-page-part-title">
|
||||
<span>{{ part }}</span>
|
||||
<div class="detail-page-part-title-operate-box" v-if="index === 0">
|
||||
<!-- 企标评价-->
|
||||
<a-button type="icon-edit-1" @click="handleEvaluate">
|
||||
<i class="iconfont icon-root-list" />
|
||||
<a-button type="link" @click="handleEvaluate">
|
||||
<i class="iconfont icon-edit-1" />
|
||||
{{ $t('enterpriseStandardLibrary.standard.evaluate') }}
|
||||
</a-button>
|
||||
<!-- 收藏-->
|
||||
<!-- <i class="iconfont icon-star1" v-if="form[part].collect === '0'" />-->
|
||||
<!-- <i class="iconfont icon-star" v-else />-->
|
||||
<!-- 更新记录-->
|
||||
<a-button type="link" @click="handleOpenUpdateRecord">
|
||||
<i class="iconfont icon-root-list" />
|
||||
@@ -28,7 +25,9 @@
|
||||
<div class="detail-page-part-form" v-if="index !== 3">
|
||||
<div class="detail-page-part-form-item" v-for="formItem in form[part]" :key="formItem.id">
|
||||
<label>{{ formItem.dbFieldTxt }}</label>
|
||||
<span>{{ detailData[formItem.dbFieldName] }}</span>
|
||||
<span v-if="detailData[formItem.dbFieldName + '_dictText']">{{ detailData[formItem.dbFieldName + '_dictText'] }}</span>
|
||||
<span v-else-if="detailData[formItem.dbFieldName]">{{ detailData[formItem.dbFieldName] }}</span>
|
||||
<span v-else>—</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 过程稿件特殊处理-->
|
||||
@@ -53,68 +52,91 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 稽查内容 -->
|
||||
<div class="detail-page-part">
|
||||
<div class="detail-page-part-title">
|
||||
<span>稽查内容</span>
|
||||
</div>
|
||||
<div class=“detail-page-part-table>
|
||||
<a-table
|
||||
:scroll="{x: 500}"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
bordered
|
||||
rowKey="id">
|
||||
|
||||
<!-- 稽查内容特殊处理-->
|
||||
<div>
|
||||
<a-table></a-table>
|
||||
<template slot="text" slot-scope="text">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 企标评价 -->
|
||||
<enterprise-standard-evaluate-modal ref="enterpriseStandardEvaluateModal"></enterprise-standard-evaluate-modal>
|
||||
<!-- 更新记录弹框 -->
|
||||
<update-record-modal ref="updateRecordModal"></update-record-modal>
|
||||
<!-- 提交问题弹框 -->
|
||||
<submit-question-modal ref="submitQuestionModal"></submit-question-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@assets/less/common.less'
|
||||
import { getEnterpriseStandardInfoById } from '@/api/enterpriseStandardLibraryApi'
|
||||
import { getEnterpriseStandardInfoById, getEnterpriseStandardAddForm } from '@/api/enterpriseStandardLibraryApi'
|
||||
import UpdateRecordModal from '../../../standardRegulationLibrary/commonPage/modules/UpdateRecordModal'
|
||||
import SubmitQuestionModal from '../../../standardRegulationLibrary/commonPage/modules/SubmitQuestionModal'
|
||||
import EnterpriseStandardEvaluateModal from './module/EnterpriseStandardEvaluateModal'
|
||||
|
||||
export default {
|
||||
name: 'EnterpriseStandardDetail',
|
||||
components: { EnterpriseStandardEvaluateModal, SubmitQuestionModal, UpdateRecordModal },
|
||||
data () {
|
||||
return {
|
||||
partList: [], // 页面模块列表
|
||||
form: {}, // 页面字段
|
||||
detailData: {
|
||||
modification_list: [
|
||||
{
|
||||
id: 1,
|
||||
fileName: '国内文字占位符段落标题标准.pdf'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
fileName: '国内标准国内文字占位符段落标题标准.pdf'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
fileName: '国内标准国内标准.pdf'
|
||||
detailData: {}, // 页面数据
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
],
|
||||
draft_for_review: [{
|
||||
id: 11,
|
||||
fileName: '国内文字占位符段落标题标准.pdf'
|
||||
}],
|
||||
draft_for_approval: [{
|
||||
id: 21,
|
||||
fileName: '国内标准国内文字占位符段落标题标准.pdf'
|
||||
}],
|
||||
draft_for_comment: [{
|
||||
id: 31,
|
||||
fileName: '国内标准国内标准.pdf'
|
||||
}],
|
||||
draft: [{
|
||||
id: 311,
|
||||
fileName: '国内标准国内标准.pdf'
|
||||
}]
|
||||
} // 页面数据
|
||||
},
|
||||
{
|
||||
title: this.$t('enterpriseStandardLibrary.standard.subjectToClause'),
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'subjectToClause',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('enterpriseStandardLibrary.standard.standardContentOrRequirements'),
|
||||
align: 'center',
|
||||
dataIndex: 'standardContentOrRequirements',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
], // 稽查内容表格列参数
|
||||
dataSource: [] // 稽查内容数据
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.initForm()
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
initForm () {
|
||||
const params = {}
|
||||
params.id = this.$route.query.id
|
||||
params.module = '3'
|
||||
getEnterpriseStandardInfoById(params).then(res => {
|
||||
params.type = 1
|
||||
getEnterpriseStandardAddForm(params).then(res => {
|
||||
if (res.success) {
|
||||
const data = res.result || {}
|
||||
this.partList = Object.keys(data)
|
||||
@@ -123,11 +145,37 @@ export default {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
initData () {
|
||||
const params = {}
|
||||
params.id = this.$route.query.id
|
||||
params.type = 1
|
||||
getEnterpriseStandardInfoById(params).then(res => {
|
||||
if (res.success) {
|
||||
this.detailData = res.result
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 企标评价
|
||||
handleEvaluate () {
|
||||
this.$refs.enterpriseStandardEvaluateModal.open(this.detailData.id)
|
||||
},
|
||||
// 更新记录
|
||||
handleOpenUpdateRecord () {
|
||||
this.$refs.updateRecordModal.open(this.detailData.standardNumber)
|
||||
},
|
||||
// 提交问题
|
||||
submitQuestion () {
|
||||
this.$refs.submitQuestionModal.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
<style scoped lang="less">
|
||||
.detail-page-part-table {
|
||||
margin: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user