标准清单数据新增时列表出现value变为文字

This commit is contained in:
shen_yan_pu
2021-07-24 16:54:02 +08:00
parent 8cfb143058
commit 33e84ae2bb
5 changed files with 422 additions and 277 deletions
+14
View File
@@ -24,3 +24,17 @@ export function uploadFileText (data) {
params: data params: data
}) })
} }
export function dicTypeData (data) {
return axios({
url: 'api/sys/dictype/getDicTypeListCode',
method: 'get',
params: data
})
}
export function StandardsInfoPage (data) {
return axios({
url: 'api/sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',
method: 'get',
params: data
})
}
@@ -80,7 +80,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标准名称" class="search-item"> <el-form-item label="标准名称" v-if="sarAccessInfoSearch.dataSource !== 'TEMP'" class="search-item">
<el-input <el-input
v-model="sarAccessInfoSearch.standName" v-model="sarAccessInfoSearch.standName"
placeholder="请输入" placeholder="请输入"
@@ -159,14 +159,6 @@
</div> </div>
<div class="showSelectBox" v-if="!showSelectBox"> <div class="showSelectBox" v-if="!showSelectBox">
<el-form :model="sarAccessInfoSearch" class="label-input-form" v-if="!disabledFlag" inline> <el-form :model="sarAccessInfoSearch" class="label-input-form" v-if="!disabledFlag" inline>
<el-form-item label="标准名称" class="search-item" v-show="!isListType">
<el-input
v-model="sarAccessInfoSearch.standName"
placeholder="请输入"
:maxlength="100"
size="small"
/>
</el-form-item>
<el-form-item label="文本状态" v-show="!isListType"> <el-form-item label="文本状态" v-show="!isListType">
<el-select <el-select
v-model="sarAccessInfoSearch.textStatus" v-model="sarAccessInfoSearch.textStatus"
@@ -191,15 +183,6 @@
placeholder="选择发布日期"> placeholder="选择发布日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item lable="更新时间" v-show="isListType">
<el-date-picker
v-model="sarAccessInfoSearch.modifyTime"
type="date"
value-format="yyyy-MM-DD"
size="small"
placeholder="选择发布日期">
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" v-show="isListType"> <el-form-item label="更新人" v-show="isListType">
<el-input <el-input
v-model="sarAccessInfoSearch.standName" v-model="sarAccessInfoSearch.standName"
@@ -207,6 +190,15 @@
:maxlength="100" :maxlength="100"
size="small"/> size="small"/>
</el-form-item> </el-form-item>
<el-form-item label="更新时间" v-show="isListType">
<el-date-picker
v-model="sarAccessInfoSearch.modifyTime"
type="date"
size="small"
value-format="yyyy-MM-DD"
placeholder="选择更新日期">
</el-date-picker>
</el-form-item>
</el-form> </el-form>
</div> </div>
<div class="action-bar"> <div class="action-bar">
@@ -403,18 +395,12 @@
align="center" align="center"
width="180px" width="180px"
label="适用车型"> label="适用车型">
<template slot-scope="scope">
<span>{{ typeApplicableMap[scope.row.typeApplicable] }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="nylx" prop="nylx"
align="center" align="center"
width="180px" width="180px"
label="能源类型"> label="能源类型">
<template slot-scope="scope">
<span>{{ nylxMap[scope.row.nylx] }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="putTime" prop="putTime"
@@ -453,9 +439,6 @@
width="210px" width="210px"
align="center" align="center"
label="责任部门"> label="责任部门">
<template slot-scope="scope">
<span>{{ zrbmMap[scope.row.zrbm] }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
@@ -463,9 +446,6 @@
width="180px" width="180px"
align="center" align="center"
label="适用产品线"> label="适用产品线">
<template slot-scope="scope">
<span>{{ sycpxMap[scope.row.sycpx] }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
@@ -495,7 +475,7 @@
width="210px" width="210px"
label="卡车VPPS中文名称"> label="卡车VPPS中文名称">
</el-table-column> </el-table-column>
<el-table-column width="240" label="操作"> <el-table-column width="240" align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
class="common-button-default" class="common-button-default"
@@ -657,7 +637,7 @@ import CustomInputForPolicy from '@/components/CustomFormComponents/InputForPoli
import CustomRoleTree from '@/components/CustomFormComponents/roleTree' import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
import stand from "../../../config/pages/attributeCustom/components/stand"; import stand from "../../../config/pages/attributeCustom/components/stand";
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { editDataInfo } from '@/api/unqualProcess' import { dicTypeData, StandardsInfoPage } from '@/api/unqualProcess'
import {interfaceUrl} from "@/sysConfig"; import {interfaceUrl} from "@/sysConfig";
export default { export default {
name: 'ListOfStandardsAndRegulationsDetails', name: 'ListOfStandardsAndRegulationsDetails',
@@ -682,25 +662,6 @@ export default {
CustomRoleTree CustomRoleTree
}, },
data () { data () {
// let validatePass = (rule, value, callback) => {
// let list = []
// //sarAccessInfoListADMIN 可能不存在
// if (this.sarAccessInfoListADMIN.length > 0) {
// for (let a = 0; a < this.sarAccessInfoListADMIN.length;a++) {
// list.push(this.sarAccessInfoListADMIN[a].code)
// }
// }
// if (this.sarAccessInfoList.length > 0) {
// for (let b = 0; b < this.sarAccessInfoList.length;b++) {
// list.push(this.sarAccessInfoList[b].code)
// }
// }
// for (let c = 0; c < list.length; c++) {
// if (value === list[c]) {
// callback(new Error('此标准号已存在'))
// }
// }
// }
return { return {
textStatusMap: {}, textStatusMap: {},
countryAreaMap: {}, countryAreaMap: {},
@@ -708,7 +669,6 @@ export default {
nylxMap: {}, nylxMap: {},
zrbmMap: {}, zrbmMap: {},
sycpxMap: {}, sycpxMap: {},
zrbmOptions: [],
// 编辑抽屉状态 // 编辑抽屉状态
drawerEdit: false, drawerEdit: false,
// 编辑框数据 // 编辑框数据
@@ -762,8 +722,13 @@ export default {
drawerCountryOptions: [], // 基础信息 国家list drawerCountryOptions: [], // 基础信息 国家list
textStatusOptions: [], // 文本状态 textStatusOptions: [], // 文本状态
applyOptions: [], //基础信息适用领域list applyOptions: [], //基础信息适用领域list
applyArcticOptions: [], // 基础车型 适用车型list /** ****************************/
zrbmOptions: [], // 责任部门
categoryOptions: [], // 能源类型
energyKindOptions: [], // 能源种类list energyKindOptions: [], // 能源种类list
sycpxOptions: [], // 适用产品线
applyArcticOptions: [], // 基础车型 适用车型list
/** ******************************/
accessSarTypeOptions: [], // 要求类型list accessSarTypeOptions: [], // 要求类型list
standSortOptions: [], // 标准类别 standSortOptions: [], // 标准类别
standStateOptions: [], // 标准状态 standStateOptions: [], // 标准状态
@@ -1009,6 +974,20 @@ export default {
uuid: '', uuid: '',
} }
}, },
created() {
this.selectLawsStands()
dicTypeData().then(res => {
// 责任部门数据字典
this.zrbmOptions = res.data.ZRBMCLASS
// 能源类型数据字典
this.energyKindOptions = res.data.ENERGYTYPES
// this.categoryOptions = res.data.NYLXCLASS // 能源类型
// 适用车型数据字典
this.applyArcticOptions = res.data.PRODUCTTYPE
// 适用产品线数据字典
this.sycpxOptions = res.data.SYCPXCLASS
})
},
methods: { methods: {
// 高级检索 // 高级检索
selectMoreBtn () { selectMoreBtn () {
@@ -1427,7 +1406,6 @@ export default {
rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString()) rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString())
} }
} }
console.log(rowlist2)
rowlist = rowlist.join(',') rowlist = rowlist.join(',')
rowlist1 = rowlist1.join(',') rowlist1 = rowlist1.join(',')
rowlist2 = rowlist2.join(',') rowlist2 = rowlist2.join(',')
@@ -1487,22 +1465,9 @@ export default {
}, },
// 查询数据搜索 table 数据 // 查询数据搜索 table 数据
selectLawsStands () { selectLawsStands () {
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage', this.sarAccessInfoSearch, { StandardsInfoPage(this.sarAccessInfoSearch).then(res =>{
_this: this
}, res =>{
this.sarAccessInfoSearchList = res.data.list this.sarAccessInfoSearchList = res.data.list
this.sarAccessInfoSearchList.forEach(item => { this.drawerTotal = res.data.list.length
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)
})
}, e => { }, e => {
}) })
}, },
@@ -1513,6 +1478,68 @@ export default {
// 数据搜索 table select事件 // 数据搜索 table select事件
sarAccessInfoSearchSelect (val) { sarAccessInfoSearchSelect (val) {
this.selectedAccInfoSearchList = val this.selectedAccInfoSearchList = val
this.selectedAccInfoSearchList.forEach(item => {
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.selectedAccInfoSearchList.forEach(item => {
// 责任部门转换
if (item.zrbm !== null || item.zrbm !== "") {
let k = (item.zrbm || "").split(',')
for (let i in this.zrbmOptions) {
for (let m = 0; m< k.length; m++) {
if (this.zrbmOptions[i].value === k[m]) {
k[m] = this.zrbmOptions[i].label
}
item.zrbm = k.join(',')
}
}
}
// 能源类型转换
if (item.nylx !== null) {
let k = (item.nylx || "").split(',')
for (let i in this.categoryOptions) {
for (let m = 0; m< k.length; m++) {
if (this.categoryOptions[i].value === k[m]) {
k[m] = this.categoryOptions[i].label
}
item.nylx = k.join(',')
}
}
}
// 适用车型转换
if (item.typeApplicable !== null) {
let k = (item.typeApplicable || "").split(',')
for (let i in this.energyKindOptions) {
for (let m = 0; m< k.length; m++) {
if (this.energyKindOptions[i].value === k[m]) {
k[m] = this.energyKindOptions[i].label
}
item.typeApplicable = k.join(',')
}
}
}
// s适用产品线转换
if (item.sycpx !== null) {
let k = (item.sycpx || "").split(',')
for (let i in this.sycpxOptions) {
for (let m = 0; m< k.length; m++) {
if (this.sycpxOptions[i].value === k[m]) {
k[m] = this.sycpxOptions[i].label
}
item.sycpx = k.join(',')
}
}
}
})
}, },
// 数据搜索 清单类型 table select事件 // 数据搜索 清单类型 table select事件
accessSarTypeSelect (selectData) { accessSarTypeSelect (selectData) {
@@ -1865,7 +1892,7 @@ export default {
name: routerName, name: routerName,
params: { params: {
id: item.resId, id: item.resId,
pageType: item.sarType pageType: this.sarAccessInfoSearch.dataSource
} }
}) })
window.open(routeUrl.href, '_blank') window.open(routeUrl.href, '_blank')
@@ -1967,7 +1994,6 @@ export default {
_this: this _this: this
}, res => { }, res => {
this.sarAccessInfoList = res.data this.sarAccessInfoList = res.data
console.log(res.data)
}, e => { }, e => {
}) })
}, },
@@ -1988,7 +2014,6 @@ export default {
isListType (newVal, oldVal) { isListType (newVal, oldVal) {
this.sarAccessInfoSearchList = [] this.sarAccessInfoSearchList = []
this.sarAccessInfoSearch.page = 1 this.sarAccessInfoSearch.page = 1
this.drawerTotal = 0
this.selectedAccInfoSearchList = [] this.selectedAccInfoSearchList = []
this.accessSarTypeList = [] this.accessSarTypeList = []
} }
@@ -2008,8 +2033,8 @@ export default {
}, res => { }, res => {
this.allSelectOptions = res.data || {} this.allSelectOptions = res.data || {}
this.regionOptions = res.data.REGION // 基础信息 区域list this.regionOptions = res.data.REGION // 基础信息 区域list
this.applyArcticOptions = res.data.PRODUCTTYPE || [] // 基础车型 适用车型list this.applyArcticOptions = res.data.PRODUCTTYPE // 基础车型 适用车型list
this.energyKindOptions = res.data.ENERGYTYPES || [] // 能源种类list this.energyKindOptions = res.data.ENERGYTYPES // 能源种类list
this.drawerCountryOptions = res.data.COUNTRY // 国家、地区list this.drawerCountryOptions = res.data.COUNTRY // 国家、地区list
this.applyOptions = res.data.COUNTRY //适用区域list this.applyOptions = res.data.COUNTRY //适用区域list
this.standNatureOptions = res.data.SARPROPERTY // 新增 标准性质 this.standNatureOptions = res.data.SARPROPERTY // 新增 标准性质
@@ -2024,10 +2049,6 @@ export default {
this.textStatusOptions = res.data.WBZTCLASS this.textStatusOptions = res.data.WBZTCLASS
this.sycpxOptions = res.data.SYCPXCLASS // 适用产品线 this.sycpxOptions = res.data.SYCPXCLASS // 适用产品线
this.setMap(this.textStatusOptions) this.setMap(this.textStatusOptions)
this.setMap(this.zrbmOptions)
this.setMap(this.categoryOptions)
this.setMap(this.sycpxOptions)
this.setMap(this.energyKindOptions)
this.setMap(this.drawerCountryOptions) this.setMap(this.drawerCountryOptions)
this.getGzzOption() this.getGzzOption()
}, e => { }, e => {
@@ -13,13 +13,14 @@
</div> </div>
<transition name="el-zoom-in-top"> <transition name="el-zoom-in-top">
<div v-show="heightShow" class="transition-box"> <div v-show="heightShow" class="transition-box">
<p class="transition-box-p"> <p class="transition-box-p" v-if="sarAccessEO.sortKey === '1'">
<label class="transition-box-label">国家/地区</label> <label class="transition-box-label">国家/地区</label>
<span class="transition-box-span" v-if="sarAccessEO.countryArea !== null && sarAccessEOInfo > 0"> <span class="transition-box-span" v-if="sarAccessEO.countryArea !== null && sarAccessEOInfo > 0">
<span>{{ sarAccessEO.countryArea }}</span> <span>{{ sarAccessEO.countryArea }}</span>
</span> </span>
<span class="transition-box-span" v-else>{{ countryAreaMap[sarAccessEO.countryArea] }}</span> <span class="transition-box-span" v-else>{{ countryAreaMap[sarAccessEO.countryArea] }}</span>
</p> </p>
<p v-else></p>
<p class="transition-box-p"> <p class="transition-box-p">
<label class="transition-box-label">清单说明</label> <label class="transition-box-label">清单说明</label>
<span class="transition-box-span">{{ sarAccessEO.remark || "-" }}</span> <span class="transition-box-span">{{ sarAccessEO.remark || "-" }}</span>
@@ -102,15 +103,7 @@
</el-button> </el-button>
</el-form> </el-form>
<div v-if="!showSelectBox"> <div v-if="!showSelectBox">
<el-form :model="standardForm" class="label-input-form" label-width="150px" inline> <el-form :model="standardForm" class="label-input-form" label-width="108px" inline>
<el-form-item label="中文名称" class="search-item">
<el-input
v-model="standardForm.standName"
placeholder="请输入"
:maxlength="100"
size="small"
/>
</el-form-item>
<el-form-item label="英文名称" class="search-item"> <el-form-item label="英文名称" class="search-item">
<el-input <el-input
v-model="standardForm.standEnName" v-model="standardForm.standEnName"
@@ -119,7 +112,7 @@
size="small" size="small"
/> />
</el-form-item> </el-form-item>
<el-form-item label="适用车型"> <el-form-item label="适用车型" class="labelBox" label-width="61px">
<el-select <el-select
class="showBox" class="showBox"
v-model="standardForm.typeApplicable" v-model="standardForm.typeApplicable"
@@ -151,22 +144,6 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="责任部门" >
<el-select
class="showBox"
v-model="standardForm.zrbm"
placeholder="请选择"
filterable
size="small"
>
<el-option
v-for="item in zrbmOptions"
:value="item.value"
:key="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<el-form-item label="适用产品线" > <el-form-item label="适用产品线" >
<el-select <el-select
class="showBox" class="showBox"
@@ -183,47 +160,6 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="乘用车VPPS编码" class="search-item">
<el-input
v-model="standardForm.cycvppsbm"
placeholder="请输入"
:maxlength="100"
size="small"
/>
</el-form-item>
<el-form-item label="乘用车VPPS中文名称" class="search-item">
<el-input
v-model="standardForm.cycvppscn"
placeholder="请输入"
:maxlength="100"
size="small"
/>
</el-form-item>
<el-form-item label="卡车VPPS编码" class="search-item">
<el-input
v-model="standardForm.kccvppsbm"
placeholder="请输入"
:maxlength="100"
size="small"
/>
</el-form-item>
<el-form-item label="卡车VPPS中文名称" class="search-item">
<el-input
v-model="standardForm.kccvppscn"
placeholder="请输入"
:maxlength="100"
size="small"
/>
</el-form-item>
<!-- <el-form-item label="标准实施日期">
<el-date-picker
v-model="standardForm.issueTime"
type="date"
value-format="yyyy-MM-DD"
size="small"
placeholder="选择发布日期">
</el-date-picker>
</el-form-item>-->
</el-form> </el-form>
</div> </div>
</div> </div>
@@ -780,6 +716,7 @@ export default {
let accessRow = JSON.parse(sessionStorage.getItem("accessRow")); let accessRow = JSON.parse(sessionStorage.getItem("accessRow"));
this.pageId = accessRow.id this.pageId = accessRow.id
this.sarAccessEO = accessRow; this.sarAccessEO = accessRow;
console.log(this.sarAccessEO)
this.selectInfobyAccid(); this.selectInfobyAccid();
this.getOrgTreeSource(); this.getOrgTreeSource();
this.getFileInfo(); this.getFileInfo();
@@ -943,7 +880,11 @@ export default {
} }
} }
} }
.labelBox {
/deep/ .el-form-item__label {
padding-right: 5px;
}
}
/deep/ .relateClass { /deep/ .relateClass {
& > button { & > button {
height: 30px; height: 30px;
@@ -65,7 +65,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标准名称" class="search-item"> <el-form-item label="标准名称" v-if="sarAccessInfoSearch.dataSource !== 'TEMP'" class="search-item">
<el-input <el-input
v-model="sarAccessInfoSearch.standName" v-model="sarAccessInfoSearch.standName"
placeholder="请输入" placeholder="请输入"
@@ -92,21 +92,6 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </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-form-item label="清单名称" prop="detailedListName" class="search-item" v-show="isListType">
<el-input <el-input
v-model="sarAccessInfoSearch.detailedListName" v-model="sarAccessInfoSearch.detailedListName"
@@ -138,6 +123,58 @@
</el-form> </el-form>
</div> </div>
</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-select
v-model="sarAccessInfoSearch.textStatus"
placeholder="请选择"
filterable
size="small"
>
<el-option
v-for="item in textStatusOptions"
:value="item.value"
:key="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<el-form-item label="发布日期" v-show="!isListType">
<el-date-picker
v-model="sarAccessInfoSearch.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"
placeholder="请输入"
:maxlength="100"
size="small"/>
</el-form-item>
<el-form-item label="更新时间" v-show="isListType">
<el-date-picker
v-model="sarAccessInfoSearch.modifyTime"
type="date"
size="small"
value-format="yyyy-MM-DD"
placeholder="选择更新日期">
</el-date-picker>
</el-form-item>
</el-form>
</div>
<div class="action-bar"> <div class="action-bar">
<el-button <el-button
class="common-button-default" class="common-button-default"
@@ -326,18 +363,12 @@
align="center" align="center"
width="180px" width="180px"
label="适用车型"> label="适用车型">
<template slot-scope="scope">
<span>{{ typeApplicableMap[scope.row.typeApplicable] }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="nylx" prop="nylx"
align="center" align="center"
width="180px" width="180px"
label="能源类型"> label="能源类型">
<template slot-scope="scope">
<span>{{ nylxMap[scope.row.nylx] }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="putTime" prop="putTime"
@@ -374,7 +405,14 @@
align="center" align="center"
label="责任部门"> label="责任部门">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ zrbmMap[scope.row.zrbm] }}</span> <span
v-for="(item, index) in zrbmOptions"
:key="index"
:value="item.value"
v-if="scope.row.value == item.value"
>
{{ item.label }}
</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -383,9 +421,6 @@
width="180px" width="180px"
align="center" align="center"
label="适用产品线"> label="适用产品线">
<template slot-scope="scope">
<span>{{ sycpxMap[scope.row.sycpx] }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
@@ -415,7 +450,7 @@
width="210px" width="210px"
label="卡车VPPS中文名称"> label="卡车VPPS中文名称">
</el-table-column> </el-table-column>
<el-table-column width="150" label="操作"> <el-table-column width="150" align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
class="common-button-default" class="common-button-default"
@@ -489,6 +524,7 @@ import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
import stand from "../../../config/pages/attributeCustom/components/stand"; import stand from "../../../config/pages/attributeCustom/components/stand";
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import {interfaceUrl} from "@/sysConfig"; import {interfaceUrl} from "@/sysConfig";
import {dicTypeData} from "@/api/unqualProcess";
export default { export default {
name: 'OtherAddEit', name: 'OtherAddEit',
components: { components: {
@@ -512,32 +548,12 @@ export default {
CustomRoleTree CustomRoleTree
}, },
data () { data () {
// let validatePass = (rule, value, callback) => {
// let list = []
// //sarAccessInfoListADMIN 可能不存在
// if (this.sarAccessInfoListADMIN.length > 0) {
// for (let a = 0; a < this.sarAccessInfoListADMIN.length;a++) {
// list.push(this.sarAccessInfoListADMIN[a].code)
// }
// }
// if (this.sarAccessInfoList.length > 0) {
// for (let b = 0; b < this.sarAccessInfoList.length;b++) {
// list.push(this.sarAccessInfoList[b].code)
// }
// }
// for (let c = 0; c < list.length; c++) {
// if (value === list[c]) {
// callback(new Error('此标准号已存在'))
// }
// }
// }
return { return {
textStatusMap: {}, textStatusMap: {},
typeApplicableMap: {}, typeApplicableMap: {},
nylxMap: {}, nylxMap: {},
zrbmMap: {}, zrbmMap: {},
sycpxMap: {}, sycpxMap: {},
zrbmOptions: [],
selectSearch : [], selectSearch : [],
// 新增、编辑 基础信息字段 // 新增、编辑 基础信息字段
sarAccessEO: { sarAccessEO: {
@@ -568,11 +584,18 @@ export default {
] ]
}, },
disabledFlag: false, disabledFlag: false,
showSelectBox: true,
/** ****************************/
zrbmOptions: [], // 责任部门
categoryOptions: [], // 能源类型
energyKindOptions: [], // 能源种类list
sycpxOptions: [], // 适用产品线
applyArcticOptions: [], // 基础车型 适用车型list
/** ******************************/
textStatusOptions: [], // 文本状态
regionOptions: [], // 基础信息 区域list regionOptions: [], // 基础信息 区域list
drawerCountryOptions: [], // 基础信息 国家list drawerCountryOptions: [], // 基础信息 国家list
applyOptions: [], //基础信息适用领域list applyOptions: [], //基础信息适用领域list
applyArcticOptions: [], // 基础车型 适用车型list
energyKindOptions: [], // 能源种类list
accessSarTypeOptions: [], // 要求类型list accessSarTypeOptions: [], // 要求类型list
standSortOptions: [], // 标准类别 standSortOptions: [], // 标准类别
standStateOptions: [], // 标准状态 standStateOptions: [], // 标准状态
@@ -814,6 +837,20 @@ export default {
uuid: '', uuid: '',
} }
}, },
created() {
this.selectLawsStands()
dicTypeData().then(res => {
// 责任部门数据字典
this.zrbmOptions = res.data.ZRBMCLASS
// 能源类型数据字典
this.energyKindOptions = res.data.ENERGYTYPES
// this.categoryOptions = res.data.NYLXCLASS // 能源类型
// 适用车型数据字典
this.applyArcticOptions = res.data.PRODUCTTYPE
// 适用产品线数据字典
this.sycpxOptions = res.data.SYCPXCLASS
})
},
methods: { methods: {
// 高级检索 // 高级检索
selectMoreBtn () { selectMoreBtn () {
@@ -1241,19 +1278,7 @@ export default {
_this: this _this: this
}, res =>{ }, res =>{
this.sarAccessInfoSearchList = res.data.list this.sarAccessInfoSearchList = res.data.list
this.sarAccessInfoSearchList.forEach(item => { this.drawerTotal = res.data.list.length
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)
})
console.log(this.sarAccessInfoSearchList)
}, e => { }, e => {
}) })
@@ -1265,7 +1290,68 @@ export default {
// 数据搜索 table select事件 // 数据搜索 table select事件
sarAccessInfoSearchSelect (val) { sarAccessInfoSearchSelect (val) {
this.selectedAccInfoSearchList = val this.selectedAccInfoSearchList = val
console.log(val) this.selectedAccInfoSearchList.forEach(item => {
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.selectedAccInfoSearchList.forEach(item => {
// 责任部门转换
if (item.zrbm !== null || item.zrbm !== "") {
let k = (item.zrbm || "").split(',')
for (let i in this.zrbmOptions) {
for (let m = 0; m< k.length; m++) {
if (this.zrbmOptions[i].value === k[m]) {
k[m] = this.zrbmOptions[i].label
}
item.zrbm = k.join(',')
}
}
}
// 能源类型转换
if (item.nylx !== null) {
let k = (item.nylx || "").split(',')
for (let i in this.categoryOptions) {
for (let m = 0; m< k.length; m++) {
if (this.categoryOptions[i].value === k[m]) {
k[m] = this.categoryOptions[i].label
}
item.nylx = k.join(',')
}
}
}
// 适用车型转换
if (item.typeApplicable !== null) {
let k = (item.typeApplicable || "").split(',')
for (let i in this.energyKindOptions) {
for (let m = 0; m< k.length; m++) {
if (this.energyKindOptions[i].value === k[m]) {
k[m] = this.energyKindOptions[i].label
}
item.typeApplicable = k.join(',')
}
}
}
// s适用产品线转换
if (item.sycpx !== null) {
let k = (item.sycpx || "").split(',')
for (let i in this.sycpxOptions) {
for (let m = 0; m< k.length; m++) {
if (this.sycpxOptions[i].value === k[m]) {
k[m] = this.sycpxOptions[i].label
}
item.sycpx = k.join(',')
}
}
}
})
}, },
// 数据搜索 清单类型 table select事件 // 数据搜索 清单类型 table select事件
accessSarTypeSelect (selectData) { accessSarTypeSelect (selectData) {
@@ -1780,7 +1866,7 @@ export default {
this.ROLELIST = res.data.ROLELIST this.ROLELIST = res.data.ROLELIST
this.GXHBQOptions = res.data.GXHBQXX this.GXHBQOptions = res.data.GXHBQXX
this.askNatureOptions = res.data.ACCESSTYPE this.askNatureOptions = res.data.ACCESSTYPE
this.zrbmOptions = res.data.ZRBMCLASS // 责任部门 this.zrbmOptions = res.data.ZRBMCLASS || [] // 责任部门
this.categoryOptions = res.data.NYLXCLASS // 能源类型 this.categoryOptions = res.data.NYLXCLASS // 能源类型
this.textStatusOptions = res.data.WBZTCLASS this.textStatusOptions = res.data.WBZTCLASS
this.sycpxOptions = res.data.SYCPXCLASS // 适用产品线 this.sycpxOptions = res.data.SYCPXCLASS // 适用产品线
@@ -65,7 +65,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标准名称" class="search-item"> <el-form-item label="标准名称" v-if="sarAccessInfoSearch.dataSource !== 'TEMP'" class="search-item">
<el-input <el-input
v-model="sarAccessInfoSearch.standName" v-model="sarAccessInfoSearch.standName"
placeholder="请输入" placeholder="请输入"
@@ -92,21 +92,6 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </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-form-item label="清单名称" prop="detailedListName" class="search-item" v-show="isListType">
<el-input <el-input
v-model="sarAccessInfoSearch.detailedListName" v-model="sarAccessInfoSearch.detailedListName"
@@ -130,7 +115,11 @@
@click="clearSearchLaws">清空</el-button> @click="clearSearchLaws">清空</el-button>
</el-form-item> </el-form-item>
<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> <i class="iconfont">&#xe7a5;</i>
高级查询 高级查询
</el-button> </el-button>
@@ -138,6 +127,58 @@
</el-form> </el-form>
</div> </div>
</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-select
v-model="sarAccessInfoSearch.textStatus"
placeholder="请选择"
filterable
size="small"
>
<el-option
v-for="item in textStatusOptions"
:value="item.value"
:key="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<el-form-item label="发布日期" v-show="!isListType">
<el-date-picker
v-model="sarAccessInfoSearch.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"
placeholder="请输入"
:maxlength="100"
size="small"/>
</el-form-item>
<el-form-item label="更新时间" v-show="isListType">
<el-date-picker
v-model="sarAccessInfoSearch.modifyTime"
type="date"
size="small"
value-format="yyyy-MM-DD"
placeholder="选择更新日期">
</el-date-picker>
</el-form-item>
</el-form>
</div>
<div class="action-bar"> <div class="action-bar">
<el-button <el-button
class="common-button-default" class="common-button-default"
@@ -326,18 +367,12 @@
align="center" align="center"
width="180px" width="180px"
label="适用车型"> label="适用车型">
<template slot-scope="scope">
<span>{{ typeApplicableMap[scope.row.typeApplicable] }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="nylx" prop="nylx"
align="center" align="center"
width="180px" width="180px"
label="能源类型"> label="能源类型">
<template slot-scope="scope">
<span>{{ nylxMap[scope.row.nylx] }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="putTime" prop="putTime"
@@ -373,9 +408,6 @@
width="210px" width="210px"
align="center" align="center"
label="责任部门"> label="责任部门">
<template slot-scope="scope">
<span>{{ zrbmMap[scope.row.zrbm] }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
@@ -383,9 +415,6 @@
width="180px" width="180px"
align="center" align="center"
label="适用产品线"> label="适用产品线">
<template slot-scope="scope">
<span>{{ sycpxMap[scope.row.sycpx] }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
show-overflow-tooltip show-overflow-tooltip
@@ -415,7 +444,7 @@
width="210px" width="210px"
label="卡车VPPS中文名称"> label="卡车VPPS中文名称">
</el-table-column> </el-table-column>
<el-table-column width="150" label="操作"> <el-table-column width="150" align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
class="common-button-default" class="common-button-default"
@@ -489,6 +518,7 @@ import CustomRoleTree from '@/components/CustomFormComponents/roleTree'
import stand from "../../../config/pages/attributeCustom/components/stand"; import stand from "../../../config/pages/attributeCustom/components/stand";
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import {interfaceUrl} from "@/sysConfig"; import {interfaceUrl} from "@/sysConfig";
import {dicTypeData} from "@/api/unqualProcess";
export default { export default {
name: 'OtherAddEit', name: 'OtherAddEit',
components: { components: {
@@ -512,32 +542,12 @@ export default {
CustomRoleTree CustomRoleTree
}, },
data () { data () {
// let validatePass = (rule, value, callback) => {
// let list = []
// //sarAccessInfoListADMIN 可能不存在
// if (this.sarAccessInfoListADMIN.length > 0) {
// for (let a = 0; a < this.sarAccessInfoListADMIN.length;a++) {
// list.push(this.sarAccessInfoListADMIN[a].code)
// }
// }
// if (this.sarAccessInfoList.length > 0) {
// for (let b = 0; b < this.sarAccessInfoList.length;b++) {
// list.push(this.sarAccessInfoList[b].code)
// }
// }
// for (let c = 0; c < list.length; c++) {
// if (value === list[c]) {
// callback(new Error('此标准号已存在'))
// }
// }
// }
return { return {
textStatusMap: {}, textStatusMap: {},
typeApplicableMap: {}, typeApplicableMap: {},
nylxMap: {}, nylxMap: {},
zrbmMap: {}, zrbmMap: {},
sycpxMap: {}, sycpxMap: {},
zrbmOptions: [],
selectSearch : [], selectSearch : [],
// 新增、编辑 基础信息字段 // 新增、编辑 基础信息字段
sarAccessEO: { sarAccessEO: {
@@ -569,15 +579,21 @@ export default {
] ]
}, },
disabledFlag: false, disabledFlag: false,
/** ****************************/
zrbmOptions: [], // 责任部门
categoryOptions: [], // 能源类型
energyKindOptions: [], // 能源种类list
sycpxOptions: [], // 适用产品线
applyArcticOptions: [], // 基础车型 适用车型list
/** ******************************/
regionOptions: [], // 基础信息 区域list regionOptions: [], // 基础信息 区域list
drawerCountryOptions: [], // 基础信息 国家list drawerCountryOptions: [], // 基础信息 国家list
applyOptions: [], //基础信息适用领域list applyOptions: [], //基础信息适用领域list
applyArcticOptions: [], // 基础车型 适用车型list
energyKindOptions: [], // 能源种类list
accessSarTypeOptions: [], // 要求类型list accessSarTypeOptions: [], // 要求类型list
standSortOptions: [], // 标准类别 standSortOptions: [], // 标准类别
standStateOptions: [], // 标准状态 standStateOptions: [], // 标准状态
GXHBQOptions: [], // 标签list GXHBQOptions: [], // 标签list
textStatusOptions: [], // 文本状态
askNatureOptions: [], // 监管类型list askNatureOptions: [], // 监管类型list
ROLELIST: [], // 项目评估角色 ROLELIST: [], // 项目评估角色
// 数据搜索 数据来源list // 数据搜索 数据来源list
@@ -605,6 +621,7 @@ export default {
}, },
moreSearchBtn: true, // 多属性搜索按钮 状态 moreSearchBtn: true, // 多属性搜索按钮 状态
showTableFlag: true, // 显示添加列表 状态 showTableFlag: true, // 显示添加列表 状态
showSelectBox: true, // 显示高级查询 状态
sarAccessInfoSearchList: [], // 数据搜索 table列表数据 sarAccessInfoSearchList: [], // 数据搜索 table列表数据
importmodalFlag: false, // 导入model 状态 importmodalFlag: false, // 导入model 状态
searching: false, searching: false,
@@ -815,9 +832,26 @@ export default {
uuid: '', uuid: '',
} }
}, },
created() {
this.selectLawsStands()
dicTypeData().then(res => {
// 责任部门数据字典
this.zrbmOptions = res.data.ZRBMCLASS
// 能源类型数据字典
this.energyKindOptions = res.data.ENERGYTYPES
// this.categoryOptions = res.data.NYLXCLASS // 能源类型
// 适用车型数据字典
this.applyArcticOptions = res.data.PRODUCTTYPE
// 适用产品线数据字典
this.sycpxOptions = res.data.SYCPXCLASS
})
},
methods: { methods: {
// 高级检索 // 高级检索
selectMoreBtn () { selectMoreBtn () {
this.showSelectBox = !this.showSelectBox
this.showTableFlag = false
this.selectLawsStands()
}, },
// 法规维护人树 // 法规维护人树
getDept () { getDept () {
@@ -1242,19 +1276,7 @@ export default {
_this: this _this: this
}, res =>{ }, res =>{
this.sarAccessInfoSearchList = res.data.list this.sarAccessInfoSearchList = res.data.list
this.sarAccessInfoSearchList.forEach(item => { this.drawerTotal = res.data.list.length
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)
})
console.log(this.sarAccessInfoSearchList)
}, e => { }, e => {
}) })
@@ -1266,7 +1288,68 @@ export default {
// 数据搜索 table select事件 // 数据搜索 table select事件
sarAccessInfoSearchSelect (val) { sarAccessInfoSearchSelect (val) {
this.selectedAccInfoSearchList = val this.selectedAccInfoSearchList = val
console.log(val) this.selectedAccInfoSearchList.forEach(item => {
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.selectedAccInfoSearchList.forEach(item => {
// 责任部门转换
if (item.zrbm !== null || item.zrbm !== "") {
let k = (item.zrbm || "").split(',')
for (let i in this.zrbmOptions) {
for (let m = 0; m< k.length; m++) {
if (this.zrbmOptions[i].value === k[m]) {
k[m] = this.zrbmOptions[i].label
}
item.zrbm = k.join(',')
}
}
}
// 能源类型转换
if (item.nylx !== null) {
let k = (item.nylx || "").split(',')
for (let i in this.categoryOptions) {
for (let m = 0; m< k.length; m++) {
if (this.categoryOptions[i].value === k[m]) {
k[m] = this.categoryOptions[i].label
}
item.nylx = k.join(',')
}
}
}
// 适用车型转换
if (item.typeApplicable !== null) {
let k = (item.typeApplicable || "").split(',')
for (let i in this.energyKindOptions) {
for (let m = 0; m< k.length; m++) {
if (this.energyKindOptions[i].value === k[m]) {
k[m] = this.energyKindOptions[i].label
}
item.typeApplicable = k.join(',')
}
}
}
// s适用产品线转换
if (item.sycpx !== null) {
let k = (item.sycpx || "").split(',')
for (let i in this.sycpxOptions) {
for (let m = 0; m< k.length; m++) {
if (this.sycpxOptions[i].value === k[m]) {
k[m] = this.sycpxOptions[i].label
}
item.sycpx = k.join(',')
}
}
}
})
}, },
// 数据搜索 清单类型 table select事件 // 数据搜索 清单类型 table select事件
accessSarTypeSelect (selectData) { accessSarTypeSelect (selectData) {