重点流程调取 - 分页查询

This commit is contained in:
yanyizhou
2021-11-14 13:23:08 +08:00
parent 7fae922c31
commit 00a53f0823
@@ -22,7 +22,7 @@
</ProcessTitle>
<div class="tableTitle">
<div class="tableButton">
<el-button plain class="common-button-primary" size="mini" @click="">调取</el-button>
<el-button plain class="common-button-primary" size="mini" @click="handleSearchStandard">调取</el-button>
<el-button plain class="common-button-primary" size="mini" @click="">删除</el-button>
</div>
</div>
@@ -210,6 +210,155 @@
@submit="handleSubmit"
>
</ProcessFooter>
<!-- 选择标准的弹框 -->
<el-drawer
ref="standard"
title="查询结果"
size="1000px"
:visible.sync="standardDrawer"
direction="rtl"
:before-close="handleReviseDrawerClose">
<div class="standard-content">
<div class="content">
<div class="standard-table-search">
<el-form :model="standardSearchForm" inline class="label-input-form search-area">
<el-form-item label="标准编号/政策编号" style="margin-right:10px" prop="lawsNumber" class="search-item">
<el-input
v-model="standardSearchForm.lawId"
clearable placeholder="根据编号查找"
:maxlength="100"
@keyup.enter.native="handleSearchStandard"/>
</el-form-item>
<el-form-item label="标准名称/政策名称" style="margin-right:10px" prop="lawsName" class="search-item">
<el-input
v-model="standardSearchForm.lawName"
placeholder="根据名称查找"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item label="产品类型" style="margin-right:10px" prop="productType" class="search-item">
<el-select v-model="standardSearchForm.productType" filterable clearable>
<el-option
v-for="item in productTypeOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
icon="el-icon-search"
type="primary"
class="common-button-primary"
@click="handleSearchStandard"
round>
</el-button>
<el-button
class="common-button-default"
icon="el-icon-refresh-left"
@click="handleResetSearch"
round>
</el-button>
</el-form-item>
</el-form>
</div>
<div class="standard-table-wrap">
<el-table
ref="reviseDrawerTable"
:data="tableData.standardData"
tooltip-effect="dark"
style="width: 100%;"
:height="tableHeight.standardTableHeight"
border
class="drag-table"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
@selection-change="standSelectChange">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
type="index"
label="序号"
width="80"
align="center"
></el-table-column>
<el-table-column
prop="lawId"
width="200"
label="标准编号/政策编号"
align="center">
</el-table-column>
<el-table-column
prop="lawName"
label="标准名称/政策名称"
align="center"
width="220px"
>
</el-table-column>
<el-table-column
prop="productType"
label="产品类型"
align="center">
</el-table-column>
<el-table-column
prop="implTime"
sortable
label="实施时间"
width="150"
align="center">
</el-table-column>
<el-table-column
prop="implRequire"
label="实施要求"
align="center">
</el-table-column>
<el-table-column label="操作" align="center" width="80">
<template slot-scope="scope">
<el-button
class="opera-btn"
size="mini"
type="primary"
@click="handlePreview(scope.row)">查看
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
:page="standardSearchForm.page"
:total="standardSearchForm.total"
@pageChange="handleStandardPageChange"
@pageSizeChange="handleStandardPageSizeChange"></pagination>
<loading :loading="loadSarStandard">数据获取中</loading>
</div>
</div>
<div class="demo-drawer-footer">
<!-- <el-button-->
<!-- round-->
<!-- class="common-button-primary"-->
<!-- icon="el-icon-check"-->
<!-- type="primary"-->
<!-- @click="handleProcessStandardNext(1)">新增-->
<!-- </el-button>-->
<el-button
round
class="common-button-primary"
icon="el-icon-check"
type="primary"
@click="handleProcessStandardNext(2)">带入
</el-button>
<el-button
round
class="common-button-default"
icon="el-icon-close"
@click="handleProcessStandardNext(3)">取消
</el-button>
</div>
</el-drawer>
</div>
</template>
@@ -228,6 +377,31 @@ export default {
},
data() {
return {
productTypeOptions: [{label: '树形结构', value: 'TREE'}, {label: '下拉选项', value: 'SEL_OPTION'}],
loadSarStandard: false,
tableHeight: {
standardTableHeight: null
},
tableData: {
// 标准表格数据
standardData: [],
// 任务分解单数据
taskTableData: []
},
standardSearchForm: {
lawId: '',
lawName: '',
productType: '',
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'INLAND',
standSort: '',
standName: '',
standEnName: '',
standNumber: ''
},
standardDrawer: false,
isSubmit: false,
active: "1", //默认显示基础信息页面
// 基础信息form表单
@@ -312,6 +486,135 @@ export default {
}
},
methods: {
handleProcessStandardNext(status) {
switch (status) {
// 新增
case 1:
this.selectedList = []
this.standardCheckedList = []
this.standardDrawer = false
this.verifySarStandard = true
this.clearFormData(this.form)
break
// 带入
case 2:
if (this.standardCheckedList.length === 1) {
this.$http.get('lawss/sarLawsInfo/getStandInfoUpdateById', {id: this.standardCheckedList[0].id}, {
_this: this
}, res => {
if (res && res.data) {
const bringData = res.data
const json = Object.assign(bringData, bringData.attrInfoMap);
this.form = JSON.parse(JSON.stringify(json))
this.form.TGRLAWS = JSON.parse(JSON.stringify(json)).TGRLAWS && JSON.parse(JSON.stringify(json)).TGRLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).TGRLAWS.split(',') : []
this.form.TGDWLAWS = JSON.parse(JSON.stringify(json)).TGDWLAWS && JSON.parse(JSON.stringify(json)).TGDWLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).TGDWLAWS.split(',') : []
this.form.NYLXLAWS = JSON.parse(JSON.stringify(json)).NYLXLAWS && JSON.parse(JSON.stringify(json)).NYLXLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).NYLXLAWS.split(',') : []
this.form.YYRZLAWS = JSON.parse(JSON.stringify(json)).YYRZLAWS && JSON.parse(JSON.stringify(json)).YYRZLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).YYRZLAWS.split(',') : []
this.form.ZRBMLAWS = JSON.parse(JSON.stringify(json)).ZRBMLAWS && JSON.parse(JSON.stringify(json)).ZRBMLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).ZRBMLAWS.split(',') : []
this.form.ZRGCSLAWS = JSON.parse(JSON.stringify(json)).ZRGCSLAWS && JSON.parse(JSON.stringify(json)).ZRGCSLAWS !== '[]' ? JSON.parse(JSON.stringify(json)).ZRGCSLAWS.split(',') : []
this.form.prcNum = this.prcNum
this.form.prcName = this.prcName
this.form['id'] = bringData.id
this.standardDrawer = false
this.verifySarStandard = true
this.busVsFunc()
this.modelFunc()
this.$forceUpdate()
}
// 遍历对象初始化文件信息
for (const p in this.form) {
if (typeof (this.form[p]) != "function") {
this.initializeFileList(p, this.form[p]);
}
}
console.log("res", res);
})
} else if (this.standardCheckedList.length > 1) {
this.$message.warning('最多可以带入一条政策信息')
} else {
this.$message.warning('请选择要带入的政策信息')
}
break
// 取消
case 3:
this.selectedList = []
this.standardCheckedList = []
this.standardDrawer = false
break
}
},
handleStandardPageChange(page) {
this.standardSearchForm.page = page
this.handleSearchStandard()
},
handleStandardPageSizeChange(pageSize) {
this.standardSearchForm.page = 1
this.standardSearchForm.pageSize = this.$store.getters.userInfo.configContent
this.handleSearchStandard()
},
// 点击查看
handlePreview(item) {
let routeUrl = this.$router.resolve({
name: 'OtherLawsStandDetails',
params: {
id: item.id,
pageType: 'LAWS_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
standSelectChange(data) {
this.selectedList = []
for (let i = 0; i < data.length; i++) {
this.selectedList.push(data[i].id)
}
this.standardCheckedList = data
},
//清空搜索条件
handleResetSearch() {
this.standardSearchForm.lawId = ''
this.standardSearchForm.lawName = ''
this.standardSearchForm.productType = ''
this.standardSearchForm.standType = 'INLAND'
this.standardSearchForm.standNumber = ''
this.standardSearchForm.standSort = ''
this.standardSearchForm.standName = ''
this.standardSearchForm.standEnName = ''
this.handleSearchStandard()
},
getDomesticStandardTable() {
this.loadSarStandard = true
this.$http.get('sarIssueTrack/issueTrack', this.standardSearchForm, {_this: this}, res => {
this.loadSarStandard = false
if (res.ok) {
this.standardSearchForm.page = 1
this.tableData.standardData = res.data.records
this.standardSearchForm.total = res.data.total
}
}, e => {
this.loadSarStandard = false
})
},
handleSearchStandard() {
this.standardDrawer = true
this.$nextTick(() => {
// 动态设置表格高度
this.tableHeight.standardTableHeight = $('.standard-table-wrap').height()
window.onresize = () => {
this.tableHeight.standardTableHeight = $('.standard-table-wrap').height()
}
})
this.getDomesticStandardTable()
},
/**
* 关闭修订 Drawer 的监听
* @param done
*/
handleReviseDrawerClose(done) {
done()
},
//基础信息/人员信息
handleTabs(type) {
this.active = type;
@@ -429,6 +732,32 @@ export default {
.zdrzbzORzchgxxmsc-step1 {
.standard-content {
height: 100%;
padding: 10px 0 0;
.content {
height: 100%;
display: flex;
flex-direction: column;
padding: 0 10px;
.standard-table-wrap {
flex: auto;
overflow-y: auto;
}
.pagination {
position: static;
/deep/ .pagination-slot {
padding: 0;
}
}
.search-area {
display: flex;
justify-content: left;
background: #FFF;
padding: 10px 10px 0;
}
}
}
.myForm {
/deep/ .el-form-item__content {
line-height: 10px;