Files
foton-laws-system-front/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/details.vue
T
2022-02-22 15:14:30 +08:00

1378 lines
46 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<div class="details v-class">
<div class="contentTitle">
<div class="back" title="返回" @click="back">
<i class="el-icon-back"></i>
</div>
<div class="title">
{{ sarAccessEO.detailedListName }}
<i class="el-icon-s-order"
@click="heightShow = !heightShow">
</i>
</div>
</div>
<transition name="el-zoom-in-top">
<div v-show="heightShow" class="transition-box">
<p class="transition-box-p" v-if="sarAccessEO.sortKey === '1'">
<label class="transition-box-label">国家/地区:</label>
<span class="transition-box-span">
{{ sarAccessEO.countryAreaShow }}
</span>
</p>
<p v-else></p>
<p class="transition-box-p">
<label class="transition-box-label">清单说明:</label>
<span class="transition-box-span">{{ sarAccessEO.remark || "-" }}</span>
</p>
<div class="transition-box-p">
<label class="transition-box-label">清单说明附件:</label>
<div class="file-box" v-if="fileInfoList.length > 0">
<p v-for="item in fileInfoList"
:key="item.id"> {{ item.name }}
<i
title="下载"
@click="downloadFile(item.id)"
class="icon-download"
v-btn-permission="''"
/>
<i
title="下载带水印"
@click="downloadFileByWater(item.id,item.name)"
class="icon-download2"
v-btn-permission="''"
/>
</p>
</div>
<span class="transition-box-span" v-else>-</span>
</div>
</div>
</transition>
<div class="search-area">
<div class="left">
<el-form ref="standardForm" :model="standardForm" inline>
<el-form-item label="标准号" class="search-item">
<el-input v-model="standardForm.standNumber"
placeholder="请输入"
clearable></el-input>
</el-form-item>
<el-form-item label="标准名称" class="search-item">
<el-input v-model="standardForm.standName"
placeholder="请输入"
clearable></el-input>
</el-form-item>
<el-form-item label="责任部门" class="search-item" prop="responseUnit">
<el-input
v-model="standardForm.zrbm"
placeholder="请输入责任部门"
>
</el-input>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button v-btn-permission="'670dd74a8469a6232a0762c69b575775'" class="common-button-primary"
type="primary" size="small" @click="selectProductBtn">查询
</el-button>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button v-btn-permission="'d55e2eb884449f04ecdb30f0523d965d'" class="common-button-default"
@click="resetSelect" size="small">清空
</el-button>
</el-form-item>
<el-button class="common-button-default export-button"
v-btn-permission="'c7165a1baa667140f97e792971c89a71'"
size="small" @click="exportStandard()"
title="不勾选时默认导出所有筛选项;勾选时仅导出勾选项"
icon="export"
>导出
</el-button>
<el-button type="primary" class="common-button-primary" size="mini" v-btn-permission="'670472f38fe27b192c7f7105847f38ce'" @click="selectMoreBtn">
<i class="iconfont">&#xe7a5;</i>
高级查询
</el-button>
</el-form>
</div>
</div>
<div class="container" style="position:relative;">
<div style="position: absolute;top: 0;left: 0;bottom: 0;right: 0;">
<loading :loading="standInfoTableLoading">数据获取中</loading>
<el-table
:data="standinfoList"
style="width: 100%"
height="90%"
border
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="standSelectChange"
ref="skillTable"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
label="序号"
align="center"
width="55"
fixed="left"
type="index"
>
</el-table-column>
<el-table-column
prop="standNumber"
fixed="left"
width="180px"
align="center"
label="标准号">
<template slot-scope="scope">
<span class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standNumber }}</span>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="中文名称"
width="180px"
>
<template slot-scope="scope">
<a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column
prop="standEnName"
align="center"
width="180px"
label="英文名称">
<template slot-scope="scope">
<a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standEnName }}</a>
</template>
</el-table-column>
<el-table-column
prop="typeApplicable"
align="center"
width="180px"
label="适用车型">
</el-table-column>
<el-table-column
prop="nylx"
align="center"
width="180px"
label="能源类型">
</el-table-column>
<el-table-column
prop="ssrq"
sortable
align="center"
width="210px"
label="标准实施日期">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zccssrqgj"
sortable
width="210px"
align="center"
label="在产车实施日期">
</el-table-column>
<el-table-column
prop="xcxssrqgj"
sortable
align="center"
width="210px"
label="新车型实施日期">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="zrbm"
width="210px"
align="center"
label="责任部门">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="sycpx"
width="180px"
align="center"
label="适用产品线">
</el-table-column>
</el-table>
<pagination :page="page" :total="total" @pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination>
</div>
</div>
<!--导出文件改名字模态框-->
<el-dialog :visible.sync="exportModelFlag" title="导出文件" width="300px">
<el-form :inline="true" class="label-input-form search-area">
<el-form-item label="导出名称" class="search-item">
<el-input v-model="exportName" placeholder="请输入导出文件名称" :maxlength="30" clearable label="导出名称" />
</el-form-item>
</el-form>
<span slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" icon="el-icon-close" @click="cancal">取消</el-button>
<el-button type="primary" class="common-button-primary" icon="el-icon-check"
@click="exportTestItem">提交</el-button>
</span>
</el-dialog>
<!-- 更新LOG -->
<el-dialog
title="更新LOG"
:visible.sync="relateDialog"
class="relateClass"
width="60%"
:before-close="relateDialogClose">
<div
v-for="(item, index) in relateNowList"
:key="index"
v-if="relateNowList"
style="margin-bottom: 10px;line-height: 20px;max-height: 300px"
>
{{ index + 1 }}. {{ item.creationUserName }} {{ item.creationTime }} {{ item.content }}
<div v-if="relateNowList.length >1">
<el-divider></el-divider>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="relateDialogClose">关 闭</el-button>
</div>
</el-dialog>
<!--高级查询抽屉-->
<el-drawer
title="高级查询"
:before-close='cancelQueryInfo'
:visible.sync="showQueryMore"
:wrapperClosable="false"
size="800px"
>
<div class="content_form" style="height: 100%">
<el-form :modal="sarAccessInfo" class="label-input-form" label-width="150px" style="margin: 20px">
<ProcessTitle>
<template slot="title">基础信息</template>
</ProcessTitle>
<el-row>
<el-col :span="12">
<el-form-item :label="standLabelNum" class="add-form-item">
<el-input
v-if="sarAccessInfo.dataSource === 'FOREIGN_STAND' || sarAccessInfo.dataSource === 'INLAND_STAND'"
v-model="sarAccessInfo.standNumber"
placeholder="请输入标准号"/>
<el-input
v-if="sarAccessInfo.dataSource === 'FOREIGN_LAWS'"
v-model="sarAccessInfo.lawsNumber"
placeholder="请输入政策编号"/>
<el-input
v-else-if="sarAccessInfo.dataSource === 'BUSINESS'"
v-model="sarAccessInfo.standCode"
placeholder="请输入标准号"/>
</el-form-item>
<el-form-item v-if="sarAccessInfo.dataSource === 'BUSINESS'" label="文本状态" class="add-form-item">
<el-select v-model="sarAccessInfo.textStatusBuss"
placeholder="请选择文本状态"
clearable>
<el-option
v-for="(opt,index) in textStatusBussOptions"
:key="index"
:value="opt.value === undefined ? '' :opt.value" :label="opt.label"
>
{{ opt.label }}
</el-option>
</el-select>
</el-form-item>
<el-form-item v-else label="文本状态" class="add-form-item">
<el-select
v-model="sarAccessInfo.textStatus"
placeholder="请选择文本状态"
clearable
>
<el-option
v-for="opt in textStatusOptions"
:value="opt.value === undefined ? '' :opt.value"
:key="opt.value" :label="opt.label">{{ opt.label }}
</el-option>
</el-select>
</el-form-item>
<!-- 适用车型 -->
<template v-if="sarAccessInfo.dataSource === 'FOREIGN_STAND' || sarAccessInfo.dataSource === 'INLAND_STAND'">
<custom-select-array
:config="applySYCX"
v-model="sarAccessInfo['CLLX']"
></custom-select-array>
</template>
<el-form-item v-else-if="sarAccessInfo.dataSource === 'FOREIGN_LAWS'"
label="适用车型" class="add-form-item">
<el-select v-model="sarAccessInfo.lawsSycx" filterable clearable>
<el-option
v-for="item in lawsSycxOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
<template v-if="sarAccessInfo.dataSource === 'BUSINESS'">
<custom-select-array
:config="applySYCX"
v-model="sarAccessInfo['SYCXCLASS']"
></custom-select-array>
</template>
</el-col>
<el-col :span="12">
<el-form-item :label="standLabelName" class="add-form-item">
<el-input v-model="sarAccessInfo.standName" placeholder="请输入标准名称"></el-input>
</el-form-item>
<el-form-item label="是否纳入认证清单" class="add-form-item">
<el-select v-model="sarAccessInfo.isRelateAccess" clearable placeholder="根据是否纳入标准清单查找">
<el-option value="1" label="是"></el-option>
<el-option value="0" label="否"></el-option>
</el-select>
</el-form-item>
<!-- 适用认证 -->
<template v-if="sarAccessInfo.dataSource === 'FOREIGN_STAND' || sarAccessInfo.dataSource === 'INLAND_STAND'">
<custom-select-array
:config="applySYRZ"
v-model="sarAccessInfo['SYRZ']"
></custom-select-array>
</template>
<el-form-item v-else-if="sarAccessInfo.dataSource === 'FOREIGN_LAWS'"
label="适用认证" class="add-form-item">
<el-select v-model="sarAccessInfo.YYRZLAWS" clearable>
<el-option
v-for="item in YYRZLAWSOptions"
placeholder="请选择"
:key="item.value"
:value="item.value"
:label="item.label"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<ProcessTitle>
<template slot="title">日期选择</template>
</ProcessTitle>
<el-row>
<el-col :span="12">
<!-- 发布日期 -->
<el-form-item v-if="sarAccessInfo.dataSource !== 'FOREIGN_LAWS'" label="发布日期" class="add-form-item">
<el-date-picker
v-model="sarAccessInfo.issueTime"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
placeholder="根据标准发布日期查找">
</el-date-picker>
</el-form-item>
<el-form-item v-else label="发布日期" class="add-form-item">
<el-datePicker
v-model="sarAccessInfo.issueTime"
:editable="false"
placeholder="请选择发布日期"
value-format="yyyy-MM-dd"
clearable>
</el-datePicker>
</el-form-item>
<!-- 新车型实施日期 -->
<el-form-item v-if="sarAccessInfo.dataSource === 'FOREIGN_STAND' || sarAccessInfo.dataSource === 'INLAND_STAND'" label="新车型实施日期" class="add-form-item">
<el-date-picker
value-format="yyyy-MM-dd"
v-model="sarAccessInfo.XCXSSRQ"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
placeholder="根据新车型实施日期查找">
</el-date-picker>
</el-form-item>
<el-form-item v-else-if="sarAccessInfo.dataSource === 'FOREIGN_LAWS'" label="新车型实施日期" class="add-form-item">
<el-datePicker
v-model="sarAccessInfo.XCXSSRQLAWS"
:editable="false"
placeholder="请选择实施日期"
value-format="yyyy-MM-dd"
clearable></el-datePicker>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- 实施日期 -->
<el-form-item v-if="sarAccessInfo.dataSource === 'FOREIGN_STAND' || sarAccessInfo.dataSource === 'INLAND_STAND'" label="实施日期" class="add-form-item">
<el-date-picker
v-model="sarAccessInfo.SSRQ"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
placeholder="根据实施日期查找">
</el-date-picker>
</el-form-item>
<el-form-item v-else-if="sarAccessInfo.dataSource === 'FOREIGN_LAWS'" label="实施日期" class="add-form-item">
<el-datePicker
v-model="sarAccessInfo.SSRQLAWS"
:editable="false"
placeholder="请选择实施日期"
value-format="yyyy-MM-dd"
clearable>
</el-datePicker>
</el-form-item>
<!-- 在产车实施日期 -->
<el-form-item v-if="sarAccessInfo.dataSource === 'FOREIGN_STAND' || sarAccessInfo.dataSource === 'INLAND_STAND'" label="在产车实施日期" class="add-form-item">
<el-date-picker
v-model="sarAccessInfo.ZCCSSRQ"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
placeholder="根据在产车实施日期查找">
</el-date-picker>
</el-form-item>
<el-form-item v-else-if="sarAccessInfo.dataSource === 'FOREIGN_LAWS'" label="在产车实施日期" class="add-form-item">
<el-datePicker
v-model="sarAccessInfo.ZCXSSRQLAWS"
:editable="false"
placeholder="请选择实施日期"
value-format="yyyy-MM-dd"
clearable></el-datePicker>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="demo-drawer-footer">
<el-button size="mini" @click="cancelQueryInfo">取消</el-button>
<el-button type="primary" size="mini" @click="okQueryInfo(1)">确认</el-button>
</div>
</el-drawer>
<loading :loading="dataLoading">{{ $t("m.dataAcquisition") }}</loading>
</div>
</template>
<script>
import { interfaceUrl } from "@/sysConfig";
import ProcessTitle from '@/pages/processCenter/pages/components/ProcessTitle'
import CustomSelectArray from "@/components/CustomFormComponents/SelectArray";
import { StandardsInfoPage } from "api/unqualProcess";
export default {
name: "AccessStandardDetails",
components:{
ProcessTitle,
CustomSelectArray
},
data() {
return {
showQueryMore: false,
textStatusBussOptions: [],
textStatusOptions: [],
lawsSycxOptions: [], // 国内外政策适用车型
YYRZLAWSOptions: [], // 国内外政策适用认证
applySYCX: {
attrName: '适用车型',
options: []
},
applySYRZ: {
attrName: '适用认证',
options: []
},
standLabelNum: '标准号',
standLabelName: '标准名称',
// 高级检索状态
showSelectBox: true,
textStatusMap: {},
typeApplicableMap: {},
nylxMap: {},
zrbmMap: {},
sycpxMap: {},
countryAreaMap: {},
standInfoTableLoading:false,
standinfoList: [],
// 适用车型
applyArcticOptions: [],
// 能源类型
categoryOptions: [],
// 责任部门
zrbmOptions: [],
// 适用产品线
sycpxOptions: [],
standardFormTotal: 0,
relateDialog: false,
relateList: [],
relateNowList: [],
heightShow: true,
dataLoading: false,
standardForm: {
zrbm: "",
standNumber: "",
standName: "",
responseUnit: "",
page: 1,
Size: this.$store.getters.userInfo.configContent
},
// 新增、编辑 数据搜索字段
sarAccessInfo: {
id: '',
standName: '',
standNumber: '',
standCode: '', // 政策编号
textStatus: '',
textStatusBuss: '',
CLLX: '',
SYRZ: '',
lawsSycx: '',
YYRZLAWS: '',
// 发布日期
issueTime: '',
// 实施日期
SSRQ: '',
SSRQLAWS: '',
// 在产车实施日期
ZCCSSRQ: '',
ZCXSSRQLAWS: '',
// 新车型实施日期
XCXSSRQ: '',
XCXSSRQLAWS: '',
//是否纳入认证清单
isRelateAccess: '',
standType: 'INLAND',
askType: '', // 监管类型
dataSource: 'INLAND_STAND', // 数据来源
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
validFlag: 0,
advanceSearchVOStr: []
},
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
stateList: [], // 标准状态列表
activeName: "SKILL", // 当前激活
exportModelFlag: false,
exportName: "",
standType: "INLAND",
uploadPath: "api/att/attFile/upload",
defaultFileList: [], // 默认显示,
loading: false,
accessSarType: "",
selectedList: [],
pageId: "",
// 导出文件模态框控制,和文件名称
saveExportType: "",
depNode: [], // 部门树
sarAccessEO: {},
sarAccessEOInfo: "",
fileInfoList: [],
// 改变颜色
dialogColor: false,
dialogType: "",
color: "",
isShow: false,
countryAreaShow: ''
};
},
methods: {
//高级查询的 X
cancelQueryInfo() {
this.sarAccessInfo = {
id: '',
standName: '',
standNumber: '',
textStatus: '',
CLLX: '',
SYRZ: '',
// 发布日期
issueTime: '',
// 实施日期
SSRQ: '',
// 在产车实施日期
ZCCSSRQ: '',
// 新车型实施日期
XCXSSRQ: '',
//是否纳入认证清单
isRelateAccess: '',
standType: this.sarAccessInfo.standType,
askType: '', // 监管类型
dataSource: this.sarAccessInfo.dataSource, // 数据来源
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
validFlag: 0,
advanceSearchVOStr: []
}
this.showQueryMore = false
},
// 高级查询确认按钮
okQueryInfo() {
let item = this.sarAccessInfo
item.pageSize = this.$store.getters.userInfo.configContent
const data = item
// this.sarStandardsSearch.menuId = this.selectSarMenu.id
const formData = {...data}
formData.standType = this.sarAccessInfo.standType
// // 自定义属性字段高级搜索处理
//advanceSearchVOStr
const advanceSearchVOList = [];
for (let key in formData) {
const value = formData[key];
if (value !== null && value !== '' && value.length > 0 && (key === 'SYRZ' || key === 'CLLX')) {
advanceSearchVOList.push({
connect: "and",
field: key || '',
type: 'regexp',
value: value.join(',')
});
} else if (value !== null && value !== '' && value.length > 0 && (key === 'SSRQ' || key === 'XCXSSRQ' || key === 'ZCCSSRQ')) {
advanceSearchVOList.push({
connect: "and",
field: key || '',
type: 'between',
value: value.join(',')
});
}
}
formData.advanceSearchVOStr = JSON.stringify(advanceSearchVOList);
if (this.sarAccessInfo.dataSource === 'FOREIGN_STAND' || this.sarAccessInfo.dataSource === 'INLAND_STAND') {
formData.startIssueTime = formData.issueTime ? formData.issueTime[0] : null
formData.endIssueTime = formData.issueTime ? formData.issueTime[1] : null
formData.issueTime = null
} /*else if(this.sarAccessInfo.dataSource === 'BUSINESS') {
// formData.issueTime = formData.issueTime ? formData.issueTime[0] : null
// formData.issueTime = formData.issueTime ? formData.issueTime[1] : null
}*/
this.sarAccessInfo = formData
this.showQueryMore = false
this.selectLawsStands()
},
// 查询数据搜索 table 数据
selectLawsStands() {
if (this.sarAccessInfo.dataSource === 'INLAND_STAND') {
this.sarAccessInfo.standType = 'INLAND'
this.pageInfo()
} else if (this.sarAccessInfo.dataSource === 'FOREIGN_STAND') {
this.sarAccessInfo.standType = 'FOREIGN'
this.pageInfo()
} else if (this.sarAccessInfo.dataSource === 'FOREIGN_LAWS') {
this.sarAccessInfo.standType = 'LAWS'
this.pageInfo()
} else if (this.sarAccessInfo.dataSource === 'BUSINESS') {
this.sarAccessInfo.standType = 'BUSINESS'
this.pageInfo()
}
},
pageInfo() {
if (this.sarAccessInfo.dataSource === 'INLAND_STAND' || this.sarAccessInfo.dataSource === 'FOREIGN_STAND') {
StandardsInfoPage((this.sarAccessInfo)).then(res => {
this.standinfoList = res.data.list
this.standinfoList.forEach(item => {
if (item.standYear === null) {
item.standNumber = item.standSortShow + ' ' + item.standNumber
} else {
item.standNumber = item.standSortShow + ' ' + item.standNumber + '-' + item.standYear
}
item.zrbm = item.attrInfoCaseMap.zrbm
item.sycpx = item.attrInfoCaseMap.sycpx
item.typeApplicable = item.attrInfoMap.CLLX
item.nylx = item.attrInfoMap.NYLX
})
this.total = res.data.count
}, e => {
})
} else if (this.sarAccessInfo.dataSource === 'FOREIGN_LAWS') {
this.$http.get('lawss/sarLawsInfo/page', this.sarAccessInfo, {
_this: this,
}, res => {
this.sarAccessInfoSearchList = res.data.list
this.drawerTotal = res.data.count
}, e => {
})
} else if (this.sarAccessInfo.dataSource === 'BUSINESS') {
this.$http.get('lawss/sarBussionessStand/getSarBussionStandPage', this.sarAccessInfo, {
_this: this,
}, res => {
this.sarAccessInfoSearchList = res.data.list
this.drawerTotal = res.data.count
}, e => {
})
}
},
// 更新LOG关闭
relateDialogClose() {
this.relateDialog = false;
this.relateNowList = [];
},
// 更新LOG
relateEvent() {
this.$http.get("lawss/sarUpdLog/getLogList", {
sarId: this.$route.params.id,
sarType: "ACCESS"
}, {
_this: this
}, res => {
if (res.data.length > 0) {
this.relateDialog = true;
this.relateList = res.data;
var i;
for (i = 0; i < this.relateList.length; i++) {
let obj = { creationUserName: "", creationTime: "", content: "" };
obj.creationUserName = this.relateList[i].creationUserName;
obj.creationTime = this.relateList[i].creationTime;
obj.content = this.relateList[i].content;
this.relateNowList.push(obj);
}
} else {
this.$message({
message: "暂无数据",
type: "warning"
});
}
}, e => {
});
},
// 根据准入id查询标准法规详情
selectInfobyAccid() {
this.standInfoTableLoading = true
if(this.sarAccessEO.sortKey === '1'){
this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById", {
...this.sarAccessInfo,
...this.standardForm,
id: this.pageId,
types: '1',
}, {
_this: this
}, res => {
if (res.data !== null) {
res.data.records.forEach(item => {
if (item.nylx === "[]") {
item.nylx = null;
}
if (item.typeApplicable === "[]") {
item.typeApplicable = null;
}
if (item.sycpx === "[]") {
item.sycpx = null;
}
if(item.zrbm === "[]"){
item.zrbm = null
}
if (item.zccssrqgj === "undefined") {
item.zccssrqgj = ''
}
if (item.xcxssrqgj === "undefined") {
item.xcxssrqgj = ''
}
if (item.ssrq === "undefined" || item.ssrq === 'null' || item.ssrq) {
item.ssrq = ''
}
});
this.standinfoList = res.data.records;
this.standardFormTotal = res.data.total;
this.standinfoList.forEach(item => {
if (item.standYear === null) {
item.standNumber = item.standSortShow + " " + item.standNumber;
} else {
item.standNumber = item.standSortShow + " " + item.standNumber + "-" + item.standYear;
}
});
this.standInfoTableLoading = false
} else {
this.standinfoList = []
this.standInfoTableLoading = false
}
}, e => {
this.standInfoTableLoading = false
});
}else{
this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById", {
...this.sarAccessInfo,
...this.standardForm,
id: this.pageId
}, {
_this: this
}, res => {
if (res.data !== null) {
res.data.records.forEach(item => {
if (item.nylx === "[]") {
item.nylx = null;
}
if (item.typeApplicable === "[]") {
item.typeApplicable = null;
}
if (item.sycpx === "[]") {
item.sycpx = null;
}
if(item.zrbm === "[]"){
item.zrbm = null
}
});
this.standinfoList = res.data.records;
this.standardFormTotal = res.data.total;
this.standinfoList.forEach(item => {
if (item.standYear === null) {
item.standNumber = item.standSortShow + " " + item.standNumber;
} else {
item.standNumber = item.standSortShow + " " + item.standNumber + "-" + item.standYear;
}
});
this.standInfoTableLoading = false
} else {
this.standinfoList = []
}
}, e => {
this.standInfoTableLoading = false
});
}
},
selectInfoMore() {
this.$http.get("sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById", {
...this.sarAccessInfo,
id: this.pageId
}, {
_this: this
}, res => {
if (res.data !== null) {
res.data.records.forEach(item => {
if (item.nylx === "[]") {
item.nylx = null;
}
if (item.typeApplicable === "[]") {
item.typeApplicable = null;
}
if (item.sycpx === "[]") {
item.sycpx = null;
}
if(item.zrbm === "[]"){
item.zrbm = null
}
});
this.standinfoList = res.data.records;
} else {
this.standinfoList = []
}
this.standardFormTotal = res.data.total;
this.standinfoList.forEach(item => {
if (item.standYear === null) {
item.standNumber = item.standSortShow + " " + item.standNumber;
} else {
item.standNumber = item.standSortShow + " " + item.standNumber + "-" + item.standYear;
}
});
}, e => {
});
},
back() {
this.$router.push({ name: "AccessStandardsAndRegulations" });
// this.$router.push(this.$store.state.detailMap)
// this.$store.commit('setDetailMap', '')
},
// 搜索
selectProductBtn() {
this.page = 1;
this.standardForm.page = 1;
this.selectInfobyAccid();
},
// 重置搜索
resetSelect() {
this.standardForm.zrbm = "";
this.standardForm.standName = "";
this.standardForm.standNumber = "";
this.standardForm.responseUnit = "";
this.selectInfobyAccid();
this.selectInfoMore();
},
exportStandard() {
if (this.selectedList.length > 0) {
this.saveExportType = "apart";
} else {
this.saveExportType = "all";
}
this.exportName = "";
this.exportModelFlag = true;
},
// 导出取消按钮关闭模态、置空
cancal() {
this.exportModelFlag = false;
},
// 导出确定功能
//确认导出
exportTestItem() {
if(this.sarAccessEO.sortKey === '1'){
if (this.saveExportType === "apart") {
if (this.selectedList != null && this.selectedList != "") {
const exportURL = interfaceUrl + "sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById?" + "type=" + 1 +
"&exportType" + this.saveExportType + "&ids=" + this.selectedList.join(",") + "&exportName=" + this.exportName;
window.open(exportURL);
this.$message.success("导出信息成功");
}
} else if (this.saveExportType === "all") {
const exportURL = interfaceUrl + "sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById?" + "type=" + 1 +
"&exportType" + this.saveExportType + "&id=" + this.pageId + "&exportName=" + this.exportName;
window.open(exportURL);
this.$message.success("导出信息成功");
}
}else{
if (this.saveExportType === "apart") {
if (this.selectedList != null && this.selectedList != "") {
const exportURL = interfaceUrl + "sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById?" +
"exportType" + this.saveExportType + "&ids=" + this.selectedList.join(",") + "&exportName=" + this.exportName;
window.open(exportURL);
this.$message.success("导出信息成功");
}
} else if (this.saveExportType === "all") {
const exportURL = interfaceUrl + "sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById?" +
"exportType" + this.saveExportType + "&id=" + this.pageId + "&exportName=" + this.exportName;
window.open(exportURL);
this.$message.success("导出信息成功");
}
}
this.exportModelFlag = false;
this.selectedList = [];
},
// tab页切换
handleClick(tab, event) {
this.activeName = tab.name;
this.page = 1;
this.standardForm.page = 1;
this.selectedList = [];
this.selectInfobyAccid();
},
// 修改成表格样式后,选择项勾选改变
standSelectChange(data) {
this.selectedList = [];
for (let i = 0; i < data.length; i++) {
this.selectedList.push(data[i].id);
}
},
pageChange(page) {
this.standardForm.page = page;
this.selectInfobyAccid();
},
pageSizeChange(pageSize) {
this.standardForm.Size = this.$store.getters.userInfo.configContent;
this.selectInfobyAccid();
},
// 请求部门结构树
getOrgTreeSource() {
this.$http.get("sys/org/getTree", {}, { _this: this },
res => {
if (res.ok) {
let treeNode = [];
res.data.map((item, index) => {
let treeItem = {};
for (let key in item) {
if (key === "orgName") {
treeItem.name = item[key];
} else {
treeItem[key] = item[key];
}
}
treeNode[index] = treeItem;
});
this.depNode = treeNode;
}
});
},
// 责任部门 树点击
treeDblAuthDepartClick(treeId, treeNode) {
this.standardForm.departName = treeNode.name;
this.standardForm.depart = treeNode.id;
$("#depBtnsAuth").click();
},
// 请求上传的文件信息
getFileInfo() {
this.$http.get("att/attFile/getMultiFileInfos", {
fileIds: this.sarAccessEO.fileIds
}, {
_this: this
}, res => {
this.$nextTick(() => {
res.data.map(item => {
// 赋值要回显的上传文件内容
this.fileInfoList.push({
name: item.oldFileName,
uid: item.uid,
status: item.status,
id: item.id
});
});
});
}, e => {
});
},
// 附件下载事件
fileDownLoad(attId) {
window.location.href = "/api/att/attFile/downloadFile?fileId=" + attId;
},
// 点击查看
handlePreview(data) {
let item = {
country: this.countryAreaShow,
ssrq: data.ssrq,
xcxssrqgj: data.xcxssrqgj,
zccssrqgj: data.zccssrqgj
}
sessionStorage.setItem("accessCountry", JSON.stringify(item));
let routeUrl = this.$router.resolve({
name: "OtherStandardDetails",
params: {
id: data.id,
pageType: data.standType,
}
});
window.open(routeUrl.href, "_blank");
},
/**
* @Description: 点击下载
* @author zmf
* @date 2021/3/16
*/
downloadFile(attId) {
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
} else {
this.$message.error("请选择要下载的文件");
}
},
downloadFileByWater(attId, fileSuffix) {
let fileExtension = fileSuffix.substring(fileSuffix.lastIndexOf(".") + 1);
if (fileExtension !== "pdf" && fileExtension !== "PDF") {
this.$message.error("水印下载仅支持PDF,pdf格式文件");
} else {
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSarWaterMark?fileId=" + attId;
} else {
this.$message.error("请选择要下载的文件");
}
}
},
//
changeState(row) {
let routeUrl = this.$router.resolve({
name: "OtherStandardDetails",
query: {
id: data.id,
pageType: this.standType
}
});
window.open(routeUrl.href, "_blank");
},
/**
* 高级检索
*/
selectMoreBtn() {
this.standardForm.zrbm = ''
this.standardForm.responseUnit = ''
this.standardForm.standName = ''
this.standardForm.standNumber = ''
this.showTableFlag = false;
this.showQueryMore = true;
this.page = 1;
this.standardForm.page = 1;
// this.selectInfoMore();
},
queryInfo() {
this.page = 1;
this.standardForm.page = 1;
this.selectInfoMore();
this.isAdvancedSearch = false;
},
backInfo() {
this.sarAccessInfo.standName = "";
this.sarAccessInfo.typeApplicable = "";
this.sarAccessInfo.nylx = "";
this.sarAccessInfo.zrbm = "";
this.sarAccessInfo.sycpx = "";
this.isAdvancedSearch = false;
},
// 获取工作组信息下拉框信息
getGzzOption() {
this.$http.get("lawss/sarGroupMenu/queryGroup", "", {
_this: this
}, res => {
if (res.ok) {
let gzzxxOptions = [];
res.data.map(item => {
gzzxxOptions.push({
value: item.id,
label: item.menuName
});
});
this.allSelectOptions.GZZXX = gzzxxOptions;
}
});
},
/**
* @Description: 选择颜色
* @author zmf
* @date 2021/3/10
*/
chooseColor(item, num) {
// if (this.$_has('KJJ6U32LFL4PAK5C6P55')) {
// return
// }
this.dialogColor = true;
this.colorRow = item;
this.dialogType = num;
},
doLayout() {
this.$refs.adminTable && this.$refs.adminTable.doLayout();
this.$refs.skillTable && this.$refs.skillTable.doLayout();
},
// 将文本状态的id与name对应
setMap(data) {
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label);
});
}
},
mounted() {
this.$nextTick(() => {
let accessRow = JSON.parse(sessionStorage.getItem("accessRow"));
this.pageId = accessRow.id;
this.sarAccessEO = accessRow;
this.countryAreaShow = accessRow.countryAreaShow
this.selectInfobyAccid();
this.getOrgTreeSource();
this.getFileInfo();
// this.sarAccessEOInfo = this.sarAccessEO.countryArea.indexOf(',')
});
// 从数据库中查询各下拉框数据
this.$http.get("sys/dictype/getDicTypeListCode", "", {
_this: this
}, res => {
this.allSelectOptions = res.data || {};
this.regionOptions = res.data.REGION; // 基础信息 区域list
this.energyKindOptions = res.data.ENERGYTYPES || []; // 能源种类list
this.drawerCountryOptions = res.data.COUNTRY; // 国家、地区list
this.standNatureOptions = res.data.SARPROPERTY; // 新增 标准性质
this.accessSarTypeOptions = res.data.REQUESTTYPE; // 数据搜索 要求类型
this.standSortOptions = res.data.STANDCLASSIFY; // 标准类别
this.standStateOptions = res.data.STANDSTATE; // 标准状态
this.ROLELIST = res.data.ROLELIST;
this.GXHBQOptions = res.data.GXHBQXX;
this.askNatureOptions = res.data.ACCESSTYPE;
this.zrbmOptions = res.data.ZRBMCLASS; // 责任部门
this.categoryOptions = res.data.NYLXCLASS; // 能源类型
this.textStatusOptions = res.data.WBZTCLASS; // 文本状态
this.sycpxOptions = res.data.SYCPXCLASS; // 适用产品线
this.lawsSycxOptions = res.data.lawsSycx // 国内外政策适用车型
this.YYRZLAWSOptions = res.data.YYRZLAWS // 国内外政策适用认证
// 企标文本状态
this.textStatusBussOptions = res.data.BUSSSTATE
// 适用车型
this.applySYCX.options = res.data.ENERGYTYPES
// 适用认证
this.applySYRZ.options = res.data.SYRZCLASS
this.setMap(this.textStatusOptions);
this.getGzzOption();
}, e => {
});
}
};
</script>
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
@import '~@/assets/styles/style';
.details {
height: 100%;
display: flex;
flex-direction: column;
.iconClass {
width: 18px;
height: 18px;
}
.contentTitle {
display: flex;
align-items: center;
padding: 0 10px;
height: 50px;
background: #ffffff;
.title {
flex: 1;
font-weight: bold;
font-size: 20px;
margin-left: 15px;
.el-icon-s-order {
font-size: 22px;
color: #4498F0;
cursor: pointer;
}
}
}
.transition-box {
padding: 0 10px;
background: #ffffff;
font-size: 14px;
.transition-box-p {
line-height: 35px;
.transition-box-label {
display: inline-block;
width: 100px;
vertical-align: top;
}
.transition-box-span {
display: inline-block;
width: calc(~'100% - 100px');
}
.file-box {
display: inline-block;
width: calc(~'100% - 100px');
.transition-box-span {
display: inline;
width: 100%;
cursor: pointer;
color: #4498f0;
}
p {
& > a {
cursor: pointer;
}
& > i {
display: inline-block;
margin-left: 3px;
width: 18px;
height: 16px;
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center center;
vertical-align: sub;
cursor: pointer;
}
.icon-download {
background-image: url("~assets/images/shangqi/img/download.png");
}
.icon-download2 {
background-image: url("~assets/images/shangqi/img/download2.png");
}
}
}
}
}
.container {
//height: calc(~'100% - 52px - 55px - 50px');
flex: auto;
display: flex;
flex-direction: column;
.el-tabs {
height: 100%;
display: flex;
flex-direction: column;
flex: auto;
/deep/ .el-tabs__content {
//height: calc(~'100% - 55px');
overflow-y: auto;
flex: auto;
display: flex;
flex-direction: column;
.el-tab-pane {
height: 100%;
flex: auto;
display: flex;
flex-direction: column;
}
}
}
}
.labelForm {
margin-top: 20px;
}
/deep/ .relateClass {
& > button {
height: 30px;
line-height: 30px;
font-size: 14px;
padding: 0 10px;
font-family: 'Microsoft Yahei', '\5FAE\8F6F\96C5\9ED1', Arial, sans-serif !important;
}
& i {
display: inline-block;
margin-right: 3px;
width: 18px;
height: 18px;
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center center;
vertical-align: text-bottom;
}
.relation-btn {
color: #409EFF;
border: 1px solid #409EFF;
background: rgba(64, 158, 255, 0.1);
.icon-relation {
background-image: url("~assets/images/shangqi/standardDetails/relation.png");
}
}
}
/deep/ .showBox {
width: 300px;
}
.iconClass {
width: 18px;
height: 18px;
}
.iconClassDia {
width: 30px;
height: 30px;
}
.picBorder {
border: 1px solid #409eff;
}
.add-border {
/*width: 80px;*/
height: 80px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer
}
}
.relateClass {
.el-dialog__body {
max-height: 460px;
overflow-y: auto;
}
}
</style>