修改参数清单收集 高级搜索

This commit is contained in:
zyx.net
2022-07-21 10:11:40 +08:00
parent e28d546345
commit 9f7f533137
3 changed files with 817 additions and 3 deletions
@@ -0,0 +1,316 @@
<template>
<div class='diolag-area'>
<a-spin :spinning='spinLoading'>
<a-form-model
class='tag-module'
ref='ruleForm'
:model='formData'
:rules='rules'
:label-col='labelCol'
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span='9'>
<a-form-model-item :label="$t('areaOfResponsibility')">
<j-dict-select-tag class="box-input" v-model="formData.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</a-col>
<a-col :span='9'>
<a-form-model-item :label="$t('RelatedItems')" prop='ListTitle'>
<a-select class="box-input" v-model="formData.projectNameId"
:placeholder="$t('PleaseSelect')+$t('RelatedItems')">
<a-select-option v-for="(element,index) in RelatedItemList" :key="element.id" :value="element.id">
{{element.projectName}}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span='6' style='margin-top: 4px;'>
<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>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<div class="table-operator" style='float: right;margin-top: -20px'>
<a-button type="primary" icon="download" @click="handleExportXls()">{{ $t('export') }}</a-button>
</div>
<!-- :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'-->
<a-table
class='table-area'
ref='table'
size='middle'
rowKey='id'
:columns='columns'
:dataSource='areaTable'
:pagination='false'
:loading='loading'
:scroll='{x: 600}'
@change='handleTableChange'>
<!-- <template slot="file" slot-scope="text, record">-->
<!-- <a class="action-edit" href="javascript:;" @click="dowloadfile(record)" v-has="'bqnrzdpzxlbj'">{{record.exportFileName}}</a>-->
<!-- </template>-->
</a-table>
<!-- <div class="page" style='display: flex;justify-content: flex-end;'>-->
<!-- <a-pagination-->
<!-- :show-total="total => $t('total')+` ${total} `+$t('strip')"-->
<!-- show-quick-jumper-->
<!-- show-size-changer-->
<!-- :page-size.sync="pageSize"-->
<!-- :total="total"-->
<!-- :current="pageNo"-->
<!-- @change="pageOnChange"-->
<!-- @showSizeChange="SizeChange"-->
<!-- />-->
<!-- </div>-->
<div class="table-operator" >
<a-button type="primary" v-if='this.opinionGather > 0' @click="handlecomments()">{{ $t('CommentsCollectionResultsForReference') }}</a-button>
<a-button type="primary" v-if='this.technologyEvaluation > 0' @click="handletechnical()">{{ $t('TechnicalEvaluationResultsForReference') }}</a-button>
</div>
<!-- <div class='drawer-bootom-button'>-->
<!-- <a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>-->
<!-- <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>-->
<!-- </div>-->
</div>
</template>
<script>
import { putAction, postAction, getAction, deleteAction ,downloadFile } from '@/api/manage'
import axios from 'axios'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
export default {
name: 'diolagArea',
components: {},
data() {
return {
token:Vue.ls.get(ACCESS_TOKEN),
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
opinionGather:'',
technologyEvaluation:'',
loading: false,
editId: '',
RelatedItemList:[],
columns: [
{
title: this.$t('areaOfResponsibility'),
dataIndex: 'dutyTerritory_dicText',
width: 120,
align: 'center',
ellipsis: true
},
{
title: this.$t('RelatedItems'),
align: 'center',
width: 120,
dataIndex: 'projectName',
ellipsis: true
},
{
title: this.$t('designComplianceReview'),
align: 'center',
width: 250,
dataIndex: 'designStatus_dicText',
ellipsis: true
},
{
title: this.$t('preHomeConfirmation'),
align: 'center',
width: 270,
dataIndex: 'prehomoStatus_dicText',
ellipsis: true
},
{
title: this.$t('verificationComplianceReview'),
align: 'center',
width: 270,
dataIndex: 'verifyStatus_dicText',
scopedSlots: { customRender: 'file' },
ellipsis: true
}
],
newVisible: false,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
form: {},
formData: {
projectName:'',
},
rules: {
title: [
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' }
]
},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
selectedRowKeys: [],
pageNo: 1,
pageSize: 10,
listVisible: false,
}
},
props: {
item: {
type: Object,
default: '',
require: true
},
paramsManifestId: {
type: String,
default: '',
require: true
},
},
mounted() {
this.loadData()
this.getRelatedItemList()
},
methods: {
getRelatedItemList(){
getAction('/project/projectNameInfoEO/list', {}).then((res) => {
if (res.success) {
this.RelatedItemList = res.result
}
})
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.loadData()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.loadData()
},
// 法规意见收集列表
handlecomments(){
this.$router.push({
path: '/collectionOfRegulatoryOpinions',
query:{
serialNumber:this.item.serialNumber
}
})
},
// 法规技术评估列表
handletechnical(){
this.$router.push({
path: '/technologyAssessment',
query:{
serialNumber:this.item.serialNumber
}
})
},
loadData() {
let params = {
id:this.paramsManifestId,
dutyTerritory:this.formData.dutyTerritory?this.formData.dutyTerritory:'',
projectName:this.formData.projectName?this.formData.projectName:'',
projectNameId:this.formData.projectNameId?this.formData.projectNameId:'',
}
this.loading = true
getAction('project/lawsComplianceBoard/queryComplianceResultList', params).then((res) => {
if (res.success) {
this.areaTable = res.result.complianceResultList
this.opinionGather = res.result.opinionGather
this.technologyEvaluation = res.result.technologyEvaluation
this.loading = false
}else{
this.loading = false
}
})
},
//导出
handleExportXls(){
let query = {
id:this.paramsManifestId,
...this.formData
}
downloadFile('/project/lawsComplianceBoard/exportComplianceResultDetail', this.$t('complianceResults')+'.xls', query, this.Deselect)
},
searchQuery() {
this.loadData()
},
searchReset() {
this.formData = {}
this.loadData()
},
handleCancel() {
this.$emit('areaVisible', false)
},
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
this.selectedRowKeysDate = selectedRowKeysDate
this.selectedRowKeys = selectedRowKeys
},
handleTableChange(val) {
console.log(',,,')
},
showModal() {
this.title = this.$t('add')
this.newVisible = true
this.form = {}
},
},
watch: {
selectedRowKeyS(val) {
this.selectedRowKeys = val
}
}
}
</script>
<style lang='less' scoped>
@import '~@assets/less/common.less';
.diolag-area {
.table-area {
margin: 20px 0;
.action-edit {
margin-right: 10px;
}
}
.table-del {
color: red;
}
}
.drawer-bootom-button{
display: flex;
justify-content: center;
}
.Required {
color: red;
margin-right: 4px;
}
</style>
<style lang='less'>
.area-module {
.ant-modal-wrap {
.ant-modal {
.ant-modal-content {
.ant-modal-footer {
text-align: center;
}
}
}
}
}
</style>
@@ -0,0 +1,480 @@
<template>
<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>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
v-model="queryParam.serialNumber"></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>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('title')"
v-model="queryParam.title"></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>
<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'"/>-->
</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"/>
<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>
</a-col>
</span>
</a-row>
</a-form>
</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>
</div>
</div>
<div>
<a-table
ref="table"
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: true}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<span slot="projectName" slot-scope="text,record" :title="text">
<a @click="entryNameClick(record)">
{{ text && text.length > 15 ? text.slice(0, 14) + '...' : text }}
</a>
</span>
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="handlecody(record)">{{$t('ViewConformanceResults')}}</a>
</span>
</a-table>
</div>
<div class="page">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="pageOnChange"
@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>
</a-card>
</template>
<script>
import ExportHistory from './components/addModel'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
import axios from 'axios'
import { ACCESS_TOKEN } from '@/store/mutation-types'
// import eventBUs from '../../../common/event'
import Vue from 'vue'
import moment from 'moment'
export default {
name: 'index',
components: {
ExportHistory,
globalAdvancedQuery
},
data() {
return {
token: Vue.ls.get(ACCESS_TOKEN),
loading: false,
toggleSearchStatus: false,
selectedRowKeys: [],
CategoryTreeList:[],
paramsManifestId:'',
item:{},
selectedRowKeysArray: '',
formInline: {},
rules: {
paramsTemplateName: [
{ required: true, message: this.$t('PleaseEnter') + this.$t('templateName'), trigger: 'change' }
]
},
fieldList: [],
visible: false,
dataSource: [],
confirmLoading: false,
url: {
list: 'project/lawsComplianceBoard/page',
getSysCategoryTree: '/sys/category/getSysCategoryTree',
},
total: 0,
pageSize: 10,
pageNo: 1,
title: '新增',
columns: [
{
title: this.$t('standard'),
align: 'center',
dataIndex: 'serialNumber',
width: 180
},
{
title: this.$t('title'),
align: 'center',
dataIndex: 'title',
width: 180
},
{
title: this.$t('status'),
align: 'center',
dataIndex: 'state_dicText',
width: 180
},
// {
// title: this.$t('category'),
// align: 'center',
// dataIndex: 'category'
// },
{
title: this.$t('technicalField'),
align: 'center',
dataIndex: 'technologyTerritory_dicText'
},
{
title: this.$t('RegulatoryProcessEvaluationResults'),
align: 'center',
fixed: 'right',
width: 250,
scopedSlots: { customRender: 'operation' }
}
],
queryParam: {},
areaVisible: false,
paramsTemplateName: '',
queryConditionVOList: [],
drawerVisible: false,
titleTag: ''
}
},
mounted() {
this.getList()
this.getSysCategoryTree()
this.queryConditionInventory()
},
methods: {
queryConditionInventory() {
let query = {
flag: 1
}
getAction('/project/projectLawsInventoryEO/queryConditionInventory', query).then((res) => {
if (res.success) {
this.fieldList = res.result || []
} else {
this.fieldList = []
}
})
},
handleCancel() {
this.areaVisible = false
},
handleSubmit() {
if (this.formInline.paramsTemplateName !== undefined) {
this.formInline.paramsTemplateName = this.formInline.paramsTemplateName.trim()
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
getAction(this.url.copy + `?id=${this.selectedRowKeys[0]}&paramsTemplateName=${this.formInline.paramsTemplateName}`, {}).then((res) => {
if (res.success) {
this.areaVisible = false
this.$message.success(res.message)
this.selectedRowKeys = []
this.getList()
} else {
this.$message.warning(res.message)
}
})
}
})
},
getSysCategoryTree() {
getAction(this.url.getSysCategoryTree, {}).then((res) => {
if (res.success) {
this.CategoryTreeList = res.result
} else {
this.CategoryTreeList = []
}
})
},
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
onSelectChange(value) {
this.selectedRowKeysArray = this.selectedRowKeys.join(',')
},
deriveconformanceresults(){
let query = {
...this.queryParam,
exportAll:'yes',
ids: this.selectedRowKeys.join(',')
}
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}
},
hideModal() {
this.visible = false
},
//虚拟清单名称事件
entryNameClick(item) {
this.$router.push({
path: '/ParameterTemplateList',
query: item
})
},
searchQuery() {
this.pageNo = 1
this.getList()
},
searchReset() {
this.queryParam = {}
this.territory = ''
this.queryConditionVOList = []
this.$refs.globalAdvancedQueryRef.resetLine()
this.$refs.globalAdvancedQueryRef.emitCallback()
},
pageOnChange(page, pageSize) {
this.pageNo = page
this.getList()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getList()
},
addModelList() {
this.pageNo = 1
this.getList()
},
PersonnelSelectionChange(value, id) {
this.queryParam[value] = id
this.queryParam = { ...this.queryParam }
},
handleSuperQuery(params, matchType) {
let sqp = {}
if (!params || (params && params.length == 0)) {
this.queryConditionVOList = []
this.$refs.globalAdvancedQueryRef.superQueryFlag = false
} else {
this.$refs.globalAdvancedQueryRef.superQueryFlag = true
this.queryConditionVOList = params
this.queryConditionVOList.forEach(res => {
res.type = matchType
})
}
this.getList()
},
getList() {
let territory = ''
if (this.queryParam.technologyTerritory) {
this.territory = this.queryParam.technologyTerritory.join(',')
}
// let queryParam = JSON.parse(JSON.stringify(this.queryParam))
let queryConditionVOList = JSON.parse(JSON.stringify(this.queryConditionVOList))
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
queryConditionVOList: JSON.stringify(queryConditionVOList),
technology_territory: this.territory,
serial_number:this.queryParam.serialNumber,
title:this.queryParam.title,
state:this.queryParam.state
}
this.loading = true
postAction(this.url.list, query).then((res) => {
if (res) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = res.result.current - 1
this.getList()
return
}
console.log(res.result)
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
display: inline-block;
width: 70%;
height: 38px;
margin-top: 2px;
}
.add-input {
width: 82%;
}
.box-button {
height: 38px;
/*margin-top: 2px;*/
}
.text-operation {
margin-right: 8px;
}
.page {
text-align: right;
margin-top: 20px;
}
.box-title-text-add {
line-height: 1.4;
display: flex;
}
.title-text-add {
width: 114px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
margin-top: 3px;
}
.box-input-add {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
.add-text-text {
margin-top: -14px;
}
</style>
@@ -192,6 +192,12 @@
<a-icon type="delete"/>
{{$t('CompulsoryWithdrawal')}}
</div>
<!-- 导出-->
<div @click="handleExport" class="operator-text"
v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
<a-icon type="export"/>
{{$t('export')}}
</div>
<!-- 角色切换 -->
<div class="operator-text"
v-if="!this.$route.query.it"
@@ -264,13 +270,13 @@
@areaVisibleAssignedbyflag='areaVisibleAssignedbyflag' @areaVisible='areaVisibleAssignedby = false'/>
</a-modal>
<!-- 下发收集--->
<a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('distributionAndCollection')" width='600px' :footer="null">
<a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('distributionAndCollection')" width='400px' :footer="null">
<task-cut-off-time v-if='areaVisibleTaskCutOffTime' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeflag='areaVisibleTaskCutOffTimeflag'/>
</a-modal>
<!-- 一键下发收集--->
<a-modal v-model="OneclickCollection" :title="$t('OneclickCollection')" width='600px' :footer="null">
<a-modal v-model="OneclickCollection" :title="$t('OneclickCollection')" width='400px' :footer="null">
<task-time v-if='OneclickCollection' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/>
@@ -554,7 +560,8 @@
{
type: 'string',
value: 'paramsBatch',
text: this.$t('parameterBatch')
text: this.$t('parameterBatch'),
dictCode: 'params_batch'
},
],
selectedRowKeys: [],
@@ -799,6 +806,17 @@
return flag
}
},
//导出
handleExport(){
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let query = {
...this.queryParam,
...this.queryParamQuery,
ids: selectedRowKeys.join(','),
dummyInventoryBaseId: this.$route.query.id
}
downloadFile(this.url.exportData, this.$route.query.name + this.$t('VirtualList') + '.zip', query, this.Deselect)
},
// 高级搜索
handleSuperQuery(params, matchType) {
let sqp = {}