对外报告管理页面布局

This commit is contained in:
zyx.net
2022-07-21 13:48:24 +08:00
parent 147a4fa06d
commit aac1a5028b
5 changed files with 658 additions and 336 deletions
+103 -64
View File
@@ -1,64 +1,49 @@
<template>
<div style='display:flex'>
<!-- <a-card>-->
<!-- <div style='width: 400px;background-color: red'></div>-->
<!-- </a-card>-->
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('standard')">
<span>{{ $t('standard') }}</span>
<div class="title-text" :title="$t('fileName')">
<span>{{ $t('fileName') }}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serialNumber"></a-input>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('fileName')"
v-model="queryParam.fileName"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('title')">
<span>{{$t('title')}}</span>
<div class="title-text" :title="$t('uploadedBy')">
<span>{{$t('uploadedBy')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParam.title"></a-input>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('uploadedBy')"
v-model="queryParam.uploadedBy"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('status')">
<span>{{ $t('status') }}</span>
<div class="title-text" :title="$t('uploadTime')">
<span>{{ $t('uploadTime') }}</span>
</div>
<j-dict-select-tag class="box-input" v-model="queryParam.state"
:placeholder="$t('PleaseSelect')+$t('status')"
:type="'select'"
:triggerChange="false" :dictCode="'state'"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('technicalField')">
<span>{{ $t('technicalField') }}</span>
</div>
<a-tree-select
tree-node-filter-prop="title"
v-model="queryParam.technologyTerritory"
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="CategoryTreeList"
tree-checkable
:placeholder="$t('PleaseSelect')+$t('technicalField')"
/>
<!-- <j-dict-select-tag class="box-input" v-model="queryParam.technologyTerritory"-->
<!-- :placeholder="$t('PleaseSelect')+$t('technicalField')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('uploadTime')"
@change="onChange" @ok="onOk"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="queryParam.uploadTime"
:disabled="false"/>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<globalAdvancedQuery ref="globalAdvancedQueryRef"
@handleSuperQuery="handleSuperQuery"
:fieldList="fieldList"/>
<!-- <globalAdvancedQuery ref="globalAdvancedQueryRef"-->
<!-- @handleSuperQuery="handleSuperQuery"-->
<!-- :fieldList="fieldList"/>-->
<a-button class="box-button" type="primary" @click="searchQuery">{{ $t('query') }}</a-button>
<a-button class="box-button" style="margin-left: 8px"
@click="searchReset">{{ $t('reset') }}</a-button>
@@ -69,9 +54,13 @@
</div>
<div class="table-operator" style="overflow:hidden;margin-bottom: 20px">
<div style="float: right;margin-bottom: 0px;margin-left: 20px">
<div class="operator-text" @click="deriveconformanceresults()">
<a-icon type="solution"/>
{{ $t('Deriveconformanceresults') }}
<div class="operator-text" @click="handleuploadFile()">
<a-icon type="import"/>
{{ $t('UploadFile') }}
</div>
<div class="operator-text" @click="handleDel()">
<a-icon type="delete"/>
{{ $t('BatchDelete') }}
</div>
</div>
</div>
@@ -93,7 +82,10 @@
</a>
</span>
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="handlecody(record)">{{$t('ViewConformanceResults')}}</a>
<a class="text-operation" @click="handlelist(record)">{{$t('view')}}</a>
<a class="text-operation" @click="download(record)">{{$t('download')}}</a>
<a class="text-operation" @click="handleEdit(record)">{{$t('edit')}}</a>
<a class="text-operation" @click="batchDel(record)">{{$t('delete')}}</a>
</span>
</a-table>
</div>
@@ -109,15 +101,18 @@
@showSizeChange="SizeChange"
/>
</div>
<!-- 导出历史模板-->
<a-modal class="show-drawer" :title="titleTag" width="1200px" v-model="drawerVisible" :footer="null">
<export-history v-if='drawerVisible' @areaVisible='drawerVisible = false' :paramsManifestId='paramsManifestId' :item='item'></export-history>
</a-modal>
<!-- 上传文件-->
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
<!-- 文件详情-->
<handleModel :url="url" ref="handleModelRef" />
</a-card>
</div>
</template>
<script>
import ExportHistory from './components/addModel'
import addModel from './components/addModel'
import handleModel from './components/handle'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
import axios from 'axios'
@@ -129,7 +124,8 @@ import moment from 'moment'
export default {
name: 'index',
components: {
ExportHistory,
addModel,
handleModel,
globalAdvancedQuery
},
data() {
@@ -162,22 +158,19 @@ export default {
title: '新增',
columns: [
{
title: this.$t('standard'),
title: this.$t('fileName'),
align: 'center',
dataIndex: 'serialNumber',
width: 180
},
{
title: this.$t('title'),
title: this.$t('fileDeclaration'),
align: 'center',
dataIndex: 'title',
width: 180
},
{
title: this.$t('status'),
title: this.$t('uploadedBy'),
align: 'center',
dataIndex: 'state_dicText',
width: 180
},
// {
// title: this.$t('category'),
@@ -185,12 +178,13 @@ export default {
// dataIndex: 'category'
// },
{
title: this.$t('technicalField'),
title: this.$t('uploadTime'),
align: 'center',
dataIndex: 'technologyTerritory_dicText'
dataIndex: 'technologyTerritory_dicText',
width: 250
},
{
title: this.$t('RegulatoryProcessEvaluationResults'),
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 250,
@@ -268,12 +262,9 @@ export default {
}
downloadFile('/project/lawsComplianceBoard/exportComplianceResult', this.$t('complianceResults')+'.xls', query, this.Deselect)
},
// 导出历史
handlecody(e) {
this.drawerVisible = true
this.titleTag = e.serialNumber + this.$t('ComplianceConfirmationRecord')
this.paramsManifestId = e.id
this.item = {...e}
// 上传文件
handleuploadFile(e) {
this.$refs.addModelRef.addModel()
},
hideModal() {
this.visible = false
@@ -327,6 +318,54 @@ export default {
}
this.getList()
},
//查看
handlelist(){
this.$refs.handleModelRef.addModel()
},
//编辑
handleEdit(item) {
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
},
//删除
batchDel(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
//批量删除
handleDel() {
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
getAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
getList() {
let territory = ''
if (this.queryParam.technologyTerritory) {