From 47237dc9177d3a6e719e556ef284ee6dacfb683d Mon Sep 17 00:00:00 2001 From: yanyizhou <2311759275@qq.com> Date: Fri, 20 Aug 2021 09:54:00 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accessStandardsAndRegulations/pages/addEdit.vue | 4 ++-- .../pages/projectAddEit.vue | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue index cf8d0d45c..9c96bcccc 100644 --- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue +++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue @@ -1360,11 +1360,11 @@ export default { loading: 'loadData' }, res => { if (res.ok) { - if(res.message === '修改成功'){ this.$router.push({ name: 'AccessStandardsAndRegulations' }) - } + }else { + this.$message.error('已存在此国家/地区清单,修改失败') } }, e => { }) diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/projectAddEit.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/projectAddEit.vue index 6761aa645..f8afe0544 100644 --- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/projectAddEit.vue +++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/projectAddEit.vue @@ -1289,10 +1289,12 @@ export default { loading: 'loadData' }, res => { if (res.ok) { - this.isNext = true - this.$router.push({ - name: 'AccessStandardsAndRegulations' - }) + this.isNext = true + this.$router.push({ + name: 'AccessStandardsAndRegulations' + }) + }else { + this.$message.error('已存在此车型类别清单,修改失败') } }, e => { }) From 4d7e95ed643d5d05f017c8c67a53375803336f62 Mon Sep 17 00:00:00 2001 From: yanyizhou <2311759275@qq.com> Date: Fri, 20 Aug 2021 10:02:43 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accessStandardsAndRegulations/pages/otherAddEit.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/otherAddEit.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/otherAddEit.vue index 0e535e5b0..5013827b8 100644 --- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/otherAddEit.vue +++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/otherAddEit.vue @@ -1304,6 +1304,7 @@ export default { }, res => { if (res.ok) { this.isNext = true + this.$message.success('修改成功') this.$router.push({ name: 'AccessStandardsAndRegulations' }) From 05fc5466f2030723231d8799042efde2e81fdd17 Mon Sep 17 00:00:00 2001 From: yanyizhou <2311759275@qq.com> Date: Fri, 20 Aug 2021 10:09:34 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=85=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/addEdit.vue | 9 +- .../pages/projectAddEit.vue | 868 +++++++++--------- 2 files changed, 456 insertions(+), 421 deletions(-) diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue index 9c96bcccc..286380794 100644 --- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue +++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue @@ -1360,10 +1360,11 @@ export default { loading: 'loadData' }, res => { if (res.ok) { - this.$router.push({ - name: 'AccessStandardsAndRegulations' - }) - }else { + this.$message.success('修改成功') + this.$router.push({ + name: 'AccessStandardsAndRegulations' + }) + } else { this.$message.error('已存在此国家/地区清单,修改失败') } }, e => { diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/projectAddEit.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/projectAddEit.vue index f8afe0544..43f6c4d65 100644 --- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/projectAddEit.vue +++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/projectAddEit.vue @@ -6,50 +6,51 @@ 基础信息
- +



点击上传 @@ -69,35 +70,36 @@ + type="primary" + class="common-button-primary" + size="small" + @click="searchLawsStands"> 查询 清空 + class="common-button-default" + size="small" + @click="clearSearchLaws">清空 + @@ -109,52 +111,52 @@
- + + style="width: 165px;" + v-model="sarAccessInfo.standNumber" + placeholder="请输入" + size="small" + clearable/> + style="width: 165px" + v-model="sarAccessInfo.standName" + placeholder="请输入" + size="small" + clearable/> @@ -165,105 +167,108 @@
添加 + class="common-button-default" + size="mini" @click="addSarAccess">添加 + {{$t('m.showAddDataList')}} + class="common-button-default" + v-if="showTableFlag" + size="mini" @click="isShowTable" + >{{ $t('m.showAddDataList') }} + {{$t('m.hideAddDataList')}} + class="common-button-default" + v-if="!showTableFlag" + size="mini" + @click="isShowTable" + >{{ $t('m.hideAddDataList') }} +
+ prop="standNumber" + show-overflow-tooltip + fixed="left" + align="center" + width="180px" + label="标准号"> + prop="issueTime" + sortable + align="center" + label="发布日期"> + prop="xcxssrqgj" + sortable + align="center" + label="新车型实施日期"> + show-overflow-tooltip + prop="zccssrqgj" + sortable + align="center" + label="在产车实施日期"> + show-overflow-tooltip + prop="textStatus" + width="120px" + align="center" + label="文本状态"> @@ -271,7 +276,7 @@ - {{$t('m.dataAcquisition')}} + {{ $t('m.dataAcquisition') }}
@@ -279,177 +284,186 @@ 清单条目
导出 + class="common-button-default export-button" + size="mini" @click="exportAccessInfo('apart')" + v-btn-permission="''" + >导出 + 删除 + class="common-button-default delete-button" + size="mini" @click="deleteSelectSarAccessInfo" + v-btn-permission="''" + >删除 +
+ type="selection" + width="55" + align="center"> + prop="standNumber" + show-overflow-tooltip + width="180px" + fixed="left" + align="center" + label="标准号"> + 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中文名称"> @@ -459,19 +473,20 @@ 取消 - 提交 + 提交
@@ -480,14 +495,14 @@ - + @@ -503,26 +518,26 @@ + v-model.trim="editRowData.ssrq" + type="date" + value-format="yyyy-MM-dd" + placeholder="选择日期"> + v-model.trim="editRowData.zccssrqgj" + type="date" + value-format="yyyy-MM-dd" + placeholder="选择日期"> + v-model.trim="editRowData.xcxssrqgj" + type="date" + value-format="yyyy-MM-dd" + placeholder="选择日期"> @@ -546,19 +561,21 @@ @@ -579,14 +596,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 {mapGetters} from 'vuex' import {interfaceUrl} from "@/sysConfig"; import {dicTypeData, StandardsInfoPage} from "@/api/unqualProcess" + export default { name: 'OtherAddEit', components: { @@ -609,10 +627,10 @@ export default { CustomInputForPolicy, CustomRoleTree }, - data () { + data() { return { textStatusMap: {}, - selectSearch : [], + selectSearch: [], // 新增、编辑 基础信息字段 sarAccessEO: { id: '', @@ -637,7 +655,7 @@ export default { editRowData: { id: '', standName: '', - standSortShow:'', + standSortShow: '', standEnName: '', typeApplicable: '', syrz: '', @@ -900,31 +918,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: [], // 存储从接口取过来的原始数据 @@ -950,13 +968,13 @@ export default { }, methods: { // 高级检索 - selectMoreBtn () { + selectMoreBtn() { this.showSelectBox = !this.showSelectBox this.showTableFlag = false this.selectLawsStands() }, // 法规维护人树 - getDept () { + getDept() { return new Promise((resolve, reject) => { let url = 'sys/org/getTree' this.$http.get(url, {}, { @@ -986,11 +1004,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 @@ -1001,20 +1019,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等文件') @@ -1027,24 +1045,24 @@ export default { } return true }, - moreSearch () { + moreSearch() { this.selectLawsStands() 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.standName = '' this.sarAccessInfo.standName = '' this.sarAccessInfo.standNumber = '' @@ -1057,14 +1075,14 @@ export default { this.selectLawsStands() }, // 数据来源change事件 - dataSourceChange (val) { + dataSourceChange(val) { this.isListType = val === 'TEMP' this.sarAccessInfoSearch.advanceSearchVOStr = '' // 国内标准法规可查字段 - if (val === 'INLAND_STAND'){ + if (val === 'INLAND_STAND') { this.selectLawsStands() // 海外标准法规可查字段 - }else if (val === 'FOREIGN_STAND'){ + } else if (val === 'FOREIGN_STAND') { this.selectLawsStands() // 国内外政策可查字段 } @@ -1073,21 +1091,21 @@ 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){ + return items.id === item.id + }) + if (addList > -1) { // this.$refs.accessTypeSelect.clearSelection() this.$refs.entryTable.clearSelection() this.$refs.searchTable.clearSelection() this.$message.warning('请勿添加重复数据') - } else{ + } else { this.sarAccessInfoList.push(item) // this.$refs.accessTypeSelect.clearSelection() this.$refs.entryTable.clearSelection() @@ -1102,7 +1120,7 @@ export default { } }, // 上移 事件 - moveUp (index, row) { + moveUp(index, row) { if (index === 0) { this.$message({ message: '已经是列表中第一个素材!', @@ -1114,7 +1132,7 @@ export default { this.$set(this.sarAccessInfoList, index, temp) } }, - moveDown (index) { + moveDown(index) { if (index === (this.sarAccessInfoList.length - 1)) { this.$message({ message: '已经是列表中最后一个素材!', @@ -1143,21 +1161,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: '确定', @@ -1179,26 +1197,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 = [] @@ -1207,19 +1226,19 @@ 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 { + } else { rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString()) } if (this.sarAccessInfoList[i].zccssrqgj === null) { rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-') - }else { + } else { rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString()) } } @@ -1289,17 +1308,18 @@ export default { loading: 'loadData' }, res => { if (res.ok) { - this.isNext = true - this.$router.push({ - name: 'AccessStandardsAndRegulations' - }) - }else { + this.isNext = true + this.$message.success('修改成功') + this.$router.push({ + name: 'AccessStandardsAndRegulations' + }) + } else { this.$message.error('已存在此车型类别清单,修改失败') } }, e => { }) } - }else { + } else { this.$message.error('请检查表单是否填写正确') } }) @@ -1400,9 +1420,9 @@ 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++) { + for (let m = 0; m < k.length; m++) { if (this.zrbmOptions[i].value === k[m]) { - k[m] = this.zrbmOptions[i].label + k[m] = this.zrbmOptions[i].label } item.zrbm = k.join(',') } @@ -1412,9 +1432,9 @@ export default { 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(',') } @@ -1424,9 +1444,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(',') } @@ -1436,9 +1456,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(',') } @@ -1448,9 +1468,9 @@ export default { if (item.syrz !== null) { let k = (item.syrz || "").split(',') for (let i in this.syrzOptions) { - for (let m = 0; m< k.length; m++) { + for (let m = 0; m < k.length; m++) { if (this.syrzOptions[i].value === k[m]) { - k[m] = this.syrzOptions[i].label + k[m] = this.syrzOptions[i].label } item.syrz = k.join(',') } @@ -1473,7 +1493,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) @@ -1490,7 +1510,7 @@ export default { }, // 查询数据搜索 table 数据 pageInfo() { - StandardsInfoPage(this.sarAccessInfoSearch).then(res =>{ + StandardsInfoPage(this.sarAccessInfoSearch).then(res => { this.sarAccessInfoSearchList = res.data.list this.sarAccessInfoSearchList.forEach(item => { if (item.standYear === null) { @@ -1506,7 +1526,7 @@ export default { }) }, // 查询按钮 - selectLawsStands () { + selectLawsStands() { if (this.sarAccessInfoSearch.dataSource === 'INLAND_STAND') { this.sarAccessInfoSearch.standType = 'INLAND' this.pageInfo() @@ -1517,7 +1537,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) { @@ -1543,11 +1563,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 => { this.addWord(item) @@ -1555,32 +1575,32 @@ export default { this.changeText(this.selectedAccInfoSearchList) }, // 数据搜索 清单类型 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 exportNames = this.exportName let exportList = [] if (this.sarAccessInfoListArry.length > 0) { @@ -1593,7 +1613,7 @@ 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) // window.location.href = '/api/lawss/sarSarAccessInfo/exportSarSarAccessInfo?idAndSartypeList=' + accIdAndrestype.join(',') + '&exportType=apart' + '&exportName=' + exportNames this.$message.success('导出信息成功') @@ -1603,11 +1623,11 @@ export default { 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 @@ -1625,7 +1645,7 @@ export default { return true }, // 导入成功事件 - importFileSuccess (response, file, fileList) { + importFileSuccess(response, file, fileList) { var a var b = '' if (response.data) { @@ -1672,7 +1692,7 @@ export default { } }, // 点击清单条目 新增按钮 事件 - addEntry () { + addEntry() { this.editAddType = 1 this.addEditTitle = '新增' this.isDisabled = false @@ -1685,36 +1705,36 @@ 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) { - 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] + 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 - this.depFONode = treeNode - this.depRoleNode = treeNode - } - }) + treeNode[index] = treeItem + }) + this.depNode = treeNode + this.depFONode = treeNode + this.depRoleNode = treeNode + } + }) }, // 新增提交事件 - saveOrUpdateStands () { + saveOrUpdateStands() { this.isSubmit = true this.$refs['addEntryForm'].validate((valid) => { if (valid) { @@ -1768,7 +1788,8 @@ export default { this.isSubmit = false this.$message.warning('标准编号已存在') } - }, e => {}) + }, e => { + }) } else { this.isSubmit = false this.$message({ @@ -1779,7 +1800,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, { @@ -1796,30 +1817,30 @@ export default { }) }, // 表单清空 - resetForm () { + resetForm() { this.isSubmit = false this.$refs['addEntryForm'].resetFields() }, /** * 获取新增弹框的表单 */ - 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 - this.formFieldListData = data[ruKu] || [] - // this.resolveFormFieldList() - resolve() - } - }, e => { - reject(e) - }) + res => { + if (res.ok) { + // const { data: { STAND: data } } = res + const {data = {}} = res + this.formFieldListData = data[ruKu] || [] + // this.resolveFormFieldList() + resolve() + } + }, e => { + reject(e) + }) }) }, - resolveFormFieldList (isEdit) { + resolveFormFieldList(isEdit) { const data = this.formFieldListData this.formFieldList = data.map((item) => { // FO 法规 @@ -1846,7 +1867,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', { @@ -1862,7 +1883,7 @@ export default { }) }, // 点击查看 - handlePreview (data) { + handlePreview(data) { let routerName = data.standType === 'FOREIGN_LAWS' ? 'OtherLawsDetails' : 'OtherStandardDetails' let routeUrl = this.$router.resolve({ name: routerName, @@ -1874,7 +1895,7 @@ export default { window.open(routeUrl.href, '_blank') }, // 请求上传的文件信息 - getFileInfo () { + getFileInfo() { this.$http.get('att/attFile/getMultiFileInfos', { fileIds: this.$route.query.fileIds }, { @@ -1895,7 +1916,7 @@ export default { }) }, // 获取工作组信息下拉框信息 - getGzzOption () { + getGzzOption() { this.$http.get('lawss/sarGroupMenu/queryGroup', '', { _this: this }, res => { @@ -1912,7 +1933,7 @@ export default { }) }, // 新增、编辑标准时验证标准编号是否重复 - validCode (rule, value, callback) { + validCode(rule, value, callback) { let find = 0 this.sarAccessInfoList.map(item => { if (item.code === value) { @@ -1927,7 +1948,7 @@ export default { callback() }, // 新增、编辑项目评估角色change事件 - roleListChange (val) { + roleListChange(val) { this.ROLELIST.map(item => { if (item.value === val) { this.addEntryForm.proEssessUser = item.label @@ -1935,7 +1956,7 @@ export default { }) }, // 表格回显要求类型 - getAskType (val) { + getAskType(val) { let askTypeName = '' this.accessSarTypeOptions.map(item => { if (item.value === val) { @@ -1945,7 +1966,7 @@ export default { return askTypeName }, // 表格回显监管类型 - getAskNature (val) { + getAskNature(val) { if (!val) { val = '' } @@ -1955,7 +1976,7 @@ export default { return askTypeName.join(',') }, - onChecked () { + onChecked() { this.sarStandardsInfoEO.FO = '' this.sarStandardsInfoEO.XMPGJS = '' }, @@ -1986,7 +2007,7 @@ export default { }) }, // 将文本状态的id与name对应 - setMap(data){ + setMap(data) { data.forEach(item => { this.$set(this.textStatusMap, item.value, item.label) }) @@ -2001,7 +2022,7 @@ export default { }, watch: { // 监听 清单类型 - isListType (newVal, oldVal) { + isListType(newVal, oldVal) { this.sarAccessInfoSearchList = [] this.sarAccessInfoSearch.page = 1 this.drawerTotal = 0 @@ -2012,8 +2033,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() @@ -2079,40 +2100,46 @@ export default { }