From 22a182369189cbba468862659589a46551a40529 Mon Sep 17 00:00:00 2001 From: yanyizhou <2311759275@qq.com> Date: Thu, 19 Aug 2021 13:39:58 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=20=E6=A0=87=E5=87=86=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E6=B8=85=E5=8D=95-=E5=9B=BD=E5=AE=B6/=E5=9C=B0=E5=8C=BA?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E4=B8=AD=E7=9A=84=20=E6=AF=8F=E4=B8=AA?= =?UTF-8?q?=E5=9B=BD=E5=AE=B6=E6=88=96=E8=80=85=E5=9C=B0=E5=8C=BA=E5=8F=AA?= =?UTF-8?q?=E8=83=BD=E5=BB=BA=E7=AB=8B=E4=B8=80=E6=AC=A1=E6=B8=85=E5=8D=95?= =?UTF-8?q?=EF=BC=8C=E9=9C=80=E5=81=9A=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/addEdit.vue | 803 ++++++++++-------- .../pages/otherAddEit.vue | 127 ++- .../pages/projectAddEit.vue | 128 ++- 3 files changed, 700 insertions(+), 358 deletions(-) diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue index 08adba748..600b9ab8e 100644 --- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue +++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue @@ -6,7 +6,8 @@ 基础信息
- + @@ -80,7 +81,7 @@ - + 清空 + @click="clearSearchLaws">清空 + - + 高级查询 - + 高级查询 @@ -116,22 +120,22 @@
- + + style="width: 165px" + v-model="sarAccessInfo.standNumber" + placeholder="请输入" + size="small" + clearable/> + style="width: 165px" + v-model="sarAccessInfo.standName" + placeholder="请输入" + size="small" + clearable/> 查询 @@ -141,18 +145,21 @@
添加 + size="mini" @click="addSarAccess">添加 + {{$t('m.showAddDataList')}} + >{{ $t('m.showAddDataList') }} + {{$t('m.hideAddDataList')}} + >{{ $t('m.hideAddDataList') }} +
- {{$t('m.dataAcquisition')}} + {{ $t('m.dataAcquisition') }}
@@ -245,13 +252,15 @@ class="common-button-default export-button" size="mini" @click="exportAccessInfo('apart')" v-btn-permission="''" - >导出 + >导出 + 删除 + >删除 + + prop="standEnName" + align="center" + width="180px" + label="英文名称"> + prop="typeApplicable" + align="center" + width="180px" + label="适用车型"> + prop="nylx" + align="center" + width="180px" + label="能源类型"> + prop="ssrq" + sortable + align="center" + width="210px" + label="标准实施日期"> + show-overflow-tooltip + prop="zccssrqgj" + sortable + width="210px" + align="center" + label="在产车实施日期"> + prop="xcxssrqgj" + sortable + align="center" + width="210px" + label="新车型实施日期"> + show-overflow-tooltip + prop="zrbm" + width="210px" + align="center" + label="责任部门"> + show-overflow-tooltip + prop="sycpx" + width="180px" + align="center" + label="适用产品线"> + show-overflow-tooltip + prop="cycvppsbm" + width="210px" + align="center" + label="乘用车VPPS编码"> + show-overflow-tooltip + prop="cycvppscn" + width="210px" + align="center" + label="乘用车VPPS中文名称"> + show-overflow-tooltip + prop="kccvppsbm" + align="center" + width="210px" + label="卡车VPPS编码"> + show-overflow-tooltip + prop="kccvppscn" + align="center" + width="210px" + label="卡车VPPS中文名称"> - + @@ -424,7 +440,8 @@ 取消 - 提交 + 提交 @@ -446,87 +463,89 @@ + title="编辑清单条目" + :visible.sync="drawerEdit" + :wrapperClosable="false" + size="800px" + > - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - + + + - - - - + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + >取消 + + @@ -545,14 +564,15 @@ import CustomSelectArray from '@/components/CustomFormComponents/SelectArray' import TreePopover from '@/components/CustomFormComponents/TreePopover' import CustomOrg from '@/components/CustomFormComponents/OrgTree' import CustomEopDatePick from '@/components/CustomFormComponents/DatePickerWithText' -import CustomDatePickWithText ,{ formatText }from '@/components/CustomFormComponents/DatePickerGroupWithText' +import CustomDatePickWithText, {formatText} from '@/components/CustomFormComponents/DatePickerGroupWithText' import CustomSVPPS from '@/components/CustomFormComponents/SVPPS' import CustomInputForPolicy from '@/components/CustomFormComponents/InputForPolicy' import CustomRoleTree from '@/components/CustomFormComponents/roleTree' import stand from "../../../config/pages/attributeCustom/components/stand"; -import { mapGetters } from 'vuex' -import { dicTypeData, StandardsInfoPage } from '@/api/unqualProcess' +import {mapGetters} from 'vuex' +import {dicTypeData, StandardsInfoPage} from '@/api/unqualProcess' import {interfaceUrl} from "@/sysConfig"; + export default { name: 'ListOfStandardsAndRegulationsDetails', components: { @@ -575,7 +595,7 @@ export default { CustomInputForPolicy, CustomRoleTree }, - data () { + data() { return { textStatusMap: {}, countryAreaMap: {}, @@ -589,7 +609,7 @@ export default { editRowData: { id: '', standName: '', - standSortShow:'', + standSortShow: '', standEnName: '', typeApplicable: '', nylx: '', @@ -603,7 +623,7 @@ export default { kccvppsbm: '', kccvppscn: '' }, - selectSearch : [], + selectSearch: [], // 新增、编辑 基础信息字段 sarAccessEO: { id: '', @@ -796,7 +816,7 @@ export default { // country: 'CN', // 适用区域 standSort: '', // 标准类别 standNumber: '', // 标准编号 - standSortShow:'', + standSortShow: '', standYear: '', // 标准年份 standName: '', // 中文名称 standEnName: '', // 英文名称 @@ -817,7 +837,7 @@ export default { // country: 'CN', // 适用区域 standSort: '', // 标准类别 standNumber: '', // 标准编号 - standSortShow:'', + standSortShow: '', standYear: '', // 标准年份 standName: '', // 中文名称 standEnName: '', // 英文名称 @@ -863,31 +883,31 @@ export default { // {validator: this.verify.checkSpecialCharacter, trigger: 'blur'} gaoyan 2018-11-07 客户提到特殊符号校验问题 ], lawsNumber: [ - { required: true, message: '政策编号不能为空', trigger: 'change' }, - { type: 'string', max: 100, message: '政策编号不能超过100个字符', trigger: 'change' }, + {required: true, message: '政策编号不能为空', trigger: 'change'}, + {type: 'string', max: 100, message: '政策编号不能超过100个字符', trigger: 'change'}, {type: 'string', validator: this.verify.validateStandardItem, trigger: 'change'} ], lawsName: [ - { required: true, message: '中文名称不能为空', trigger: 'blur' }, - { type: 'string', max: 500, message: '中文名称不能超过500个字符', trigger: 'change' } + {required: true, message: '中文名称不能为空', trigger: 'blur'}, + {type: 'string', max: 500, message: '中文名称不能超过500个字符', trigger: 'change'} ], lawsEnName: [ - { required: true, message: '英文名称不能为空', trigger: 'change' }, - { type: 'string', max: 1000, message: '英文名称不能超过1000个字符', trigger: 'change' } + {required: true, message: '英文名称不能为空', trigger: 'change'}, + {type: 'string', max: 1000, message: '英文名称不能超过1000个字符', trigger: 'change'} // { validator: this.verify.valiateEnName, trigger: 'blur' } ], lawsState: [ - { required: true, message: '文本状态不能为空', trigger: 'change' } + {required: true, message: '文本状态不能为空', trigger: 'change'} ], countryArea: [ - { required: true, message: '适用区域不能为空', trigger: 'change' } + {required: true, message: '适用区域不能为空', trigger: 'change'} ], replaceLawsNum: [ - { required: true, message: '代替政策编号不能为空', trigger: 'change' }, - { type: 'string', validator: this.verify.validateStandardItem, trigger: 'blur' } + {required: true, message: '代替政策编号不能为空', trigger: 'change'}, + {type: 'string', validator: this.verify.validateStandardItem, trigger: 'blur'} ], issueTime: [ - { required: true, message: '发布日期不能为空', trigger: 'change' } + {required: true, message: '发布日期不能为空', trigger: 'change'} ] }, formFieldListData: [], // 存储从接口取过来的原始数据 @@ -911,7 +931,7 @@ export default { }, methods: { // 高级检索 - selectMoreBtn () { + selectMoreBtn() { this.selectLawsStands() this.showSelectBox = !this.showSelectBox this.showTableFlag = false @@ -924,7 +944,7 @@ export default { this.selectLawsStands() }, // 法规维护人树 - getDept () { + getDept() { return new Promise((resolve, reject) => { let url = 'sys/org/getTree' this.$http.get(url, {}, { @@ -954,11 +974,11 @@ export default { }) }, // 删除上传的文件 - delFileInfo (file, fileList) { + delFileInfo(file, fileList) { this.fileInfoList = fileList }, // 上传文件成功回调 - uploadBackSuccess (res, file, fileList) { + uploadBackSuccess(res, file, fileList) { if (res.ok) { this.fileInfoList = fileList this.fileInfoList[this.fileInfoList.length - 1].id = res.data.id @@ -977,20 +997,20 @@ export default { } }, // 相关附件 上传之前钩子 - beforeUpload (file) { + beforeUpload(file) { var filename = file.name var index1 = filename.lastIndexOf('.') var index2 = filename.length var fileSuffix = filename.substring(index1, index2) // const fileSuffix = file.name.split('.')[1] // 后缀名 //把后缀转大写 - if(fileSuffix !== undefined && fileSuffix !== null){ + if (fileSuffix !== undefined && fileSuffix !== null) { fileSuffix = fileSuffix.toUpperCase() } // 判断上传文件格式 if (fileSuffix === '.PDF' || fileSuffix === '.DOC' || fileSuffix === '.DOCX' || fileSuffix === '.PPT' - || fileSuffix === '.PPTX'|| fileSuffix === '.XLS'|| fileSuffix === '.XLSX' - || fileSuffix === '.PNG'|| fileSuffix === '.JPG'|| fileSuffix === '.JPEG') { + || fileSuffix === '.PPTX' || fileSuffix === '.XLS' || fileSuffix === '.XLSX' + || fileSuffix === '.PNG' || fileSuffix === '.JPG' || fileSuffix === '.JPEG') { return true } else { this.$message.error('文件' + file.name + '格式不正确,请上传pdf、doc、docx、ppt、pptx、xls、xlsx、png、jpg、jpeg等文件') @@ -1003,23 +1023,23 @@ export default { } return true }, - moreSearch () { + moreSearch() { this.moreSearchShow = !this.moreSearchShow this.moreSearchBtn = !this.moreSearchBtn }, // 点击显示隐藏数据列表 按钮事件 - isShowTable () { + isShowTable() { this.selectLawsStands() this.showTableFlag = !this.showTableFlag this.selectedAccInfoSearchList = [] // 清空 }, // 点数据搜索 查询按钮 事件 - searchLawsStands () { + searchLawsStands() { this.showTableFlag = false this.selectLawsStands() }, // 点击清空查询条件 按钮事件 - clearSearchLaws () { + clearSearchLaws() { this.sarAccessInfoSearch.askType = '' // 监管类型 this.sarAccessInfoSearch.dataSource = 'INLAND_STAND' // 数据来源 this.sarAccessInfoSearch.standName = '' @@ -1029,12 +1049,12 @@ export default { this.selectLawsStands() }, // 数据来源change事件 - dataSourceChange (val) { + dataSourceChange(val) { this.isListType = val === 'TEMP' this.sarAccessInfoSearch.advanceSearchVOStr = '' // 国内标准法规可查字段 - if (val === 'INLAND_STAND'){ - this.twoOptions=[ + if (val === 'INLAND_STAND') { + this.twoOptions = [ { label: '适用车辆类型', value: 'CLLX', @@ -1074,8 +1094,8 @@ export default { } ] // 海外标准法规可查字段 - }else if (val === 'FOREIGN_STAND'){ - this.twoOptions=[ + } else if (val === 'FOREIGN_STAND') { + this.twoOptions = [ { label: '适用车辆类型', value: 'CLLX', @@ -1126,33 +1146,33 @@ export default { * 点击数据搜索 添加按钮事件 * 判断是否添加重复数据 */ - addSarAccess () { + addSarAccess() { //判断是否是清单类型 if (this.selectedAccInfoSearchList.length > 0) { // 追加字段 this.selectedAccInfoSearchList.map(item => { let addList; addList = this.sarAccessInfoList.findIndex(items => { - return items.id === item.id - }) - if(addList > -1){ - // this.$refs.accessTypeSelect.clearSelection() - this.$refs.entryTable.clearSelection() - this.$refs.searchTable.clearSelection() + return items.id === item.id + }) + if (addList > -1) { + // this.$refs.accessTypeSelect.clearSelection() + this.$refs.entryTable.clearSelection() + this.$refs.searchTable.clearSelection() this.$message.warning('请勿添加重复数据') - } else{ - this.sarAccessInfoList.push(item) - // this.$refs.accessTypeSelect.clearSelection() - this.$refs.entryTable.clearSelection() - this.$refs.searchTable.clearSelection() - } + } else { + this.sarAccessInfoList.push(item) + // this.$refs.accessTypeSelect.clearSelection() + this.$refs.entryTable.clearSelection() + this.$refs.searchTable.clearSelection() + } }) } else { this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)') } }, // 上移 事件 - moveUp (index, row) { + moveUp(index, row) { if (index === 0) { this.$message({ message: '已经是列表中第一个素材!', @@ -1164,7 +1184,7 @@ export default { this.$set(this.sarAccessInfoList, index, temp) } }, - moveDown (index) { + moveDown(index) { if (index === (this.sarAccessInfoList.length - 1)) { this.$message({ message: '已经是列表中最后一个素材!', @@ -1193,21 +1213,21 @@ export default { this.drawerEdit = false }, // 点击清单条目导入按钮事件 - importmodalFlags () { + importmodalFlags() { this.importmodalFlag = true this.$nextTick(() => { this.$refs['importfile'].clearFiles() }) }, // 点击 模板下载 按钮事件 - uploadImportModal () { + uploadImportModal() { window.open('/api/lawss/sarSarAccess/exportTemplate?fileName=标准法规清单导入模板.xlsx') }, /** * 点击清单条目 删除按钮 事件 * 删除不想添加的AccessInfo信息 */ - deleteSelectSarAccessInfo () { + deleteSelectSarAccessInfo() { if (this.sarAccessInfoListArry.length > 0) { this.$confirm('确认删除选中数据?', '确认删除', { confirmButtonText: '确定', @@ -1229,26 +1249,27 @@ export default { }) this.sarAccessInfoListArry = [] this.$refs.entryTable.clearSelection() - }).catch(() => {}) + }).catch(() => { + }) } else { this.$message.error('请选择需要删除的清单条目!') } }, // 清单条目 table select事件 - sarAccessInfoSelect (selectData) { + sarAccessInfoSelect(selectData) { this.sarAccessInfoListArry = [] for (let i = 0; i < selectData.length; i++) { this.sarAccessInfoListArry.push(selectData[i].id); } }, // 点击取消按钮 返回事件 - backCancal () { + backCancal() { this.$router.push({ name: 'AccessStandardsAndRegulations' }) }, // 提交按钮 事件 - saveSarAccess () { + saveSarAccess() { this.$refs['sarAccessForm'].validate((valid) => { if (valid) { let rowlist = [] @@ -1257,21 +1278,21 @@ export default { let rowlist3 = [] for (let i = 0; i < this.sarAccessInfoList.length; i++) { rowlist.push(this.sarAccessInfoList[i].id) - if (this.sarAccessInfoList[i].ssrq === null) { + if (this.sarAccessInfoList[i].ssrq === null) { rowlist1.push(this.sarAccessInfoList[i].ssrq = '-') - }else { + } else { rowlist1.push(this.sarAccessInfoList[i].ssrq.toString()) } - if (this.sarAccessInfoList[i].xcxssrqgj === null) { - rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-') - }else { - rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString()) - } - if (this.sarAccessInfoList[i].zccssrqgj === null) { - rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-') - }else { - rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString()) - } + if (this.sarAccessInfoList[i].xcxssrqgj === null) { + rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-') + } else { + rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString()) + } + if (this.sarAccessInfoList[i].zccssrqgj === null) { + rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-') + } else { + rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString()) + } } rowlist = rowlist.join(',') rowlist1 = rowlist1.join(',') @@ -1296,51 +1317,42 @@ export default { // 新增 sarAccessEO.state = '1' sarAccessEO.version = 0 - this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, { - _this: this, - loading: 'loadData' - }, res => { - if (this.sarAccessInfoList.length !== 0) { + if (this.sarAccessInfoList.length !== 0) { + this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, { + _this: this, + loading: 'loadData' + }, res => { if (res.ok) { - if (res.data === "数据库为空,添加成功"){ + if (res.data === "数据库为空,添加成功") { this.$message.success('新增成功') this.isNext = true this.$router.push({ name: 'AccessStandardsAndRegulations' }) - } - else if (res.data === "其他清单添加成功"){ + } else if (res.data === "车型类别清单添加成功") { this.$message.success('新增成功') this.isNext = true this.$router.push({ name: 'AccessStandardsAndRegulations' }) - } - else if (res.data === "车型类别清单添加成功"){ - this.$message.success('新增成功') - this.isNext = true - this.$router.push({ - name: 'AccessStandardsAndRegulations' - }) - }else if(res.data === "车型类别清单添加失败"){ + } else if (res.data === "车型类别清单添加失败") { this.$message.error('已存在此车型类别清单,新增失败') - } - else if (res.data === "国家/地区清单添加成功"){ + } else if (res.data === "国家/地区清单添加成功") { this.$message.success('新增成功') this.isNext = true this.$router.push({ name: 'AccessStandardsAndRegulations' }) - }else if(res.data === "国家/地区清单添加失败"){ + } else if (res.data === "国家/地区清单添加失败") { this.$message.error('已存在此国家/地区清单,新增失败') } - } - } else { - this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)') - } - }, e => { - }) + }, e => { + console.log(e) + }) + } else { + this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)') + } } else { // 编辑 this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, { @@ -1357,13 +1369,127 @@ export default { }, e => { }) } - }else { + } else { this.$message.error('请检查表单是否填写正确') } }) }, + // saveSarAccess () { + // this.$refs['sarAccessForm'].validate((valid) => { + // if (valid) { + // let rowlist = [] + // let rowlist1 = [] + // let rowlist2 = [] + // let rowlist3 = [] + // for (let i = 0; i < this.sarAccessInfoList.length; i++) { + // rowlist.push(this.sarAccessInfoList[i].id) + // if (this.sarAccessInfoList[i].ssrq === null) { + // rowlist1.push(this.sarAccessInfoList[i].ssrq = '-') + // }else { + // rowlist1.push(this.sarAccessInfoList[i].ssrq.toString()) + // } + // if (this.sarAccessInfoList[i].xcxssrqgj === null) { + // rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-') + // }else { + // rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString()) + // } + // if (this.sarAccessInfoList[i].zccssrqgj === null) { + // rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-') + // }else { + // rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString()) + // } + // } + // rowlist = rowlist.join(',') + // rowlist1 = rowlist1.join(',') + // rowlist2 = rowlist2.join(',') + // rowlist3 = rowlist3.join(',') + // let sarAccessEO = JSON.parse(JSON.stringify(this.sarAccessEO)) + // sarAccessEO.inforlist = rowlist + // sarAccessEO.inforlist1 = rowlist1 + // sarAccessEO.inforlist2 = rowlist2 + // sarAccessEO.inforlist3 = rowlist3 + // sarAccessEO.countryArea = sarAccessEO.countryArea.join(',') + // // sarAccessEO.applicationScope = sarAccessEO.applicationScope.join(',') + // // 判断是否有附件 + // if (this.fileInfoList.length > 0) { + // let relateFile = [] + // this.fileInfoList.map(item => { + // relateFile.push(item.id) + // }) + // sarAccessEO.fileIds = relateFile.join(',') + // } + // if (!sarAccessEO.id) { + // // 新增 + // sarAccessEO.state = '1' + // sarAccessEO.version = 0 + // this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, { + // _this: this, + // loading: 'loadData' + // }, res => { + // if (this.sarAccessInfoList.length !== 0) { + // if (res.ok) { + // if (res.data === "数据库为空,添加成功"){ + // this.$message.success('新增成功') + // this.isNext = true + // this.$router.push({ + // name: 'AccessStandardsAndRegulations' + // }) + // } + // else if (res.data === "其他清单添加成功"){ + // this.$message.success('新增成功') + // this.isNext = true + // this.$router.push({ + // name: 'AccessStandardsAndRegulations' + // }) + // } + // else if (res.data === "车型类别清单添加成功"){ + // this.$message.success('新增成功') + // this.isNext = true + // this.$router.push({ + // name: 'AccessStandardsAndRegulations' + // }) + // }else if(res.data === "车型类别清单添加失败"){ + // this.$message.error('已存在此车型类别清单,新增失败') + // } + // else if (res.data === "国家/地区清单添加成功"){ + // this.$message.success('新增成功') + // this.isNext = true + // this.$router.push({ + // name: 'AccessStandardsAndRegulations' + // }) + // }else if(res.data === "国家/地区清单添加失败"){ + // this.$message.error('已存在此国家/地区清单,新增失败') + // } + // + // } + // } else { + // this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)') + // } + // }, e => { + // }) + // } else { + // // 编辑 + // this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, { + // _this: this, + // loading: 'loadData' + // }, res => { + // if (res.ok) { + // //this.$message.success('编辑成功') + // this.isNext = true + // this.$router.push({ + // name: 'AccessStandardsAndRegulations' + // }) + // } + // }, e => { + // }) + // } + // }else { + // this.$message.error('请检查表单是否填写正确') + // } + // }) + // }, pageInfo() { - StandardsInfoPage(this.sarAccessInfoSearch).then(res =>{ + StandardsInfoPage(this.sarAccessInfoSearch).then(res => { this.sarAccessInfoSearchList = res.data.list this.sarAccessInfoSearchList.forEach(item => { if (item.standYear === null) { @@ -1383,7 +1509,7 @@ export default { this.$set(item, 'cycvppscn', '') this.$set(item, 'kccvppsbm', '') this.$set(item, 'kccvppscn', '') - }else { + } else { this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQ) this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQ) this.$set(item, 'sycpx', item.attrInfoMap.SYCPX) @@ -1402,7 +1528,7 @@ export default { }) }, // 查询数据搜索 table 数据 - selectLawsStands () { + selectLawsStands() { if (this.sarAccessInfoSearch.dataSource === 'INLAND_STAND') { this.sarAccessInfoSearch.standType = 'INLAND' this.pageInfo() @@ -1413,7 +1539,7 @@ export default { }, selectPage() { - StandardsInfoPage(this.sarAccessInfo).then(res =>{ + StandardsInfoPage(this.sarAccessInfo).then(res => { this.sarAccessInfoSearchList = res.data.list this.sarAccessInfoSearchList.forEach(item => { if (item.standYear === null) { @@ -1433,7 +1559,7 @@ export default { this.$set(item, 'cycvppscn', '') this.$set(item, 'kccvppsbm', '') this.$set(item, 'kccvppscn', '') - }else { + } else { this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQ) this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQ) this.$set(item, 'ssrq', item.attrInfoMap.SSRQ) @@ -1461,11 +1587,11 @@ export default { } }, // 数据搜索table判断checked状态 - selectable (row) { + selectable(row) { return row.isRelateAccess === '1' }, // 数据搜索 table select事件 - sarAccessInfoSearchSelect (val) { + sarAccessInfoSearchSelect(val) { this.selectedAccInfoSearchList = val this.selectedAccInfoSearchList.forEach(item => { if (item.attrInfoMap === null) { @@ -1480,7 +1606,7 @@ export default { this.$set(item, 'cycvppscn', '') this.$set(item, 'kccvppsbm', '') this.$set(item, 'kccvppscn', '') - }else { + } else { this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQ) this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQ) this.$set(item, 'ssrq', item.attrInfoMap.SSRQ) @@ -1498,22 +1624,22 @@ export default { // 责任部门转换 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(',') + 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++) { + for (let m = 0; m < k.length; m++) { if (this.categoryOptions[i].value === k[m]) { - k[m] = this.categoryOptions[i].label + k[m] = this.categoryOptions[i].label } item.nylx = k.join(',') } @@ -1523,9 +1649,9 @@ export default { if (item.typeApplicable !== null) { let k = (item.typeApplicable || "").split(',') for (let i in this.CycxOptions) { - for (let m = 0; m< k.length; m++) { + for (let m = 0; m < k.length; m++) { if (this.CycxOptions[i].value === k[m]) { - k[m] = this.CycxOptions[i].label + k[m] = this.CycxOptions[i].label } item.typeApplicable = k.join(',') } @@ -1535,9 +1661,9 @@ export default { if (item.sycpx !== null) { let k = (item.sycpx || "").split(',') for (let i in this.sycpxOptions) { - for (let m = 0; m< k.length; m++) { + for (let m = 0; m < k.length; m++) { if (this.sycpxOptions[i].value === k[m]) { - k[m] = this.sycpxOptions[i].label + k[m] = this.sycpxOptions[i].label } item.sycpx = k.join(',') } @@ -1546,32 +1672,32 @@ export default { }) }, // 数据搜索 清单类型 table select事件 - accessSarTypeSelect (selectData) { + accessSarTypeSelect(selectData) { this.accessSarTypeList = selectData }, // 数据搜索table分页页码改变回调 - drawerPageChange (page) { + drawerPageChange(page) { this.drawerPage = page this.sarAccessInfoSearch.page = this.drawerPage this.selectLawsStands() }, // 数据搜索table分页条数改变回调 - drawerPageSizeChange () { + drawerPageSizeChange() { this.sarAccessInfoSearch.pageSize = this.$store.getters.userInfo.configContent this.selectLawsStands() }, // 点击 导出、全部导出按钮事件 - exportAccessInfo (type) { + exportAccessInfo(type) { if (this.sarAccessInfoListArry.length > 0) { this.exportTestItemNameFlag = true this.exportName = '' - }else { + } else { this.$message.warning('请选择数据进行导出') } }, // 导出确定功能 - exportTestItem () { + exportTestItem() { let exportList = [] if (this.sarAccessInfoListArry.length > 0) { exportList = this.sarAccessInfoListArry @@ -1583,18 +1709,18 @@ export default { for (var accessInfo in exportList) { accIdAndrestype.push(exportList[accessInfo].id) } - const exportURL = interfaceUrl + 'sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById?'+ '&exportType=apart'+ '&ids=' + accIdAndrestype.join(',')+ '&exportName=' + this.exportName + const exportURL = interfaceUrl + 'sarLawsAttrDetailedList/sar-laws-attr-detailed-list/ExportLawsById?' + '&exportType=apart' + '&ids=' + accIdAndrestype.join(',') + '&exportName=' + this.exportName window.open(exportURL) this.$message.success('导出信息成功') } this.exportTestItemNameFlag = false }, // 导出取消按钮关闭模态、置空 - cancal () { + cancal() { this.exportTestItemNameFlag = false }, // 导入 beforeUpload 事件 - handleFormatbeforeUpload (file) { + handleFormatbeforeUpload(file) { let filename = file.name let index1 = filename.lastIndexOf('.') let index2 = filename.length @@ -1612,7 +1738,7 @@ export default { return true }, // 导入成功事件 - importFileSuccess (response, file, fileList) { + importFileSuccess(response, file, fileList) { var a var b = '' if (response.data) { @@ -1659,7 +1785,7 @@ export default { } }, // 点击清单条目 新增按钮 事件 - addEntry () { + addEntry() { this.editAddType = 1 this.addEditTitle = '新增' this.isDisabled = false @@ -1672,13 +1798,13 @@ export default { this.addEntryForm.authObjId = '' this.addEntryForm.proEssessUserId = '' this.addEntryForm.sarType = 'TEMP' - this.addEntryForm.attrField='' + this.addEntryForm.attrField = '' this.$nextTick(() => { this.$refs['addEntryForm'].resetFields() }) }, // 请求部门结构树 - getOrgTreeSource () { + getOrgTreeSource() { this.$http.get('sys/org/getTree', {}, {_this: this}, res => { if (res.ok) { @@ -1701,7 +1827,7 @@ export default { }) }, // 新增提交事件 - saveOrUpdateStands () { + saveOrUpdateStands() { this.isSubmit = true this.$refs['addEntryForm'].validate((valid) => { if (valid) { @@ -1755,7 +1881,8 @@ export default { this.isSubmit = false this.$message.warning('标准编号已存在') } - }, e => {}) + }, e => { + }) } else { this.isSubmit = false this.$message({ @@ -1766,7 +1893,7 @@ export default { }) }, // 标准号验证 - validateStandNumber (standinfo) { + validateStandNumber(standinfo) { return new Promise((resolve, reject) => { let obj = JSON.parse(JSON.stringify(standinfo)) this.$http.post('lawss/sarStandardsInfo/validateStandNumber', obj, { @@ -1783,7 +1910,7 @@ export default { }) }, // 表单清空 - resetForm () { + resetForm() { this.isSubmit = false this.$refs['addEntryForm'].resetFields() }, @@ -1791,7 +1918,7 @@ export default { * 赋值内容到入库标准抽屉内 * item 清单行数据 */ - copyStandDrawer (item) { + copyStandDrawer(item) { this.sarStandardsInfoEO.accessType = item.accessType this.sarStandardsInfoEO.standNumber = item.code // 标准编号 this.sarStandardsInfoEO.standName = item.name // 中文名称 @@ -1830,13 +1957,13 @@ export default { /** * 获取新增弹框的表单 */ - getAddFormFieldList (ruKu) { + getAddFormFieldList(ruKu) { return new Promise((resolve, reject) => { this.$http.get('lawss/sarStandAttrDetails/list', {}, {_this: this}, res => { if (res.ok) { // const { data: { STAND: data } } = res - const { data = {} } = res + const {data = {}} = res this.formFieldListData = data[ruKu] || [] // this.resolveFormFieldList() resolve() @@ -1846,7 +1973,7 @@ export default { }) }) }, - resolveFormFieldList (isEdit) { + resolveFormFieldList(isEdit) { const data = this.formFieldListData this.formFieldList = data.map((item) => { // FO 法规 @@ -1873,7 +2000,7 @@ export default { /** * 展示位置 */ - queryDisplayLocation (accessType) { + queryDisplayLocation(accessType) { return new Promise((resolve, reject) => { let sarType = accessType === 'INLAND_STAND' ? 'STAND' : accessType === 'FOREIGN_STAND' ? 'INLAND_STAND' : 'FOREIGN_LAWS' this.$http.get('lawssBase/utArea/getAreaList', { @@ -1889,7 +2016,7 @@ export default { }) }, // 点击查看 - handlePreview (data) { + handlePreview(data) { let routerName = data.standType === 'FOREIGN_LAWS' ? 'OtherLawsDetails' : 'OtherStandardDetails' let routeUrl = this.$router.resolve({ name: routerName, @@ -1901,7 +2028,7 @@ export default { window.open(routeUrl.href, '_blank') }, // 请求上传的文件信息 - getFileInfo () { + getFileInfo() { this.$http.get('att/attFile/getMultiFileInfos', { fileIds: this.$route.query.fileIds }, { @@ -1922,7 +2049,7 @@ export default { }) }, // 获取工作组信息下拉框信息 - getGzzOption () { + getGzzOption() { this.$http.get('lawss/sarGroupMenu/queryGroup', '', { _this: this }, res => { @@ -1939,7 +2066,7 @@ export default { }) }, // 新增、编辑标准时验证标准编号是否重复 - validCode (rule, value, callback) { + validCode(rule, value, callback) { let find = 0 this.sarAccessInfoList.map(item => { if (item.code === value) { @@ -1954,7 +2081,7 @@ export default { callback() }, // 新增、编辑项目评估角色change事件 - roleListChange (val) { + roleListChange(val) { this.ROLELIST.map(item => { if (item.value === val) { this.addEntryForm.proEssessUser = item.label @@ -1962,7 +2089,7 @@ export default { }) }, // 表格回显要求类型 - getAskType (val) { + getAskType(val) { let askTypeName = '' this.accessSarTypeOptions.map(item => { if (item.value === val) { @@ -1972,7 +2099,7 @@ export default { return askTypeName }, // 表格回显监管类型 - getAskNature (val) { + getAskNature(val) { if (!val) { val = '' } @@ -1981,7 +2108,7 @@ export default { }).map(item => item.label) return askTypeName.join(',') }, - onChecked () { + onChecked() { this.sarStandardsInfoEO.FO = '' this.sarStandardsInfoEO.XMPGJS = '' }, @@ -2014,7 +2141,7 @@ export default { this.$set(item, 'cycvppscn', '') this.$set(item, 'kccvppsbm', '') this.$set(item, 'kccvppscn', '') - }else { + } else { this.$set(item, 'zccssrqgj', item.attrInfoMap.ZCCSSRQ) this.$set(item, 'xcxssrqgj', item.attrInfoMap.XCXSSRQ) this.$set(item, 'sycpx', item.attrInfoMap.SYCPX) @@ -2031,7 +2158,7 @@ export default { }) }, // 将文本状态的id与name对应 - setMap(data){ + setMap(data) { data.forEach(item => { this.$set(this.countryAreaMap, item.value, item.label) this.$set(this.textStatusMap, item.value, item.label) @@ -2044,7 +2171,7 @@ export default { }, watch: { // 监听 清单类型 - isListType (newVal, oldVal) { + isListType(newVal, oldVal) { this.sarAccessInfoSearchList = [] this.sarAccessInfoSearch.page = 1 this.selectedAccInfoSearchList = [] @@ -2054,8 +2181,8 @@ export default { computed: { ...mapGetters(['getAccessStandardRegRow']), }, - mounted () { - this.zqaId =this.$route.query.id; + mounted() { + this.zqaId = this.$route.query.id; this.page = this.$route.query.page this.Size = this.$route.query.Size // this.getData() @@ -2121,43 +2248,50 @@ export default { }