update 征求意见

This commit is contained in:
赵霄
2023-12-05 14:34:18 +08:00
parent 2640e0861f
commit 2043ddb35e
4 changed files with 178 additions and 17 deletions
+7 -1
View File
@@ -30,6 +30,9 @@ const queryPaymentList = (params) => getAction('/laws/standardization/lawsStanda
// 标准化活动-统计-参会记录
const queryMeetingList = (params) => getAction('/laws/standardization/lawsStandardization/queryMeetingByStandardizationId', params)
// 征求意见-详情
const queryAskForAdviceDetail = (params) => getAction('/laws/consultation/queryDetailByBusinessId', params)
export {
getQuizById,
answerQuiz,
@@ -46,5 +49,8 @@ export {
queryContactList,
queryGroupList,
queryPaymentList,
queryMeetingList
queryMeetingList,
// 征求意见
queryAskForAdviceDetail
}
@@ -1,5 +1,5 @@
<template>
<internal-detail-page :title="$route.meta.title">
<internal-detail-page :title="$route.meta.title" :loading="loading">
<template v-slot:titleRightCustom>
<a @click="handleToggle" style="margin-left: 8px">
{{ toggleStatus ? $t('putAway') : $t('open') }}
@@ -40,7 +40,7 @@
<a-button icon="upload"
type="primary"
ghost
@click="handleExportXls($t('businessSupport.askForAdvice.detailsOfComments'), 'zip')">
@click="handleExportXls($t('businessSupport.askForAdvice.detailsOfComments'), '.zip')">
{{ $t('export') }}
</a-button>
</div>
@@ -56,8 +56,11 @@
:loading="loading"
:pagination="ipagination"
:scroll="{x: '100%'}"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@change="handleTableChange">
<template v-slot:standardDetail="{text, record}">
<a-button type="primary">{{ $t('docTool.split.clickToView') }}</a-button>
</template>
</j-table>
</div>
</internal-detail-page>
@@ -69,6 +72,7 @@ import FileEcho from '../../../components/FileEcho'
import { downFile } from '../../../api/manage'
import JTable from '../../../components/jero/JTable'
import { JeroListMixin } from '../../../mixins/JeroListMixin'
import { queryAskForAdviceDetail } from '../../../api/businessSupport'
export default {
name: 'AskForAdviceDetail',
@@ -77,10 +81,129 @@ export default {
data () {
return {
toggleStatus: true,
detailData: {}
detailData: {},
disableMixinCreated: true,
loading: false,
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 80,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 条款号
title: this.$t('workCenter.enStandardRevision.clauseNumber'),
width: 180,
align: 'center',
dataIndex: 'chapterNumber',
scopedSlots: { customRender: 'text' }
},
{ // 条款名称
title: this.$t('docTool.split.clauseName'),
width: 180,
align: 'center',
dataIndex: 'chapterName',
scopedSlots: { customRender: 'text' }
},
{ // 修改意见内容
title: this.$t('workCenter.enStandardChange.revisedOpinionContent'),
children: [
{ // 修改前
title: this.$t('workCenter.enStandardChange.beforeUpdate'),
align: 'center',
width: 180,
dataIndex: 'modificationBefore',
scopedSlots: { customRender: 'standardDetail' }
},
{ // 修改后
title: this.$t('workCenter.enStandardChange.afterUpdate'),
align: 'center',
width: 180,
dataIndex: 'modificationAfter',
scopedSlots: { customRender: 'text' }
},
{ // 修改理由
title: this.$t('workCenter.enStandardChange.updateReason'),
align: 'center',
width: 180,
dataIndex: 'modificationReason',
scopedSlots: { customRender: 'text' }
}
]
},
{ // 提出部门
title: this.$t('workCenter.enStandardChange.proposingDepartment'),
align: 'center',
width: 180,
dataIndex: 'depart',
scopedSlots: { customRender: 'text' }
},
{ // 提出人
title: this.$t('workCenter.enStandardChange.introducer'),
align: 'center',
width: 180,
dataIndex: 'designEngineerName',
scopedSlots: { customRender: 'text' }
},
{ // 处理意见
title: this.$t('workCenter.enStandardRevision.handlingSuggestion'),
align: 'center',
width: 180,
dataIndex: 'isAdopt_dictText'
},
// 依据描述
{
dataIndex: 'basisDescription',
title: this.$t('projectLibrary.specialProjectLibrary.basisDescription'),
width: 180
},
// 佐证材料
{
dataIndex: 'basisFile',
title: this.$t('projectLibrary.specialProjectLibrary.supportingMaterial'),
width: 120
}
],
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
}
}
},
created () {
this.initDetailData()
},
methods: {
initDetailData () {
this.loading = true
const params = {
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize,
businessId: this.$route.query.id
}
queryAskForAdviceDetail(params).then(res => {
if (res.success) {
console.log(res.result)
this.dataSource = res.result || []
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
handleToggle () {
this.toggleStatus = !this.toggleStatus
},
@@ -89,6 +212,7 @@ export default {
fileName = '导出文件'
}
const param = this.getQueryParams()
param.businessId = this.$route.query.id
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
param.selections = this.selectedRowKeys.join(',')
}
@@ -103,7 +227,7 @@ export default {
this.$nextTick(() => {
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
})
downFile('', param).then((data) => {
downFile('/laws/consultation/exportExcel', param).then((data) => {
if (!data) {
this.$message.warning('文件下载失败')
return
@@ -116,6 +240,7 @@ export default {
link.style.display = 'none'
link.href = url
link.setAttribute('download', fileName + fileSuffix)
console.log(fileName + fileSuffix)
document.body.appendChild(link)
link.click()
document.body.removeChild(link) // 下载完成移除元素
@@ -125,7 +250,16 @@ export default {
// 销毁这个提示
modalLoading.destroy()
})
}
},
handleTableChange (pagination, filters, sorter) {
// 分页、排序、筛选变化时触发
if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.order ? sorter.field : 'createTime'
this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc'
}
this.ipagination = pagination
this.initDetailData()
},
}
}
</script>
@@ -7,8 +7,8 @@
<!--标准名称/编号-->
<a-col :md="6" :sm="12">
<a-form-item :label="$t('businessSupport.askForAdvice.standardNameNumber')">
<j-input :placeholder="$t('pleaseEnter') + $t('businessSupport.askForAdvice.standardNameNumber')"
v-model="queryParam.projectName"></j-input>
<a-input :placeholder="$t('pleaseEnter') + $t('businessSupport.askForAdvice.standardNameNumber')"
v-model="queryParam.standardNameNumber" />
</a-form-item>
</a-col>
<!--征求意见周期-->
@@ -18,7 +18,7 @@
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
style='margin-left: -1px'
v-model="queryParam.time"
v-model="queryParam.consultationPeriodList"
:disabled="false" />
</a-form-item>
</a-col>
@@ -65,6 +65,7 @@
<script>
import { JeroListMixin } from '@/mixins/JeroListMixin'
import JTable from '../../../components/jero/JTable'
import { filterObj } from '../../../utils/util'
export default {
name: 'AskForAdviceList',
@@ -77,19 +78,19 @@ export default {
{
title: this.$t('businessSupport.askForAdvice.standardNameNumber'),
width: 200,
dataIndex: 'listName',
dataIndex: 'standardNameNumber',
scopedSlots: { customRender: 'detail' }
},
// 征求意见周期
{
title: this.$t('businessSupport.askForAdvice.consultationCycle'),
width: 200,
dataIndex: 'referenceStandard'
dataIndex: 'consultationPeriod'
}
],
dataSource: [{ id: '1', listName: 'sdkjgfdjg' }],
dataSource: [],
url: {
list: ''
list: '/laws/consultation/queryByPage'
}
}
},
@@ -99,6 +100,23 @@ export default {
path: '/businessSupport/AskForAdviceDetail',
query: { id }
})
},
getQueryParams () {
// 获取查询条件
const sqp = {}
if (this.superQueryParams) {
sqp.superQueryParams = encodeURI(this.superQueryParams)
sqp.superQueryMatchType = this.superQueryMatchType
}
const param = Object.assign(sqp, this.queryParam, this.isorter, this.filters)
param.field = this.getQueryField()
param.pageNo = this.ipagination.current
param.pageSize = this.ipagination.pageSize
if (param.consultationPeriodList && param.consultationPeriodList.length > 0) {
param.consultationPeriod = param.consultationPeriodList.join(',')
delete param.consultationPeriodList
}
return filterObj(param)
}
}
}
@@ -68,7 +68,7 @@
:filters="{releaseSplitFlag: '1'}"
:can-selected-source="[StandardSource.DOMESTIC.value]"
type="radio"
@nameChange="handleStandardChange" />
@listChange="handleStandardChange" />
</a-form-item>
</div>
<div class="form-flex-item custom-flex-form-item">
@@ -852,8 +852,10 @@ export default {
* 选择标准带出标准名称
* @param name
*/
handleStandardChange (name) {
this.basicServiceInfoForm.setFieldsValue({ standardName: name, standardTextFileName: null })
handleStandardChange (list) {
const standard = list[0] || {}
this.basicServiceInfoForm.setFieldsValue({ standardName: standard.standardName, standardTextFileName: null })
this.basicServiceInfo.standardId = standard.id
delete this.basicServiceInfo.standardTextFileName
delete this.basicServiceInfo.standardText
delete this.basicServiceInfo.standardTextFileId
@@ -909,6 +911,7 @@ export default {
this.selectedRowKeys = []
},
onSelectChange (selectedRowKeys) {
console.log(selectedRowKeys)
this.selectedRowKeys = selectedRowKeys
},
handleEdit (record, index) {