add 标准拆解单(部分)
This commit is contained in:
@@ -1,74 +1,88 @@
|
||||
<template>
|
||||
<div class="detail-page">
|
||||
<div class="detail-page-title">{{ pageTitle }}{{ $t('details') }}</div>
|
||||
<a-spin :spinning="loading">
|
||||
<div class="detail-page-title">{{ pageTitle }}{{ $t('details') }}</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="link" @click="handleOpenUpdateRecord">
|
||||
<i class="iconfont icon-root-list" />
|
||||
{{ $t('standardRegulationLibrary.updateRecord') }}
|
||||
</a-button>
|
||||
<!-- 提交问题-->
|
||||
<a-button type="link" @click="submitQuestion">
|
||||
<a-icon type="database" />
|
||||
{{ $t('standardRegulationLibrary.submitQuestion') }}
|
||||
</a-button>
|
||||
<!-- 分享-->
|
||||
<a-button type="link"><i class="iconfont icon-root-list" />{{ $t('share') }}</a-button>
|
||||
</div>
|
||||
</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>
|
||||
</div>
|
||||
<!-- 过程稿件特殊处理-->
|
||||
<div class="detail-page-process-manuscript" v-if="index === 3">
|
||||
<div class="detail-page-process-manuscript-item" v-for="formItem in form[part]" :key="formItem.id">
|
||||
<div class="detail-page-process-manuscript-title">
|
||||
<span>{{ formItem.dbFieldTxt }}</span>
|
||||
<a-button type="primary" ghost icon="file-text">{{ $t('standardRegulationLibrary.standardResolutionSheet') }}</a-button>
|
||||
<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="link" @click="handleOpenUpdateRecord">
|
||||
<i class="iconfont icon-root-list" />
|
||||
{{ $t('standardRegulationLibrary.updateRecord') }}
|
||||
</a-button>
|
||||
<!-- 提交问题-->
|
||||
<a-button type="link" @click="submitQuestion">
|
||||
<a-icon type="database" />
|
||||
{{ $t('standardRegulationLibrary.submitQuestion') }}
|
||||
</a-button>
|
||||
<!-- 分享-->
|
||||
<a-button type="link" @click="handleShare"><i class="iconfont icon-share-internal" />{{ $t('share') }}</a-button>
|
||||
</div>
|
||||
<div class="detail-page-process-manuscript-file" v-for="file in detailData[formItem.dbFieldName]" :key="file.id">
|
||||
<div class="detail-page-process-manuscript-file-info">
|
||||
<a-icon type="link" />
|
||||
<div class="detail-page-process-manuscript-file-name">{{ file.fileName }}</div>
|
||||
</div>
|
||||
<div class="detail-page-process-manuscript-file-operate">
|
||||
<a-button type="link" icon="download">{{ $t('download') }}</a-button>
|
||||
<a-button type="link">
|
||||
<i class="iconfont icon-water-drop-slash"></i>
|
||||
{{ $t('unwatermarkedDownload') }}
|
||||
</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>
|
||||
</div>
|
||||
<!-- 过程稿件特殊处理-->
|
||||
<div class="detail-page-process-manuscript" v-if="index === 3">
|
||||
<div class="detail-page-process-manuscript-item" v-for="formItem in form[part]" :key="formItem.id">
|
||||
<div class="detail-page-process-manuscript-title">
|
||||
<span>{{ formItem.dbFieldTxt }}</span>
|
||||
<!-- 标准分解单-->
|
||||
<a-button type="primary" ghost icon="file-text" @click="previewStandardResolutionSheet">
|
||||
{{ $t('standardRegulationLibrary.standardResolutionSheet') }}
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="detail-page-process-manuscript-file" v-for="file in detailData[formItem.dbFieldName]" :key="file.id">
|
||||
<div class="detail-page-process-manuscript-file-info">
|
||||
<a-icon type="link" />
|
||||
<div class="detail-page-process-manuscript-file-name">{{ file.fileName }}</div>
|
||||
</div>
|
||||
<div class="detail-page-process-manuscript-file-operate">
|
||||
<!-- 下载-->
|
||||
<a-button type="link" icon="download">{{ $t('download') }}</a-button>
|
||||
<!-- 无水印下载-->
|
||||
<a-button type="link">
|
||||
<i class="iconfont icon-water-drop-slash"></i>
|
||||
{{ $t('unwatermarkedDownload') }}
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-spin>
|
||||
|
||||
<!-- 更新记录-->
|
||||
<upload-record-modal ref="uploadRecordModal" />
|
||||
<!-- 提交问题-->
|
||||
<submit-question-modal ref="submitQuestionModal" />
|
||||
<!-- 分享选人-->
|
||||
<user-select-modal ref="userSelectModal" type="checkbox" @change="continueShare" />
|
||||
<!-- 标准分解单-->
|
||||
<standard-resolution-sheet-modal ref="standardResolutionSheetModal" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@assets/less/common.less'
|
||||
import { TagsTypeEnums } from '../../../enums/commonEnums'
|
||||
import { getDomesticStandardFormModal } from '../../../api/standardRegulationLibraryApi'
|
||||
import { getDomesticStandardFormModal, shareDomesticStandard } 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'
|
||||
|
||||
export default {
|
||||
name: 'StandardDetailPage',
|
||||
components: { UploadRecordModal, SubmitQuestionModal },
|
||||
components: { UploadRecordModal, SubmitQuestionModal, UserSelectModal, StandardResolutionSheetModal },
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
partList: [], // 页面模块列表
|
||||
form: {}, // 页面字段
|
||||
detailData: {
|
||||
@@ -136,6 +150,38 @@ export default {
|
||||
*/
|
||||
submitQuestion () {
|
||||
this.$refs.submitQuestionModal.open()
|
||||
},
|
||||
/**
|
||||
* 分享
|
||||
*/
|
||||
handleShare () {
|
||||
this.$refs.userSelectModal.open()
|
||||
},
|
||||
/**
|
||||
* 选择分享的人之后继续分享
|
||||
* @param ids
|
||||
*/
|
||||
continueShare (ids) {
|
||||
const params = {
|
||||
id: this.$route.query.id, // 要分享的标准的id
|
||||
userIds: ids // 分享给的用户的id
|
||||
}
|
||||
this.loading = true
|
||||
shareDomesticStandard(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 查看标准分解单
|
||||
*/
|
||||
previewStandardResolutionSheet () {
|
||||
this.$refs.standardResolutionSheetModal.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="$t('standardRegulationLibrary.standardResolutionSheet')"
|
||||
:maskClosable="false"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@cancel="handleCancel">
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<div class="page-container">
|
||||
<standard-resolution-sheet></standard-resolution-sheet>
|
||||
</div>
|
||||
</a-spin>
|
||||
|
||||
<template v-slot:footer>
|
||||
<a-button @click="handleCancel">{{ $t('close') }}</a-button>
|
||||
</template>
|
||||
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import StandardResolutionSheet from '../../../../components/StandardResolutionSheet.vue'
|
||||
|
||||
export default {
|
||||
name: 'StandardResolutionSheetModal',
|
||||
components: { StandardResolutionSheet },
|
||||
data () {
|
||||
return {
|
||||
width: '90%',
|
||||
visible: false,
|
||||
confirmLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open () {
|
||||
this.visible = true
|
||||
},
|
||||
handleCancel () {
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.page-container {
|
||||
min-height: 250px;
|
||||
height: calc(100vh - 200px - 55px - 54px - 48px);
|
||||
}
|
||||
|
||||
/deep/ .ant-modal-body {
|
||||
background: #F0F2F4;
|
||||
}
|
||||
</style>
|
||||
@@ -146,7 +146,7 @@ export default {
|
||||
|
||||
},
|
||||
handleCancel () {
|
||||
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.visible = false
|
||||
|
||||
Reference in New Issue
Block a user