From 514fb252526f2aa2a2fce79bda864ba6aedbfc1d Mon Sep 17 00:00:00 2001 From: Jaunty <15613469426@163.com> Date: Fri, 16 Jul 2021 15:53:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E5=87=86=E6=B3=95=E8=A7=84=E5=9B=BD?= =?UTF-8?q?=E5=AE=B6=E5=9C=B0=E5=8C=BA=E6=B8=85=E5=8D=95=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E3=80=81=E7=BC=96=E8=BE=91=E9=A1=B5=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/addEdit.vue | 481 ++---------------- 1 file changed, 39 insertions(+), 442 deletions(-) diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue index 68f4be520..16f7f8735 100644 --- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue +++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue @@ -307,7 +307,7 @@ 提交 - - - - - - -
- -
- - - - - - - - - - - - - - - - - {{ opt.label}} - - - - - - - - - - {{ opt.label}} - - - - - - {{ opt.label}} - - - - - - {{ opt.label}} - - - - -
- - 查询 - - - 清空 - -
-
-
-
- - - - - - - - - - - - { let addList; - addList = this.stahndinfoList.findIndex(items => { + addList = this.sarAccessInfoList.findIndex(items => { return items.id == item.id }) if(addList > -1){ @@ -1184,7 +1022,7 @@ export default { this.$refs.entryTable.clearSelection() this.$refs.searchTable.clearSelection() } else{ - this.stahndinfoList.push(item) + this.sarAccessInfoList.push(item) this.$refs.accessTypeSelect.clearSelection() this.$refs.entryTable.clearSelection() this.$refs.searchTable.clearSelection() @@ -1202,21 +1040,21 @@ export default { type: 'warning' }) } else { - let temp = this.stahndinfoList[index - 1] - this.$set(this.stahndinfoList, index - 1, this.stahndinfoList[index]) - this.$set(this.stahndinfoList, index, temp) + let temp = this.sarAccessInfoList[index - 1] + this.$set(this.sarAccessInfoList, index - 1, this.sarAccessInfoList[index]) + this.$set(this.sarAccessInfoList, index, temp) } }, moveDown (index) { - if (index === (this.stahndinfoList.length - 1)) { + if (index === (this.sarAccessInfoList.length - 1)) { this.$message({ message: '已经是列表中最后一个素材!', type: 'warning' }) } else { - let i = this.stahndinfoList[index + 1] - this.$set(this.stahndinfoList, index + 1, this.stahndinfoList[index]) - this.$set(this.stahndinfoList, index, i) + let i = this.sarAccessInfoList[index + 1] + this.$set(this.sarAccessInfoList, index + 1, this.sarAccessInfoList[index]) + this.$set(this.sarAccessInfoList, index, i) } }, // 点击清单条目导入按钮事件 @@ -1235,7 +1073,7 @@ export default { * 删除不想添加的AccessInfo信息 */ deleteSelectSarAccessInfo () { - if (this.stahndinfoListArry.length > 0) { + if (this.sarAccessInfoListArry.length > 0) { this.$confirm('确认删除选中数据?', '确认删除', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -1245,14 +1083,14 @@ export default { }).then(() => { // i 全部对象数组的下标 // s 选中对象数组的下标 - for (var s in this.stahndinfoListArry) { - for (var i in this.stahndinfoList) { - if (this.stahndinfoListArry[s].uuid === this.stahndinfoList[i].uuid) { - this.stahndinfoList.splice(i, 1) + for (var s in this.sarAccessInfoListArry) { + for (var i in this.sarAccessInfoList) { + if (this.sarAccessInfoListArry[s].uuid === this.sarAccessInfoList[i].uuid) { + this.sarAccessInfoList.splice(i, 1) } } } - this.stahndinfoListArry = [] + this.sarAccessInfoListArry = [] this.$refs.entryTable.clearSelection() }).catch(() => {}) } else { @@ -1261,8 +1099,8 @@ export default { }, // 清单条目 table select事件 sarAccessInfoSelect (selectData) { - this.stahndinfoListArry = selectData - let stahndinfoListArryId = [] + this.sarAccessInfoListArry = selectData + let sarAccessInfoListArryId = [] for(let i=0; i { if (valid) { let rowlist = [] - for (let i = 0; i < this.stahndinfoList.length; i++) { - rowlist.push(this.stahndinfoList[i].id) + for (let i = 0; i < this.sarAccessInfoList.length; i++) { + rowlist.push(this.sarAccessInfoList[i].id) } rowlist = rowlist.join(',') let sarAccessEO = JSON.parse(JSON.stringify(this.sarAccessEO)) @@ -1331,10 +1169,7 @@ export default { }, // 查询数据搜索 table 数据 selectLawsStands () { - this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage', { - ...this.sarAccessInfoSearch, - ...this.sarStandardsSearch - }, { + this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage', this.sarAccessInfoSearch, { _this: this }, res =>{ this.sarAccessInfoSearchList = res.data.list @@ -1348,6 +1183,7 @@ export default { // 数据搜索 table select事件 sarAccessInfoSearchSelect (val) { this.selectedAccInfoSearchList = val + console.log(val) }, // 数据搜索 清单类型 table select事件 accessSarTypeSelect (selectData) { @@ -1373,10 +1209,10 @@ export default { exportTestItem () { let exportNames = this.exportName let exportList = [] - if (this.stahndinfoListArry.length > 0) { - exportList = this.stahndinfoListArry + if (this.sarAccessInfoListArry.length > 0) { + exportList = this.sarAccessInfoListArry } else { - exportList = this.stahndinfoList + exportList = this.sarAccessInfoList } if (exportList != null && exportList.length > 0) { let accIdAndrestype = [] @@ -1417,9 +1253,9 @@ export default { var a var b = '' if (response.data) { - for (var sADMIN in this.stahndinfoListADMIN) { + for (var sADMIN in this.sarAccessInfoListADMIN) { for (var iADMIN in response.data) { - if (this.stahndinfoListADMIN[sADMIN].code === response.data[iADMIN].code) { + if (this.sarAccessInfoListADMIN[sADMIN].code === response.data[iADMIN].code) { // ('在全部对象中的位置' + i) response.data.splice(i, 1) b = '数据重复添加,现已自动清除! ' @@ -1428,7 +1264,7 @@ export default { } if (response.data.length > 0) { for (let i = 0; i < response.data.length; i++) { - this.stahndinfoList.push(response.data[i]) + this.sarAccessInfoList.push(response.data[i]) } } a = response.data.length @@ -1537,16 +1373,16 @@ export default { nowstandinfo.askNature = nowstandinfo.askNature.join(',') // 判断新增还是编辑 if (this.editAddType === 1) { - this.stahndinfoList.push(nowstandinfo) - this.stahndinfoList[this.stahndinfoList.length - 1].uuid = this.number + this.sarAccessInfoList.push(nowstandinfo) + this.sarAccessInfoList[this.sarAccessInfoList.length - 1].uuid = this.number this.number++ this.isSubmit = false this.$message.success('添加成功') } else { - this.stahndinfoList.map((item, index) => { + this.sarAccessInfoList.map((item, index) => { if (item.uuid === nowstandinfo.uuid) { - // this.stahndinfoList[index] = nowstandinfo - this.$set(this.stahndinfoList, index, nowstandinfo) + // this.sarAccessInfoList[index] = nowstandinfo + this.$set(this.sarAccessInfoList, index, nowstandinfo) } }) this.isSubmit = false @@ -1742,7 +1578,7 @@ export default { // 新增、编辑标准时验证标准编号是否重复 validCode (rule, value, callback) { let find = 0 - this.stahndinfoList.map(item => { + this.sarAccessInfoList.map(item => { if (item.code === value) { find++ } @@ -1793,176 +1629,10 @@ export default { this.$http.get('sarLawsAttrDetailedList/sar-laws-attr-detailed-list/selectLawsById', {id: this.zqaId}, { _this: this }, res => { - this.stahndinfoList = res.data + this.sarAccessInfoList = res.data }, e => { }) - }, - treeClick (treeNode) { - this.selectSarMenu = treeNode - this.standCommonlySearch.menuId = treeNode.id - this.sarStandardsSearch.menuId = treeNode.id // 将当前二级菜单的id传回后台做标准的条件查询 - this.sarStandardsSearch.page = 1 - this.standCommonlySearch.page = 1 - this.getDomesticStandardTable(this.tableFlag) - }, - // 分页查询国内标准 - getDomesticStandardTable (item) { - if (item !== '' && item !== null && item !== undefined) { - item.pageSize = this.$store.getters.userInfo.configContent - } - this.sarStandardsSearch.pageSize = this.$store.getters.userInfo.configContent - const data = item || this.sarStandardsSearch - if (item) { - this.sarStandardsSearch.advanceSearchVOStr = item.advanceSearchVOStr - } - // this.sarStandardsSearch.menuId = this.selectSarMenu.id - const formData = {...data} - if (!item) { - formData.menuId = this.sarStandardsSearch.menuId - } else { - formData.menuId = this.selectSarMenu.id - } - - // 排序 - formData.orderBy = this.orderBy - // 处理我的收藏和个性化标签传参 - if (this.selectSarMenu.id === 'wdsc') { - formData.menuId = undefined - formData.labelMenuId = undefined - formData.collectMenuId = 'wdsc' - } else if (this.selectSarMenu.id === 'gxhbq' || this.selectSarMenu.pId === 'gxhbq') { - formData.menuId = undefined - formData.labelMenuId = this.selectSarMenu.id - formData.collectMenuId = undefined - } else { - formData.labelMenuId = undefined - formData.collectMenuId = undefined - } - formData.standType = 'INLAND' - this.SarExportSearchEo = formData - this.loading = true - this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage', formData, { - _this: this, loading: 'loading' - }, res => { - this.isAdvancedSearch = false - this.loading = false - if (res.ok) { - for (let i = 0; i < res.data.list.length; i++) { - res.data.list[i].checked = false - if (res.data.list[i].collectId != null && res.data.list[i].collectId !== '') { - res.data.list[i].collectBtn = false - res.data.list[i].cancelCollectBtn = true - } else { - res.data.list[i].collectBtn = true - res.data.list[i].cancelCollectBtn = false - } - res.data.list[i].isSubmit = false - if (res.data.list[i].attrInfoMap && res.data.list[i].attrInfoMap.XCXSSRQ) { - res.data.list[i].XCXSSRQ = res.data.list[i].attrInfoMap.XCXSSRQ - } - if (res.data.list[i].attrInfoMap && res.data.list[i].attrInfoMap.ZCCSSRQ) { - res.data.list[i].ZCCSSRQ = res.data.list[i].attrInfoMap.ZCCSSRQ - } - } - this.stahndinfoList = res.data.list - this.total = res.data.count - if ((this.stahndinfoList.length === 0 || this.stahndinfoList === []) && this.sarStandardsSearch.page !== 1) { - this.pageChange(1) - } - } else { - this.$message.error(res.message) - } - }, e => { - this.loading = false - this.stahndinfoList = [] - this.total = 0 - }) - }, - // 点击搜索按钮 - searchBtnClick (standCommonlySearch) { - let item = this.standCommonlySearch - this.getDomesticStandardTable(item) - this.isAdvancedSearch = false - this.selectLawsStands() - }, - // 搜索 - getDomesticStandardTableBtn (item) { - this.tableFlag = item - item.page = 1 - item.sarStandardsSearch = '' - this.getDomesticStandardTable(item) - }, - // 提交配置搜索项 - saveConfigStand () { - let search = {} - search.menuId = this.selectSarMenu.id - if (this.selectConfigStand.length === 0) { - this.$message({ - showClose: true, - message: '请至少选择一条标准', - type: 'warning' - }) - } else { - search.idlist = this.selectConfigStand - this.$http.postData('sarStandardsInfo/sar-standards-info/saveStandardsMenu', search, { - _this: this, - loading: 'isSubmit' - }, res => { - if (res.ok) { - this.configStandFlag = false - // this.$message({ - // showClose: true, - // message: '配置标准成功!', - // type: 'success' - // }) - this.getDomesticStandardTable(this.tableFlag) - } - }, e => { - }) - } - }, - // 清空搜索框 - clearAllSearch (flag) { - this.isAdvancedSearch = false - if (flag === 'sarStandardsSearch') { - // 标准搜索 - this.sarStandardsSearch.country = '' - this.sarStandardsSearch.standSort = '' - this.sarStandardsSearch.standNumber = '' - this.sarStandardsSearch.standName = '' - this.sarStandardsSearch.standState = '' - this.sarStandardsSearch.standNature = '' - this.sarStandardsSearch.issueTime = '' - this.sarStandardsSearch.applyArctic = '' - this.sarStandardsSearch.replaceStandNum = '' - this.sarStandardsSearch.replacedStandNum = '' - this.sarStandardsSearch.synopsis = '' - this.sarStandardsSearch.category = '' - this.pageChange(1) - this.getDomesticStandardTable(this.sarStandardsSearch) - } else if (flag === 'standCommonlySearch') { - this.standCommonlySearch.standSort = '' - this.standCommonlySearch.standNumber = '' - this.pageChange(1) - this.getDomesticStandardTable(this.standCommonlySearch) - } else if (flag === 2) { - // 标准条目搜索 - this.standItemSearch.responsibleUnit = '' - this.standItemSearch.orgName = '' - } else { - this.configPage = 1 - // 游离标准搜索清空 - this.sarConfigStandSearch.standSort = '' - this.sarConfigStandSearch.standNumber = '' - this.sarConfigStandSearch.standName = '' - this.sarConfigStandSearch.category = '' - this.sarConfigStandSearch.standNature = '' - this.sarConfigStandSearch.synopsis = '' - this.sarConfigStandSearch.applyArctic = '' - this.sarConfigStandSearch.replaceStandNum = '' - this.selectConfiguraStand() - } - }, + } }, watch: { // 监听 清单类型 @@ -1976,59 +1646,6 @@ export default { }, computed: { ...mapGetters(['getAccessStandardRegRow']), - created(){ - }, - async mounted () { - // 进入页面后查询树形结构目录 - await this.selectMenu() - // 进入页面后查询标准体系树形结构目录 - await this.selectStandardMenu() - this.treeReload = true - // 从数据库中查询各下拉框数据 - this.$http.get('sys/dictype/getDicTypeListCode', '', { - _this: this - }, res => { - this.allSelectOptions = res.data || {} - this.standSortOptions = res.data.STANDCLASSIFY // 标准类别 - this.standNatureOptions = res.data.SARPROPERTY // 标准性质 - this.standStateOptions = res.data.WBZTCLASS // 文本状态 - this.standSystemOptions = res.data.BZTXCLASS // 标准体系 - this.categoryOptions = res.data.NYLXCLASS // 能源类型 - this.applyAuthOptions = res.data.SYRZCLASS // 适用认证 - this.cysdOptions = res.data.WSCYSD // 我司参与深度 - this.zrbmOptions = res.data.ZRBMCLASS // 责任部门 - this.zrgcsOptions = res.data.ZRGCSCLASS // 责任工程师 - this.txlbOptions = res.data.TXLBCLASS // 体系类别 - this.getGzzOption() - }, e => { - }) - this.getDomesticStandardTable(this.tableFlag) - // 加载所有的部门 - this.getOrgTreeSource() - // 加载动态表单数据 - this.getAddFormFieldList() - this.getDept() - }, - destroyed () { - this.allSelectOptions = {} - this.countryOptions = [] - this.regionOptions = [] - this.standSortOptions = [] - this.applyArcticOptions = [] - this.standStateOptions = [] - this.standNatureOptions = [] - this.adoptExtentOptions = [] - this.emergyKindOptions = [] - this.applyAuthOptions = [] - this.categoryOptions = [] - this.assemClassOptions = [] - this.categoryConfigOptions = [] - this.standAttributeList = [] - this.zNodesS = [] - this.zNodesSItem = [] - this.searchInlandNodes = [] - this.orgData = [] - } }, mounted () { this.zqaId =this.$route.query.id; @@ -2040,8 +1657,7 @@ export default { }, res => { this.allSelectOptions = res.data || {} this.regionOptions = res.data.REGION // 基础信息 区域list - this.applyArcticOptions = res.data.ENERGYTYPES || [] // 基础车型 适用车型list - this.sycpxOptions = res.data.SYCPXCLASS || []// 适用产品线 + this.applyArcticOptions = res.data.PRODUCTTYPE || [] // 基础车型 适用车型list this.energyKindOptions = res.data.ENERGYTYPES || [] // 能源种类list this.drawerCountryOptions = res.data.COUNTRY // 国家、地区list this.applyOptions = res.data.COUNTRY //适用区域list @@ -2152,23 +1768,4 @@ export default { margin: 2px; } } -.label-input-form { - &.table-lattice{ - /deep/.el-form-item__label { - width:100px; - height:30px; - border: 1px solid #DCDFE6; - border-right: none; - line-height:30px; - text-align: center; - margin-top: 7px; - background: #F9F9F9; - } - /deep/.el-input__inner { - height: 30px; - line-height: 30px; - border-radius: 0 !important; - } - } -} \ No newline at end of file