[update] 企标计划和企标临时权限设置联调
This commit is contained in:
@@ -210,7 +210,7 @@ export default {
|
||||
title: this.$t('enterpriseStandardLibrary.plan.revisionType'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'applicationCategory',
|
||||
dataIndex: 'applicationCategory_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
@@ -329,7 +329,7 @@ export default {
|
||||
title: this.$t('enterpriseStandardLibrary.plan.isAskForAdvice'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'solicitationOpinionEnabled',
|
||||
dataIndex: 'solicitationOpinionEnabled_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
@@ -364,14 +364,14 @@ export default {
|
||||
title: this.$t('enterpriseStandardLibrary.plan.projectStatus'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'projectStatus',
|
||||
dataIndex: 'projectStatus_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('enterpriseStandardLibrary.plan.changeState'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'changeStatus',
|
||||
dataIndex: 'changeStatus_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,85 +1,260 @@
|
||||
<template>
|
||||
<div class="detail-page">
|
||||
<div class="detail-page-title">{{ pageTitle }}{{ $t('enterpriseStandardLibrary.plan.detailTitle') }}</div>
|
||||
<div class="detail-page-part" v-for="(part, index) in partList" :key="part + index">
|
||||
<div class="detail-page-part">
|
||||
<div class="detail-page-part-title">
|
||||
<span>{{ part }}</span>
|
||||
<span>{{ $t('enterpriseStandardLibrary.plan.basicInformation') }}</span>
|
||||
</div>
|
||||
<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>
|
||||
<div class="detail-page-part-form">
|
||||
<!-- 原企标编号 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.oldEnterpriseStandardNum') }}</label>
|
||||
<span>{{ form.originEnStandardNo }}</span>
|
||||
</div>
|
||||
<!-- 新企标编号 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.newEnterpriseStandardNum') }}</label>
|
||||
<span>{{ form.newEnStandardNo }}</span>
|
||||
</div>
|
||||
<!-- 原企标名称 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.oldEnterpriseStandardName') }}</label>
|
||||
<span>{{ form.originEnStandardName }}</span>
|
||||
</div>
|
||||
<!-- 新企标名称 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.newEnterpriseStandardName') }}</label>
|
||||
<span>{{ form.newEnStandardName }}</span>
|
||||
</div>
|
||||
<!-- 企标英文名称 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.englishNameOfEnterpriseStandard') }}</label>
|
||||
<span>{{ form.enStandardEnglishName }}</span>
|
||||
</div>
|
||||
<!-- 企标等级分类 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.gradeClassification') }}</label>
|
||||
<span>{{ form.enStandardClassification }}</span>
|
||||
</div>
|
||||
<!-- 项目状态 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.projectStatus') }}</label>
|
||||
<span>{{ form.projectStatus_dictText }}</span>
|
||||
</div>
|
||||
<!-- 项目类型 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.projectType') }}</label>
|
||||
<span>{{ form.projectType }}</span>
|
||||
</div>
|
||||
<!-- 草稿计划完成日期 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.draftPlanFinishDate') }}</label>
|
||||
<span>{{ form.draftPlannedCompleteDate }}</span>
|
||||
</div>
|
||||
<!-- 征求意见稿计划完成日期 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.exposureDraftPlanFinishDate') }}</label>
|
||||
<span>{{ form.solicitationDraftPlanCompleteDate }}</span>
|
||||
</div>
|
||||
<!-- 计划报批日期 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.planSubmissionDate') }}</label>
|
||||
<span>{{ form.planApprovalDate }}</span>
|
||||
</div>
|
||||
<!-- 草稿完成日期 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.draftFinishDate') }}</label>
|
||||
<span>{{ form.draftCompletionDate }}</span>
|
||||
</div>
|
||||
<!-- 征求意见稿完成日期 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.exposureDraftFinishDate') }}</label>
|
||||
<span>{{ form.solicitationDraftCompletionDate }}</span>
|
||||
</div>
|
||||
<!-- 报批日期 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.submissionDate') }}</label>
|
||||
<span>{{ form.approvalDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-page-part">
|
||||
<div class="detail-page-part-title">
|
||||
<span>{{ $t('enterpriseStandardLibrary.plan.rangeOfApplication') }}</span>
|
||||
</div>
|
||||
<div class="detail-page-part-form">
|
||||
<!-- 主起草人 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.principalDrafter') }}</label>
|
||||
<span>{{ form.mainDraftingUser }}</span>
|
||||
</div>
|
||||
<!-- 主起草单位 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.mainDraftingUnit') }}</label>
|
||||
<span>{{ form.mainDraftingUnit }}</span>
|
||||
</div>
|
||||
<!-- 企标体系 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.enterpriseStandardSystem') }}</label>
|
||||
<span>{{ form.enStandardSystem }}</span>
|
||||
</div>
|
||||
<!-- 零部件名称 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.partName') }}</label>
|
||||
<span>{{ form.componentName }}</span>
|
||||
</div>
|
||||
<!-- 标准适用范围 -->
|
||||
<div class="detail-page-part-form-item">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.scopeOfApplication') }}</label>
|
||||
<span>{{ form.enStandardEnglishName }}</span>
|
||||
</div>
|
||||
<!-- 编制说明 -->
|
||||
<div class="detail-page-part-form-item-large-file">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.compilationIllustration') }}</label>
|
||||
<a @click="previewCompilation">{{ form.compilationFileName }}</a>
|
||||
</div>
|
||||
<!-- 立项背景、立项依据 -->
|
||||
<div class="detail-page-part-form-item-large">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.projectBackground') }}</label>
|
||||
<span>{{ form.projectBackground }}</span>
|
||||
</div>
|
||||
<!-- 国际、国家及行业同类标准分析 -->
|
||||
<div class="detail-page-part-form-item-large">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.similarNaStandardsAnalysis') }}</label>
|
||||
<span>{{ form.similarNaStandardsAnalysis }}</span>
|
||||
</div>
|
||||
<!-- 企业同类标准对比分析 -->
|
||||
<div class="detail-page-part-form-item-large">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.similarEnStandardsAnalysis') }}</label>
|
||||
<span>{{ form.similarEnStandardsAnalysis }}</span>
|
||||
</div>
|
||||
<!-- 立项标准的领先性与必要性 -->
|
||||
<div class="detail-page-part-form-item-large">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.standardLeadingNecessity') }}</label>
|
||||
<span>{{ form.standardLeadingNecessity }}</span>
|
||||
</div>
|
||||
<!-- 立项目的及预期效果等 -->
|
||||
<div class="detail-page-part-form-item-large">
|
||||
<label>{{ $t('enterpriseStandardLibrary.plan.projectExpectedEffects') }}</label>
|
||||
<span>{{ form.projectExpectedEffects }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="images">
|
||||
<div class="image" v-viewer="{movable: false}">
|
||||
<img v-show="image" :src="imageUrl">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@assets/less/common.less'
|
||||
import { getEnterpriseStandardPlanInfoById } from '@/api/enterpriseStandardLibraryApi'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { previewPdf } from '@/utils/previewPdf'
|
||||
import { getFileAccessHttpUrl } from '@/api/manage'
|
||||
|
||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||
const FILE_TYPE_PDF = 'pdf'
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
export default {
|
||||
name: 'PlanDetail',
|
||||
data () {
|
||||
return {
|
||||
partList: [], // 页面模块列表
|
||||
form: {}, // 页面字段
|
||||
detailData: {
|
||||
modification_list: [
|
||||
{
|
||||
id: 1,
|
||||
fileName: '国内文字占位符段落标题标准.pdf'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
fileName: '国内标准国内文字占位符段落标题标准.pdf'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
fileName: '国内标准国内标准.pdf'
|
||||
}
|
||||
],
|
||||
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'
|
||||
}]
|
||||
} // 页面数据
|
||||
image: false,
|
||||
imageUrl: null,
|
||||
form: {} // 页面字段
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.initForm()
|
||||
},
|
||||
methods: {
|
||||
// 获取详情数据
|
||||
initForm () {
|
||||
const params = {}
|
||||
params.id = this.$route.query.id
|
||||
params.module = '3'
|
||||
getEnterpriseStandardPlanInfoById(params).then(res => {
|
||||
if (res.success) {
|
||||
const data = res.result || {}
|
||||
this.partList = Object.keys(data)
|
||||
this.form = data
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 预览编制说明
|
||||
previewCompilation () {
|
||||
// 截取文件后缀名
|
||||
const fileSuffix = this.form.compilationFileName ? this.form.compilationFileName.split('.')[this.form.compilationFileName.split('.').length - 1] : ''
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${this.form.compilationDescription}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${this.form.compilationFileName}`
|
||||
// 图片预览,使用自己添加的组件
|
||||
if (FILE_TYPE_IMGS.includes(fileSuffix)) {
|
||||
this.imageUrl = getFileAccessHttpUrl(this.form.compilationDescription)
|
||||
// 获取viewer实例
|
||||
const viewer = this.$el.querySelector('.image').$viewer
|
||||
// 调用show方法进行显示预览图
|
||||
viewer.show()
|
||||
// this.$refs.imagePreviewModal.open(file)
|
||||
return
|
||||
}
|
||||
// pdf预览
|
||||
if (FILE_TYPE_PDF.includes(fileSuffix)) {
|
||||
const url = previewPdf(this.form.compilationDescription)
|
||||
window.open(url)
|
||||
return
|
||||
}
|
||||
// 其余可预览文件仍使用KKFile进行预览
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||
window.open(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="less">
|
||||
.detail-page-part-form-item-large {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin: 0 16px 16px 0;
|
||||
|
||||
label {
|
||||
width: 20%;
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
|
||||
font-weight: 400;
|
||||
color: #86909C;
|
||||
}
|
||||
|
||||
span {
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
|
||||
color: #1D2129;
|
||||
}
|
||||
}
|
||||
.detail-page-part-form-item-large-file {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin: 0 16px 16px 0;
|
||||
|
||||
label {
|
||||
width: 20%;
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
|
||||
font-weight: 400;
|
||||
color: #86909C;
|
||||
}
|
||||
|
||||
a {
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
font-size: 16px;
|
||||
font-family: PingFang SC-Regular, PingFang SC, sans-serif;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -20,14 +20,16 @@
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('enterpriseStandardLibrary.standard.authorizationUser')">
|
||||
<user-selection
|
||||
type="checkbox"
|
||||
v-decorator.trim="[ 'userIds', validatorRules.userIds]"
|
||||
:nameStr="model.userNames"
|
||||
:placeholder="$t('pleaseSelect') + $t('enterpriseStandardLibrary.standard.authorizationUser')"
|
||||
@nameChange="userSelectNameChange">
|
||||
</user-selection>
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('enterpriseStandardLibrary.standard.maturityDate')">
|
||||
<a-date-picker
|
||||
v-decorator.trim="[ 'maturityDate', validatorRules.maturityDate]"
|
||||
v-decorator.trim="[ 'authDate', validatorRules.authDate]"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
>
|
||||
@@ -47,7 +49,7 @@ export default {
|
||||
components: { UserSelection },
|
||||
data () {
|
||||
return {
|
||||
title: '',
|
||||
title: this.$t('enterpriseStandardLibrary.standard.temporaryPermissionSet'),
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
@@ -100,7 +102,7 @@ export default {
|
||||
if (!err) {
|
||||
this.confirmLoading = true
|
||||
const param = Object.assign({}, values)
|
||||
param.standards = this.model.standards
|
||||
param.standardNos = this.model.standards
|
||||
temporaryPermissionSet(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
|
||||
Reference in New Issue
Block a user