update 征求意见

This commit is contained in:
赵霄
2023-11-01 18:46:08 +08:00
parent b6c51456d7
commit f4eba53aeb
3 changed files with 220 additions and 7 deletions
@@ -0,0 +1,147 @@
<template>
<internal-detail-page :title="$route.meta.title">
<template v-slot:titleRightCustom>
<a @click="handleToggle" style="margin-left: 8px">
{{ toggleStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleStatus ? 'up' : 'down'" />
</a>
</template>
<div class="detail-page-part-form" v-show="toggleStatus">
<!--标准名称-->
<div class="detail-page-part-form-item">
<label>{{ $t('standardName') }}</label>
<span></span>
</div>
<!--附件-->
<div class="detail-page-part-form-item">
<label>{{ $t('businessSupport.questionAnswer.attach') }}</label>
<file-echo :operate-fixed-right="false" />
</div>
<!--流程稿件-->
<div class="detail-page-part-form-item">
<label>{{ $t('businessSupport.askForAdvice.processManuscript') }}</label>
<file-echo :operate-fixed-right="false" />
</div>
<!--上传日期-->
<div class="detail-page-part-form-item">
<label>{{ $t('businessSupport.askForAdvice.uploadDate') }}</label>
<span></span>
</div>
<!--征求意见周期-->
<div class="detail-page-part-form-item">
<label>{{ $t('businessSupport.askForAdvice.consultationCycle') }}</label>
<span></span>
</div>
</div>
<div class="table-operator">
<!--导出-->
<a-button icon="upload"
type="primary"
ghost
@click="handleExportXls($t('businessSupport.askForAdvice.detailsOfComments'), 'zip')">
{{ $t('export') }}
</a-button>
</div>
<div>
<j-table
ref="table"
size="middle"
:columns="columns"
:data-source="dataSource"
rowKey="id"
:can-drag="true"
:loading="loading"
:pagination="ipagination"
:scroll="{x: '100%'}"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@change="handleTableChange">
</j-table>
</div>
</internal-detail-page>
</template>
<script>
import InternalDetailPage from '../../../components/InternalDetailPage'
import FileEcho from '../../../components/FileEcho'
import { downFile } from '../../../api/manage'
import JTable from '../../../components/jero/JTable'
import { JeroListMixin } from '../../../mixins/JeroListMixin'
export default {
name: 'AskForAdviceDetail',
components: { JTable, FileEcho, InternalDetailPage },
mixins: [JeroListMixin],
data () {
return {
toggleStatus: true,
detailData: {}
}
},
methods: {
handleToggle () {
this.toggleStatus = !this.toggleStatus
},
handleExportXls (fileName, fileSuffix = '.xlsx') {
if (!fileName || typeof fileName !== 'string') {
fileName = '导出文件'
}
const param = this.getQueryParams()
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
param.selections = this.selectedRowKeys.join(',')
}
console.log('导出参数', param)
// 加一个大的提示
const modalLoading = this.$info({
title: '提示',
content: <span>正在导出,请稍候 <a-spin size="small" /></span>,
keyboard: false
})
// 把知道了这个按钮去掉
this.$nextTick(() => {
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
})
downFile('', param).then((data) => {
if (!data) {
this.$message.warning('文件下载失败')
return
}
if (typeof window.navigator.msSaveBlob !== 'undefined') {
window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + fileSuffix)
} else {
const url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
const link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', fileName + fileSuffix)
document.body.appendChild(link)
link.click()
document.body.removeChild(link) // 下载完成移除元素
window.URL.revokeObjectURL(url) // 释放掉blob对象
}
}).finally(() => {
// 销毁这个提示
modalLoading.destroy()
})
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.detail-page-part-form {
padding: 0;
}
.detail-page-part-form-item {
width: 100%;
label {
width: 6.5rem;
}
}
</style>
@@ -19,7 +19,7 @@
value-format="YYYY-MM-DD"
style='margin-left: -1px'
v-model="queryParam.time"
:disabled="false"/>
:disabled="false" />
</a-form-item>
</a-col>
@@ -34,25 +34,77 @@
</a-row>
</a-form>
</div>
<div>
<j-table
ref="table"
size="middle"
:columns="columns"
:data-source="dataSource"
rowKey="id"
:can-drag="true"
:loading="loading"
:pagination="ipagination"
:scroll="{x: '100%'}"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@change="handleTableChange">
<!--跳转详情-->
<template v-slot:detail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{ text }}</div>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
</j-table>
</div>
</a-card>
</template>
<script>
import { JeroListMixin } from '@/mixins/JeroListMixin'
import JTable from '../../../components/jero/JTable'
export default {
name: 'AskForAdviceList',
components: { JTable },
mixins: [JeroListMixin],
data () {
return {
columns: [
// 标准名称/编号
{
title: this.$t('businessSupport.askForAdvice.standardNameNumber'),
width: 200,
dataIndex: 'listName',
scopedSlots: { customRender: 'detail' }
},
// 征求意见周期
{
title: this.$t('businessSupport.askForAdvice.consultationCycle'),
width: 200,
dataIndex: 'referenceStandard'
}
],
dataSource: [{ id: '1', listName: 'sdkjgfdjg' }],
url: {
list: ''
}
}
},
methods: {
toDetailPage ({ id }) {
this.$router.push({
path: '/businessSupport/AskForAdviceDetail',
query: { id }
})
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>