标准清单数据新增编辑列表

This commit is contained in:
shen_yan_pu
2021-07-27 11:29:23 +08:00
parent 986bb091e7
commit fd7342e865
4 changed files with 136 additions and 168 deletions
@@ -80,7 +80,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="标准名称" v-if="sarAccessInfoSearch.dataSource !== 'TEMP'" class="search-item">
<el-form-item label="标准名称" class="search-item">
<el-input
v-model="sarAccessInfoSearch.standName"
placeholder="请输入"
@@ -107,28 +107,6 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="国家/地区" class="search-item" v-show="isListType">
<el-select
v-model="sarAccessInfoSearch.countryArea"
placeholder="请选择"
filterable
>
<el-option
v-for="item in drawerCountryOptions"
:value="item.value"
:key="item.value"
:label="item.label"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="清单名称" prop="detailedListName" class="search-item" v-show="isListType">
<el-input
v-model="sarAccessInfoSearch.detailedListName"
placeholder="请输入"
:maxlength="100"
></el-input>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
type="primary"
@@ -158,10 +136,17 @@
</div>
</div>
<div class="showSelectBox" v-if="!showSelectBox">
<el-form :model="sarAccessInfoSearch" class="label-input-form" v-if="!disabledFlag" inline>
<el-form-item label="文本状态" v-show="!isListType">
<el-form :model="sarAccessInfo" class="label-input-form" v-if="!disabledFlag" inline>
<el-form-item label="标准名称" class="search-item">
<el-input
v-model="sarAccessInfo.standName"
placeholder="请输入"
size="small"
clearable/>
</el-form-item>
<el-form-item label="文本状态">
<el-select
v-model="sarAccessInfoSearch.textStatus"
v-model="sarAccessInfo.textStatus"
placeholder="请选择"
filterable
size="small"
@@ -174,9 +159,9 @@
/>
</el-select>
</el-form-item>
<el-form-item label="发布日期" v-show="!isListType">
<el-form-item label="发布日期" >
<el-date-picker
v-model="sarAccessInfoSearch.issueTime"
v-model="sarAccessInfo.issueTime"
type="date"
value-format="yyyy-MM-DD"
size="small"
@@ -243,13 +228,12 @@
width="180px"
label="标准号">
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standNumber }}</a>
<span @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standNumber }}</span>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称"
width="260px"
>
</el-table-column>
<el-table-column
@@ -287,52 +271,6 @@
</template>
</el-table-column>
</el-table>
<el-table
v-show="isListType"
:data="sarAccessInfoSearchList"
style="width: 100%"
border
height="300px"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="accessSarTypeSelect"
ref="accessTypeSelect"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="country"
label="国家/地区"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.country !== null && scope.row.country.indexOf(',') > 0">
<span>{{ scope.row.country }}</span>
</span>
<span v-else>{{ countryAreaMap[scope.row.country] }}</span>
</template>
</el-table-column>
<el-table-column
prop="detailedListName"
label="清单名称"
align="center">
</el-table-column>
<el-table-column
prop="modifyTime"
label="更新时间"
align="center">
<template slot-scope="scope">
<div>{{ scope.row.modifyTime ? scope.row.modifyTime.split(' ')[0] : '' }}</div>
</template>
</el-table-column>
<el-table-column
prop="uname"
label="更新人"
align="center">
</el-table-column>
</el-table>
<pagination :page="drawerPage" :total="drawerTotal" @pageChange="drawerPageChange"
@pageSizeChange="drawerPageSizeChange"></pagination>
<loading :loading="dataLoading">{{$t('m.dataAcquisition')}}</loading>
@@ -746,7 +684,7 @@ export default {
{value: 'FOREIGN_STAND', label: '海外标准法规'},
//{value: 'FOREIGN_LAWS', label: '国内外政策'},
// {value: 'BUSINESS', label: '企业标准 '},
{value: 'TEMP', label: '标准法规清单 '}
// {value: 'TEMP', label: '标准法规清单 '}
],
// 新增、编辑 数据搜索字段
sarAccessInfoSearch: {
@@ -766,6 +704,22 @@ export default {
validFlag: 0,
advanceSearchVOStr: ''
},
sarAccessInfo: {
id: '',
issueTime: '',
standName: '',
textStatus: '',
// applicationScope: '', //适用区域
keywords: '', // 关键字
detailedListName: '', //清单名称
applyArctic: '', // 能源种类
askType: '', // 监管类型
dataSource: 'INLAND_STAND', // 数据来源
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
validFlag: 0,
advanceSearchVOStr: ''
},
moreSearchBtn: true, // 多属性搜索按钮 状态
showTableFlag: true, // 显示添加列表 状态
showSelectBox: true, // 显示高级查询 状态
@@ -1474,7 +1428,12 @@ export default {
},
// 查询数据搜索 table 数据
selectLawsStands () {
StandardsInfoPage(this.sarAccessInfoSearch).then(res =>{
if (this.sarAccessInfoSearch.dataSource === 'INLAND_STAND') {
this.sarAccessInfoSearch.dataSource = 'INLAND_STAND'
} else {
this.sarAccessInfoSearch.standType = 'FOREIGN'
}
StandardsInfoPage(this.sarAccessInfoSearch, this.sarAccessInfo).then(res =>{
this.sarAccessInfoSearchList = res.data.list
this.sarAccessInfoSearchList.forEach(item => {
if (item.standYear === null) {
@@ -1482,8 +1441,6 @@ export default {
} else {
item.standNumber = item.standSortShow + ' ' + item.standNumber + '-' + item.standYear
}
})
this.sarAccessInfoSearchList.forEach(item => {
this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQGJ)
this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQGJ)
this.$set(item, 'sycpx', item.attrInfoMap.SYCPX)
@@ -191,13 +191,13 @@
align="center">
</el-table-column>
<el-table-column
prop="code"
prop="standNumber"
fixed="left"
width="180px"
align="center"
label="标准号">
<template slot-scope="scope">
<a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standNumber }}</a>
<span class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standNumber }}</span>
</template>
</el-table-column>
<el-table-column
@@ -491,6 +491,13 @@ export default {
_this: this
}, res => {
this.standinfoList = res.data;
this.standinfoList.forEach(item => {
if (item.standYear === null) {
item.standNumber = item.standSortShow + ' ' + item.standNumber
} else {
item.standNumber = item.standSortShow + ' ' + item.standNumber + '-' + item.standYear
}
})
this.total = res.data.total;
}, e => {
@@ -115,7 +115,11 @@
@click="clearSearchLaws">清空</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" class="common-button-primary" size="mini" @click="selectMoreBtn">
<el-button type="primary" v-if="showSelectBox" class="common-button-primary" size="mini" @click="selectMoreBtn">
<i class="iconfont">&#xe7a5;</i>
高级查询
</el-button>
<el-button type="primary" v-if="!showSelectBox" class="common-button-primary" size="mini" @click="selectMoreBtn">
<i class="iconfont">&#xe7a5;</i>
高级查询
</el-button>
@@ -124,10 +128,17 @@
</div>
</div>
<div class="showSelectBox" v-if="!showSelectBox">
<el-form :model="sarAccessInfoSearch" class="label-input-form" label-width="70px" v-if="!disabledFlag" inline>
<el-form-item label="文本状态" v-show="!isListType">
<el-form :model="sarAccessInfo" class="label-input-form" v-if="!disabledFlag" inline>
<el-form-item label="标准名称" class="search-item">
<el-input
v-model="sarAccessInfo.standName"
placeholder="请输入"
size="small"
clearable/>
</el-form-item>
<el-form-item label="文本状态">
<el-select
v-model="sarAccessInfoSearch.textStatus"
v-model="sarAccessInfo.textStatus"
placeholder="请选择"
filterable
size="small"
@@ -140,23 +151,15 @@
/>
</el-select>
</el-form-item>
<el-form-item label="发布日期" v-show="!isListType">
<el-form-item label="发布日期" >
<el-date-picker
v-model="sarAccessInfoSearch.issueTime"
v-model="sarAccessInfo.issueTime"
type="date"
value-format="yyyy-MM-DD"
size="small"
placeholder="选择发布日期">
</el-date-picker>
</el-form-item>
<el-form-item label="项目类别" v-show="isListType">
<el-input
size="small"
v-model="sarAccessInfoSearch.standSystem"
placeholder="请输入"
:maxlength="100"
></el-input>
</el-form-item>
<el-form-item label="更新人" v-show="isListType">
<el-input
v-model="sarAccessInfoSearch.standName"
@@ -223,7 +226,6 @@
<el-table-column
prop="standName"
label="标准名称"
width="260px"
>
</el-table-column>
<el-table-column
@@ -525,7 +527,7 @@ import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
import stand from "../../../config/pages/attributeCustom/components/stand";
import { mapGetters } from 'vuex'
import {interfaceUrl} from "@/sysConfig";
import {dicTypeData} from "@/api/unqualProcess";
import {dicTypeData, StandardsInfoPage} from "@/api/unqualProcess";
export default {
name: 'OtherAddEit',
components: {
@@ -607,9 +609,9 @@ export default {
dataSourceOptions: [
{value: 'INLAND_STAND', label: '国内标准法规'},
{value: 'FOREIGN_STAND', label: '海外标准法规'},
{value: 'FOREIGN_LAWS', label: '国内外政策'},
// {value: 'FOREIGN_LAWS', label: '国内外政策'},
// {value: 'BUSINESS', label: '企业标准 '},
{value: 'TEMP', label: '标准法规清单 '}
// {value: 'TEMP', label: '标准法规清单 '}
],
// 新增、编辑 数据搜索字段
sarAccessInfoSearch: {
@@ -626,6 +628,22 @@ export default {
validFlag: 0,
advanceSearchVOStr: ''
},
sarAccessInfo: {
id: '',
issueTime: '',
standName: '',
textStatus: '',
// applicationScope: '', //适用区域
keywords: '', // 关键字
detailedListName: '', //清单名称
applyArctic: '', // 能源种类
askType: '', // 监管类型
dataSource: 'INLAND_STAND', // 数据来源
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
validFlag: 0,
advanceSearchVOStr: ''
},
moreSearchBtn: true, // 多属性搜索按钮 状态
showTableFlag: true, // 显示添加列表 状态
sarAccessInfoSearchList: [], // 数据搜索 table列表数据
@@ -1278,9 +1296,12 @@ export default {
},
// 查询数据搜索 table 数据
selectLawsStands () {
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage', this.sarAccessInfoSearch, {
_this: this
}, res =>{
if (this.sarAccessInfoSearch.dataSource === 'INLAND_STAND') {
this.sarAccessInfoSearch.dataSource = 'INLAND_STAND'
} else {
this.sarAccessInfoSearch.standType = 'FOREIGN'
}
StandardsInfoPage(this.sarAccessInfoSearch, this.sarAccessInfo).then(res =>{
this.sarAccessInfoSearchList = res.data.list
this.sarAccessInfoSearchList.forEach(item => {
if (item.standYear === null) {
@@ -1288,8 +1309,6 @@ export default {
} else {
item.standNumber = item.standSortShow + ' ' + item.standNumber + '-' + item.standYear
}
})
this.sarAccessInfoSearchList.forEach(item => {
this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQGJ)
this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQGJ)
this.$set(item, 'sycpx', item.attrInfoMap.SYCPX)
@@ -1303,7 +1322,6 @@ export default {
})
this.drawerTotal = res.data.list.length
}, e => {
})
},
// 数据搜索table判断checked状态
@@ -65,7 +65,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="标准名称" v-if="sarAccessInfoSearch.dataSource !== 'TEMP'" class="search-item">
<el-form-item label="标准名称" class="search-item">
<el-input
v-model="sarAccessInfoSearch.standName"
placeholder="请输入"
@@ -128,10 +128,17 @@
</div>
</div>
<div class="showSelectBox" v-if="!showSelectBox">
<el-form :model="sarAccessInfoSearch" class="label-input-form" label-width="70px" v-if="!disabledFlag" inline>
<el-form-item label="文本状态" v-show="!isListType">
<el-form :model="sarAccessInfo" class="label-input-form" v-if="!disabledFlag" inline>
<el-form-item label="标准名称" class="search-item">
<el-input
v-model="sarAccessInfo.standName"
placeholder="请输入"
size="small"
clearable/>
</el-form-item>
<el-form-item label="文本状态">
<el-select
v-model="sarAccessInfoSearch.textStatus"
v-model="sarAccessInfo.textStatus"
placeholder="请选择"
filterable
size="small"
@@ -144,23 +151,15 @@
/>
</el-select>
</el-form-item>
<el-form-item label="发布日期" v-show="!isListType">
<el-form-item label="发布日期" >
<el-date-picker
v-model="sarAccessInfoSearch.issueTime"
v-model="sarAccessInfo.issueTime"
type="date"
value-format="yyyy-MM-DD"
size="small"
placeholder="选择发布日期">
</el-date-picker>
</el-form-item>
<el-form-item label="项目名称" v-show="isListType">
<el-input
size="small"
v-model="sarAccessInfoSearch.standSystem"
placeholder="请输入"
:maxlength="100"
></el-input>
</el-form-item>
<el-form-item label="更新人" v-show="isListType">
<el-input
v-model="sarAccessInfoSearch.standName"
@@ -227,7 +226,6 @@
<el-table-column
prop="standName"
label="标准名称"
width="260px"
>
</el-table-column>
<el-table-column
@@ -265,46 +263,6 @@
</template>
</el-table-column>
</el-table>
<el-table
v-show="isListType"
:data="sarAccessInfoSearchList"
style="width: 100%"
border
height="300px"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="accessSarTypeSelect"
ref="accessTypeSelect"
>
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="projectName"
label="项目名称"
align="center">
</el-table-column>
<el-table-column
prop="detailedListName"
label="清单名称"
align="center">
</el-table-column>
<el-table-column
prop="modifyTime"
label="更新时间"
align="center">
<template slot-scope="scope">
<div>{{ scope.row.modifyTime ? scope.row.modifyTime.split(' ')[0] : '' }}</div>
</template>
</el-table-column>
<el-table-column
prop="uname"
label="更新人"
align="center">
</el-table-column>
</el-table>
<pagination :page="drawerPage" :total="drawerTotal" @pageChange="drawerPageChange"
@pageSizeChange="drawerPageSizeChange"></pagination>
<loading :loading="dataLoading">{{$t('m.dataAcquisition')}}</loading>
@@ -519,7 +477,7 @@ import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
import stand from "../../../config/pages/attributeCustom/components/stand";
import { mapGetters } from 'vuex'
import {interfaceUrl} from "@/sysConfig";
import {dicTypeData} from "@/api/unqualProcess";
import {dicTypeData, StandardsInfoPage} from "@/api/unqualProcess"
export default {
name: 'OtherAddEit',
components: {
@@ -601,9 +559,9 @@ export default {
dataSourceOptions: [
{value: 'INLAND_STAND', label: '国内标准法规'},
{value: 'FOREIGN_STAND', label: '海外标准法规'},
{value: 'FOREIGN_LAWS', label: '国内外政策'},
// {value: 'FOREIGN_LAWS', label: '国内外政策'},
// {value: 'BUSINESS', label: '企业标准 '},
{value: 'TEMP', label: '标准法规清单 '}
// {value: 'TEMP', label: '标准法规清单 '}
],
// 新增、编辑 数据搜索字段
sarAccessInfoSearch: {
@@ -620,6 +578,22 @@ export default {
validFlag: 0,
advanceSearchVOStr: ''
},
sarAccessInfo: {
id: '',
issueTime: '',
standName: '',
textStatus: '',
// applicationScope: '', //适用区域
keywords: '', // 关键字
detailedListName: '', //清单名称
applyArctic: '', // 能源种类
askType: '', // 监管类型
dataSource: 'INLAND_STAND', // 数据来源
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
validFlag: 0,
advanceSearchVOStr: ''
},
moreSearchBtn: true, // 多属性搜索按钮 状态
showTableFlag: true, // 显示添加列表 状态
showSelectBox: true, // 显示高级查询 状态
@@ -1276,9 +1250,12 @@ export default {
},
// 查询数据搜索 table 数据
selectLawsStands () {
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage', this.sarAccessInfoSearch, {
_this: this
}, res =>{
if (this.sarAccessInfoSearch.dataSource === 'INLAND_STAND') {
this.sarAccessInfoSearch.dataSource = 'INLAND_STAND'
} else {
this.sarAccessInfoSearch.standType = 'FOREIGN'
}
StandardsInfoPage(this.sarAccessInfoSearch, this.sarAccessInfo).then(res =>{
this.sarAccessInfoSearchList = res.data.list
this.sarAccessInfoSearchList.forEach(item => {
if (item.standYear === null) {
@@ -1286,10 +1263,19 @@ export default {
} else {
item.standNumber = item.standSortShow + ' ' + item.standNumber + '-' + item.standYear
}
this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQGJ)
this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQGJ)
this.$set(item, 'sycpx', item.attrInfoMap.SYCPX)
this.$set(item, 'typeApplicable', item.attrInfoMap.CLLX)
this.$set(item, 'nylx', item.attrInfoMap.NYLX)
this.$set(item, 'zrbm', item.attrInfoMap.ZRBM)
this.$set(item, 'cycvppsbm', item.attrInfoMap.CYCVPPSBM)
this.$set(item, 'cycvppscn', item.attrInfoMap.CYCVPPSCN)
this.$set(item, 'kccvppsbm', item.attrInfoMap.KCCVPPSBM)
this.$set(item, 'kccvppscn', item.attrInfoMap.KCCVPPSCN)
})
this.drawerTotal = res.data.list.length
}, e => {
})
},
// 数据搜索table判断checked状态