Files
foton-laws-system-front/src/pages/details/otherStandardExternalDetails/pages/standInvolveProjectDetailTwo.vue
T

986 lines
36 KiB
Vue

<template>
<div class="stand-involve-project-detail-two">
<!-- <div class="laws-details-header">-->
<!-- &lt;!&ndash; <div class="back" title="返回" @click="back">&ndash;&gt;-->
<!-- &lt;!&ndash; <i class="el-icon-back"></i>&ndash;&gt;-->
<!-- &lt;!&ndash; </div>&ndash;&gt;-->
<!-- <div class="title">技术涉及项目</div>-->
<!-- </div>-->
<div class="search-area">
<div class="left">
<el-form ref="sarProject" :model="sarProject" inline @keyup.enter.native="searchStandAndLaws">
<!-- <el-form-item label="国家/地区" class="search-item">-->
<!-- <el-input v-model="sarProject.country"-->
<!-- placeholder="根据国家/地区查找"-->
<!-- clearable></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="国家/地区" class="search-item search-item-last">-->
<!-- <el-select-->
<!-- v-model="sarProject.country"-->
<!-- placeholder="请选择"-->
<!-- filterable-->
<!-- clearable-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in countryOptions"-->
<!-- :value="item.value"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- >-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="标准/政策号" class="search-item">
<el-input v-model="sarProject.standCode"
placeholder="标准/政策号查找"
@keyup.enter="searchStandAndLaws"
clearable></el-input>
</el-form-item>
<el-form-item label="标准/政策名称" class="search-item search-item-last">
<el-input v-model="sarProject.standName"
placeholder="标准/政策名称查找"
@keyup.enter="searchStandAndLaws"
clearable></el-input>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button class="common-button-primary" type="primary" icon="el-icon-search" round @click="searchStandAndLaws"></el-button>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button class="common-button-default" icon="el-icon-refresh-left" @click="resetSelect" round></el-button>
</el-form-item>
<!-- <el-form-item label="" class="search-item btn-box">-->
<!-- <el-button class="common-button-default export-button" icon="export" @click="showExportModal('apart')">导出</el-button>-->
<!-- </el-form-item>-->
<!-- <Button type="primary" @click="showExportModal('apart')">导出</Button>-->
<!-- <Button type="primary" @click="showExportModal('all')">全部导出</Button>-->
</el-form>
</div>
<div class="right">
</div>
</div>
<div class="content">
<el-table
stripe
ref="selections"
tooltip-effect="dark"
border
:height="tableHeight"
:data="sarProjectListDatas"
class="table"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="getSelectedDatas">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="standType"
label="标准/政策类型"
width="120"
>
<template slot-scope="scope">
<div v-if="scope.row.standType === 'INLAND_STAND'">国内标准法规</div>
<div v-if="scope.row.standType === 'FOREIGN_STAND'">国外标准法规</div>
<div v-if="scope.row.standType === 'INLAND_LAWS'">国内政策</div>
<div v-if="scope.row.standType === 'FOREIGN_LAWS'">国内外政策</div>
<div v-if="scope.row.standType === 'BUSINESS_STAND'">企业标准</div>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- prop="country"-->
<!-- label="国家/地区"-->
<!-- >-->
<!-- </el-table-column>-->
<el-table-column
prop="standCode"
label="标准/政策号"
width="180"
>
</el-table-column>
<el-table-column
prop="standName"
label="标准/政策名称"
>
</el-table-column>
<el-table-column
label=""
width="50"
align="center">
<template slot-scope="scope">
<i class="el-icon-view btn-i" v-btn-permission="'WWVT239CTACWUGHMMQVY'" @click="handleProjectCompliance(scope.row)"></i>
<!--<div @click.stop style="display: inline-block">-->
<!-- <el-dropdown trigger="click" @command="handleCommand">-->
<!-- <i class="iconfont">&#xe61e;</i>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item :command="[scope.row, '查看项目符合性']">查看项目符合性</el-dropdown-item>-->
<!-- &lt;!&ndash; <el-dropdown-item :command="[scope.row, '流程']">流程</el-dropdown-item>&ndash;&gt;-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
<!--</div>-->
</template>
</el-table-column>
</el-table>
<pagination :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
<loading :loading="loading">数据处理中</loading>
</div>
<!-- 查看符合标准性弹窗-->
<el-drawer
title="标准涉及项目符合性"
:visible.sync="showSarProStateModal"
:wrapperClosable="false"
size="800px"
:before-close="clearSearchPro"
class="not-footer-drawer"
>
<div class="demo-drawer-content">
<div class="el-drawer-form">
<div class="search-area">
<div class="left">
<el-form :inline="true" :model="sarProStateEO" class="label-input-form">
<el-form-item label="项目名称" class="search-item search-item-last">
<el-input
v-model="sarProStateEO.productName"
placeholder="根据项目名称查找"
:maxlength="100"
clearable></el-input>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
icon="el-icon-search"
type="primary"
class="common-button-primary"
round
@click="querySarProStateZero"></el-button>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
class="common-button-default"
icon="el-icon-refresh-left"
round
@click="clearSearchProState"></el-button>
</el-form-item>
</el-form>
</div>
<div class="right">
</div>
</div>
<el-table
v-if="this.isExistItems === 0"
ref="multipleTable"
:data="sarProStateListDatas"
tooltip-effect="dark"
style="width: 100%"
border
:height="sarProStateTableHeight"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', fontFamily: 'MicrosoftYaHei-Bold', height: '48px'}"
@selection-change="sarProductStateSelect">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<!-- <el-table-column-->
<!-- prop="accessType"-->
<!-- label="清单类型">-->
<!-- <template slot-scope="scope">-->
<!-- <div v-if="scope.row.accessType === 'first'">研发合规法规清单</div>-->
<!-- <div v-if="scope.row.accessType === 'second'">认证合规法规清单</div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
prop="productName"
label="项目名称">
</el-table-column>
<el-table-column
prop="carModel"
label="公告车型号">
</el-table-column>
<!--<el-table-column-->
<!-- prop="itemName"-->
<!-- label="标准名称">-->
<!-- <template slot-scope="scope">-->
<!-- <div>{{ exportShowName }}</div>-->
<!-- </template>-->
<!--</el-table-column>-->
<el-table-column
prop="sarState"
label="符合性状态">
<template slot-scope="scope">
<!-- <div class="table-jump" @click="handleSarStateClick(scope.row)">-->
<div class="table-jump" @click="changeState(scope.row)">
<div v-if="scope.row.sarState === 1">待验证</div>
<div v-if="scope.row.sarState === 2">符合</div>
<div v-if="scope.row.sarState === 3">不符合</div>
<div v-if="scope.row.sarState === 4">部分符合</div>
<div v-if="scope.row.sarState === 5">不涉及</div>
<div v-if="scope.row.sarState === 6">评估中</div>
<div v-if="scope.row.sarState === 7">整改中</div>
<div v-if="scope.row.sarState === 8"></div>
</div>
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" width="50" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <div @click.stop style="display: inline-block">-->
<!-- <el-dropdown trigger="click" @command="handleCommandInside">-->
<!-- <i class="iconfont">&#xe61e;</i>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item :command="[scope.row, '编辑']">编辑</el-dropdown-item>-->
<!--&lt;!&ndash; <el-dropdown-item :command="[scope.row, '查看']">查看</el-dropdown-item>&ndash;&gt;-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
:page="sarProStateTotalPage"
:total="sarProStateTotal"
@pageChange="pageProStateChange"
@pageSizeChange="pageProStateSizeChange"></pagination>
</div>
<!-- <div class="demo-drawer-footer">-->
<!-- <el-button class="common-button-primary" icon="el-icon-check" type="primary" @click="saveCopyInfor" :loading="isSubmit">提交</el-button>-->
<!-- <el-button class="common-button-default" icon="el-icon-close" @click="resetForm">取消</el-button>-->
<!-- </div>-->
</div>
<!-- 编辑符合性-->
<el-dialog title="编辑符合性" width="400px" :append-to-body="true" :visible.sync="editSarComModal" :before-close="handleClose">
<el-form ref="editSarComEO" :model="editSarComEO" class="label-input-form" style="height: 200px">
<el-input v-model="editSarComEO.id" v-show="false"></el-input>
<el-form-item v-if="this.isExistItems === 0" label="符合性" prop="sarState" class="laws-info-item">
<search-select v-model="editSarComEO.sarState" :options="conformStateOptions1" />
</el-form-item>
<el-form-item v-if="this.isExistItems === 1" label="符合性" prop="sarState" class="laws-info-item">
<search-select v-model="editSarComEO.itemState" :options="conformStateOptions" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="common-button-primary" icon="el-icon-check" type="primary" @click="updateSarState">确 定</el-button>
<!-- <el-button v-if="this.isExistItems === 1" class="common-button-primary" icon="el-icon-check" type="primary" @click="updateSarState">确 定</el-button>-->
<el-button class="common-button-default" icon="el-icon-close" @click="handleClose">取 消</el-button>
</div>
</el-dialog>
<loading :loading="loading2">数据处理中</loading>
</el-drawer>
<!-- 查看符合标准性弹窗2-->
<el-drawer
title="标准涉及项目符合性"
:visible.sync="showSarProStateModal2"
:wrapperClosable="false"
size="800px"
:before-close="clearSearchPro2"
class="not-footer-drawer"
>
<div class="demo-drawer-content">
<div class="el-drawer-form">
<div class="search-area">
<div class="left">
<el-form :inline="true" :model="sarProStateEO2" class="label-input-form">
<el-form-item label="项目名称" class="search-item search-item-last">
<el-input
v-model="sarProStateEO2.productName"
placeholder="根据项目名称查找"
:maxlength="100"
clearable></el-input>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
icon="el-icon-search"
type="primary"
class="common-button-primary"
round
@click="queryItemsBySar"></el-button>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
class="common-button-default"
icon="el-icon-refresh-left"
round
@click="clearSearchProState2"></el-button>
</el-form-item>
</el-form>
</div>
<div class="right">
</div>
</div>
<el-table
ref="multipleTable2"
:data="sarProStateListDatas2"
tooltip-effect="dark"
style="width: 100%"
border
:height="sarProStateTableHeight"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', fontFamily: 'MicrosoftYaHei-Bold', height: '48px'}"
@selection-change="sarProductStateSelect2">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<!-- <el-table-column-->
<!-- prop="accessType"-->
<!-- label="清单类型">-->
<!-- <template slot-scope="scope">-->
<!-- <div v-if="scope.row.accessType === 'first'">研发合规法规清单</div>-->
<!-- <div v-if="scope.row.accessType === 'second'">认证合规法规清单</div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
prop="productName"
label="项目名称">
</el-table-column>
<el-table-column
prop="carModel"
label="公告车型号">
</el-table-column>
<el-table-column
prop="itemName"
label="条目名称">
</el-table-column>
<el-table-column
prop="sarState"
label="符合性状态">
<template slot-scope="scope">
<div class="table-jump" @click="handleItemClick(scope.row)">
<div v-if="scope.row.sarState === 1">待验证</div>
<div v-if="scope.row.sarState === 2">符合</div>
<div v-if="scope.row.sarState === 3">不符合</div>
<div v-if="scope.row.sarState === 4">部分符合</div>
<div v-if="scope.row.sarState === 5">不涉及</div>
<div v-if="scope.row.sarState === 6">评估中</div>
<div v-if="scope.row.sarState === 7">整改中</div>
<div v-if="scope.row.sarState === 8">未评估</div>
</div>
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" width="50" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <div @click.stop style="display: inline-block">-->
<!-- <el-dropdown trigger="click" @command="handleCommandInside">-->
<!-- <i class="iconfont">&#xe61e;</i>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item :command="[scope.row, '编辑']">编辑</el-dropdown-item>-->
<!-- &lt;!&ndash; <el-dropdown-item :command="[scope.row, '查看']">查看</el-dropdown-item>&ndash;&gt;-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
:page="sarProStateTotalPage2"
:total="sarProStateTotal2"
@pageChange="pageProStateChange2"
@pageSizeChange="pageProStateSizeChange2"></pagination>
</div>
<!-- <div class="demo-drawer-footer">-->
<!-- <el-button class="common-button-primary" icon="el-icon-check" type="primary" @click="saveCopyInfor" :loading="isSubmit">提交</el-button>-->
<!-- <el-button class="common-button-default" icon="el-icon-close" @click="resetForm">取消</el-button>-->
<!-- </div>-->
</div>
<loading :loading="loading3">数据处理中</loading>
</el-drawer>
<!-- 查看符合标准性弹窗 流程-->
<el-drawer
title="相关流程"
:visible.sync="processListVisible"
:wrapperClosable="false"
size="800px"
class="not-footer-drawer"
>
<div class="demo-drawer-content">
<div class="el-drawer-form">
<el-table
ref="processList"
:data="processList"
tooltip-effect="dark"
style="width: 100%"
border
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', fontFamily: 'MicrosoftYaHei-Bold', height: '48px'}"
>
<el-table-column
prop="processNumber"
label="流程编号">
<template slot-scope="scope">
<div class="table-jump" @click="handleProcessClick(scope.row)">
{{ scope.row.processNumber }}
</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
</el-drawer>
</div>
</template>
<script>
export default {
name: 'standInvolveProjectDetailTwo',
data () {
return {
// 条件查询
sarProject: {
// 国家地区
country: '',
// 标准/政策号
standCode: '',
// 标准政策名称
standName: '',
standId: ''
},
// table数据
sarProjectListDatas: [],
countryOptions: [], //国家选择下拉框数据
drawerCountryOptions: [], // 准入信息 国家下拉框
// table高度
tableHeight: null,
// 列表页loading
loading: false,
loading2: false,
loading3: false,
// 外层列表页数据条数
total: 0,
page: 1,
resId: this.$route.params.resId,
pageSize: this.$store.getters.userInfo.configContent,
// 导出时候用
SarExportSearchEo: {},
// 项目符合性数据
saveSarId: '',
saveSarType: '',
exportShowName: '',
sarItem: {
standId: '',
standType: '',
productCode: '',
productName: ''
},
sarItem2: {
standId: '',
standType: '',
productCode: '',
productName: ''
},
// 新增、编辑 准入信息字段
sarAccessEO: {
country: '',
},
// 模态框内容
sarItemTotal: 0,
itemsPage: 1,
itemsPageSize: this.$store.getters.userInfo.configContent,
sarItemListDatas: [],
conformStateOptions: [
{label: '待验证', value: 1},
{label: '符合', value: 2},
{label: '不符合', value: 3},
// {label: '部分符合', value: 4},
{label: '不涉及', value: 5}
// {label: '评估中', value: 6},
// {label: '整改中', value: 7},
// {label: '未评估', value: 8}
],
conformStateOptions1: [
{label: '待验证', value: 1},
{label: '符合', value: 2},
{label: '不符合', value: 3},
// {label: '部分符合', value: 4},
{label: '不涉及', value: 5}
// {label: '评估中', value: 6},
// {label: '整改中', value: 7},
// {label: '未评估', value: 8}
],
// 查看标准在项目中符合性数据
showSarProStateModal: false,
showSarProStateModal2: false,
sarProStateEO: {
standId: '',
standType: '',
productCode: '',
productName: ''
},
sarProStateEO2: {
standId: '',
standType: '',
productCode: '',
productName: ''
},
sarProStateTotal: 0,
sarProStateTotalPage: 1,
sarProStatePageSize: this.$store.getters.userInfo.configContent,
sarProStateTotal2: 0,
sarProStateTotalPage2: 1,
sarProStatePageSize2: this.$store.getters.userInfo.configContent,
saveClickProductId: '',
saveSarProductId: '',
// 符合性查看弹窗的打开
showSarItemModal: false,
// 符合性项目列表数据
sarProStateListDatas: [],
// 符合性项目列表数据2
sarProStateListDatas2: [],
// 符合性项目列表高度
sarProStateTableHeight: null,
editSarComEO: {
id: '',
sarState: ''
},
editSarComEODefault: {
id: '',
sarState: ''
},
editSarComEO2: {
id: '',
itemState: ''
},
editSarComEODefault2: {
id: '',
itemState: ''
},
// 编辑弹窗打开
editSarComModal: false,
// 选中一行查看符合性弹窗的标准号,
standNum: '',
// 用于切换分页,0,1
isExistItems: '',
processList: [],
processListVisible: false
}
},
methods: {
changeState (row) {
console.log(row);
let routeUrl = this.$router.resolve({
name: 'ComplianceDetails',
query: {
sarId: this.saveSarId,
productId: row.productId,
sarType: row.standType,
fromPage: 'product'
}
})
window.open(routeUrl.href, '_blank')
},
/**
* 查看项目符合性弹框里面的
* 符合性状态列点击事件
*/
handleSarStateClick(row) {
if (row.sarState === 8) {
return
}
// console.log(row)
this.showSarProStateModal2 = true
this.saveClickProductId = row.productId
this.queryItemsBySar()
},
/**
* 查看项目 条款 弹框里面的
* 符合性状态列点击事件2222
*/
handleItemClick(row) {
const processList = row.process ? row.process.split(',') : []
console.log(processList)
this.processList = processList.map(item => {
return {
processNumber: item
}
})
this.processListVisible = true
},
/**
* 查看项目 条款 流程编号弹框里面的
* 流程编号点击事件
*/
handleProcessClick(row) {
const processNumber = row.processNumber
this.$store.commit('setDetailMap', this.$route.path)
this.$router.push({
name: 'ProcessDetail',
query: {
prcNum: processNumber
}
})
},
// 返回
back () {
this.$router.push(this.$store.state.detailMap)
this.$store.commit('setDetailMap', '')
},
// 列表操作栏 ...
handleCommand (command) {
switch (command[1]) {
case '查看项目符合性':
this.handleProjectCompliance(command[0])
break
}
},
// 符合性项目列表操作
handleCommandInside (command) {
switch (command[1]) {
case '编辑':
this.handleEdit(command[0])
break
// case '查看':
// this.handleProjectCompliance(command[0])
// break
}
},
searchStandAndLaws () {
this.page = 1
this.queryStandAndLaws()
},
// 分页查询
queryStandAndLaws () {
console.log('this.resId222',this.$route.query.resId)
this.sarProject.page = this.page
this.sarProject.pageSize = this.pageSize
this.sarProject.standId = this.$route.query.resId
this.SarExportSearchEo = this.sarProject
// this.$http.get('lawss/sarProductStand/queryStandAndLawsByPage', this.sarProject, {
this.$http.get('lawss/sarProductStand/queryStandAndLawsByPage', this.sarProject, {
_this: this,
loading: 'loading',
}, res => {
console.log(res.data.list)
console.log(res.data.count)
this.sarProjectListDatas = res.data.list
this.total = res.data.count
}, e => {
})
},
// 分页查询条目符合性
queryItemsBySar () {
this.sarItem2.page = this.itemsPage
this.sarItem2.pageSize = this.itemsPageSize
this.sarItem2.standId = this.saveSarId
this.sarItem2.standType = this.saveSarType
this.sarItem2.productId = this.saveClickProductId
this.$http.get('lawss/sarProductSarState/page', this.sarItem2, {
_this: this,
loading: 'loading3'
}, res => {
// this.sarItemListDatas = res.data.list
// this.sarItemTotal = res.data.count
this.sarProStateListDatas2 = res.data.list
this.sarProStateTotal2 = res.data.count
}, e => {
})
},
// 外层清空条件查询
resetSelect () {
this.sarProject.country = ''
this.sarProject.standCode=''
this.sarProject.standName = ''
this.queryStandAndLaws()
},
// 查看项目符合性
handleProjectCompliance (row) {
this.saveSarId = row.standId
this.saveSarType = row.standType
this.exportShowName = row.standName
this.sarItem.productCode = ''
this.sarItem.productName = ''
// this.queryItemsBySar()
this.row = row
// 原方案
// if (this.row.isExistItems === 1) {
// this.isExistItems = 1
// this.standNum = this.row.standCode
// // this.querySarProStateFirst()
// this.saveSarId = this.row.standId
// this.queryItemsBySar()
// this.showSarProStateModal = true
// } else {
// this.isExistItems = 0
// this.querySarProStateZero()
// this.showSarProStateModal = true
// }
this.$http.get('lawss/sarProductStand/isPermission', {standId: this.saveSarId}, {
_this: this,
loading: 'loading3'
}, res => {
if (res.ok){
// 现阶段方案
this.isExistItems = 0
this.showSarProStateModal = true
this.querySarProStateZero()
} else{
this.$message.warning('当前标准已不存在')
}
}, e => {
})
},
handleProjectPreview (row) {
this.saveClickProductId = row.productId
this.saveSarProductId = row.id
this.queryItemsBySar()
this.showSarItemModal = true
},
// 如果isExistItems === 0查看标准在项目中符合性列表
querySarProStateZero () {
// let queryUrl = ''
this.sarProStateEO.page = this.sarProStatePage
this.sarProStateEO.pageSize = this.sarProStatePageSize
this.sarProStateEO.standId = this.saveSarId
this.sarProStateEO.standType = this.saveSarType
this.$http.get('lawss/sarProductStand/queryInvolveProByPage', this.sarProStateEO, {
_this: this,
loading: 'loading2'
}, res => {
this.sarProStateListDatas = res.data.list
this.sarProStateTotal = res.data.count
}, e => {
})
},
// 如果isExistItems === 1 查看标准在项目中符合性列表
querySarProStateFirst () {
// let queryUrl = ''
this.sarProStateEO2.page = this.sarProStatePage2
this.sarProStateEO2.pageSize = this.sarProStatePageSize2
// this.sarProStateEO.standId = this.saveSarId
// this.sarProStateEO.standType = this.saveSarType
this.sarProStateEO2.standNum = this.standNum
this.$http.get('lawss/sarInconformItem/queryInvolveItems', this.sarProStateEO2, {
_this: this,
loading: 'loading'
}, res => {
this.sarProStateListDatas2 = res.data.list
this.sarProStateTotal2 = res.data.count
}, e => {
})
},
// 列表多选
sarProductStateSelect (val) {
console.log(val)
},
// 列表多选
sarProductStateSelect2 (val) {
console.log(val)
},
// 清空条件查询
clearSearchProState () {
this.sarProStateEO.productCode = ''
this.sarProStateEO.productName = ''
if (this.isExistItems === 0) {
this.querySarProStateZero()
} else {
this.querySarProStateFirst()
}
},
// 清空条件查询
clearSearchProState2 () {
this.sarProStateEO2.productCode = ''
this.sarProStateEO2.productName = ''
this.querySarProStateFirst()
},
// 清空查询
clearSearchPro () {
this.sarProStateEO.productCode = ''
this.sarProStateEO.productName = ''
this.showSarProStateModal = false
},
// 清空查询
clearSearchPro2 () {
this.sarProStateEO2.productCode = ''
this.sarProStateEO2.productName = ''
this.showSarProStateModal2 = false
},
// 项目符合性分页
pageProStateChange (page) {
this.sarProStatePage = page
this.querySarProStateZero()
},
pageProStateSizeChange (pageSize) {
this.sarProStatePageSize = pageSize
this.querySarProStateZero()
},
// 项目符合性分页
pageProStateChange2 (page) {
this.sarProStatePage2 = page
this.querySarProStateFirst()
},
pageProStateSizeChange2 (pageSize) {
this.sarProStatePageSize2 = pageSize
this.querySarProStateFirst()
},
// 编辑符合性弹窗打开
handleEdit (row) {
this.saveSarProductId = row.id
this.editSarComEO.sarState = row.sarState
this.editSarComModal = true
},
// 编辑符合性弹窗关闭
handleClose () {
if (this.isExistItems === 0) {
this.editSarComEO = {...this.editSarComEODefault}
} else {
this.editSarComEO2 = {...this.editSarComEODefault2}
}
this.$refs['editSarComEO'].clearValidate()
this.editSarComModal = false
},
// 符合性弹窗修改保存
updateSarState () {
if (this.isExistItems === 0) {
const data = {}
data.sarType = this.saveSarType
data.id = this.saveSarProductId
data.sarItemState = this.editSarComEO.sarState
this.$http.putData('lawss/sarProductSarState/updateSarState', data, {
_this: this
}, res => {
this.editSarComModal = false
this.querySarProStateZero()
}, e => {})
} else {
const data = {}
data.sarType = this.saveSarType
data.id = this.saveSarProductId
data.sarItemState = this.editSarComEO.itemState
this.$http.putData('lawss/sarProductSarState/updateState', data, {
_this: this
}, res => {
this.editSarComModal = false
this.queryItemsBySar()
// const data = {}
// data.sarType = this.saveSarType
// data.itemState = this.editSarComEO.itemState
// data.id = this.saveSarProductId
// this.$http.putData('lawss/sarInconformItem/updateItem', data, {
// _this: this
// }, res => {
// this.editSarComModal = false
// this.querySarProStateFirst()
}, e => {})
}
},
// 导出多选, table列表多选
getSelectedDatas (selection) {
this.saveSelectedDatas = selection
},
// 点击导出按钮
showExportModal (type) {
// 区别是选择导出还是全部导出
this.saveExportType = type
if (type === 'apart') {
if (this.saveSelectedDatas != null && this.saveSelectedDatas.length > 0) {
this.exportName = ''
this.exportModelFlag = true
} else {
this.$message.error('请选择要导出的数据')
}
} else {
this.exportName = ''
this.exportModelFlag = true
}
},
// 确认导出
exportSarProduct () {
if (this.exportName === '' || this.exportName === null || this.exportName === 'null') {
this.exportName = '标准涉及项目'
}
let jsonData = ''
if (this.saveExportType === 'apart') {
jsonData = JSON.stringify(this.saveSelectedDatas)
} else if (this.saveExportType === 'all') {
let exportEOStr = JSON.stringify(this.SarExportSearchEo)
jsonData = exportEOStr.replace(/""/g, null)
}
window.location.href = '/api/lawss/sarProductLaws/exportSarProduct?jsonData=' + jsonData + '&exportType=' + this.saveExportType + '&exportName=' + this.exportName
this.saveSelectedDatas = []
this.exportModelFlag = false
this.queryStandAndLaws()
},
// 外层分页方法
pageChange (page) {
this.page = page
this.queryStandAndLaws()
},
pageSizeChange (pageSize) {
this.pageSize = pageSize
this.queryStandAndLaws()
}
},
mounted () {
// 分页查询方法
this.queryStandAndLaws()
//从数据库中查询下拉框数据
this.$http.get('sys/dictype/getDicTypeListCode', '',{
_this:this
},res =>{
this.countryOptions = res.data.COUNTRY //国家
}, e => {
})
this.tableHeight = $('.regulatory-repository').height() - 53 - 50 - 56
window.onresize = () => {
this.tableHeight = $('.regulatory-repository').height() - 53 - 50 - 56
}
}
}
</script>
<style lang="less" scoped>
.stand-involve-project-detail-two{
height: 100%;
.laws-details-header {
background: #fff;
// height: 30px;
line-height: 50px;
padding: 0 10px;
//margin-bottom: 5px;
.back {
display: inline-block;
margin-right: 10px;
}
.title {
display: inline-block;
font-weight: bold;
font-size: 18px;
flex: 1;
padding: 0 15px;
text-align: center;
}
}
.container {
background: #fff;
padding: 5px 10px;
}
.content {
height: calc(~'100% - 52px');
.el-table {
height: calc(~'100% - 56px');
}
/deep/.el-table--scrollable-y .el-table__body-wrapper {
overflow-y: auto;
height: calc(~'100% - 48px') !important;
}
}
}
</style>
<style lang="less">
.stand-involve-project-detail-two{
.search-area .search-item .el-input--suffix .el-input__inner{
padding-right: 15px;
}
}
</style>