diff --git a/src/pages/regulatoryRepository/workingGroup/components/workingGroup1/index.vue b/src/pages/regulatoryRepository/workingGroup/components/workingGroup1/index.vue index 911cd821f..bb4176af5 100644 --- a/src/pages/regulatoryRepository/workingGroup/components/workingGroup1/index.vue +++ b/src/pages/regulatoryRepository/workingGroup/components/workingGroup1/index.vue @@ -18,7 +18,7 @@ size="mini" class="common-button-primary" v-if="addItemButton" - @click=""> + @click="addItem2"> 新增标准 + @click="handlePreview(standId)"> 查看标准 - + 取消 + +
+
+ + + + + + + + +
+
+ + + + + + + + + + + +
+
+ +
0) { + this.submitLoading = true + let row = JSON.parse(JSON.stringify(this.row)) + let row1 = row + row1.pid = row.id + row1.id = '' + row1.level = '4' + row1.nature = '4' + row1.wgStandorpolicyInfos = [] + this.ItemList.forEach(item => { + row1.wgStandorpolicyInfos.push({ + standId: item.id + }) + }) + this.$http.postData('wg_work_group/addStand', row1, { + _this: this + }, res => { + if (res.ok) { + this.submitLoading = false + this.addDrawer2 = false + if (res.ok) { + this.headerNo = false + this.$message.success('添加成功') + this.destoryGraph() + this.getData() + } else { + this.$message.warning('添加失败') + } + } + }) + } else { + this.$message.warning('请选择要带入的标准') + } + }, // 提交标准事件 + selectChange (val) { + this.itemType = val + this.getItemData() + }, // 切换数据来源事件 + handlePreview (val) { + let Type = '' + let url = '' + if (this.itemType === 'INLAND') { + Type = 'INLAND_STAND' + url = 'OtherStandardDetails' + } else if (this.itemType === 'FOREIGN') { + Type = 'FOREIGN_STAND' + url = 'OtherStandardDetails' + } else if (this.itemType === '3'){ + url = 'OtherBussStandardDetails' + Type = 'BUSINESS_STAND' + } + let routeUrl = this.$router.resolve({ + name: url, + params: { + id: val, + pageType: Type + } + }) + window.open(routeUrl.href, '_blank') + }, // 标准跳转 + pageChange (page) { + this.page = page + this.getItemData() + }, // 分页 + pageSizeChange (pageSize) { + this.pageSize = pageSize + this.getItemData() + }, // 分页 + changeItem (val) { + this.ItemList = val + }, // 标准选中change事件 + getItemData () { + if (this.itemType === '3') { + this.$http.get('lawss/sarBussionessStand/getSarBussionStandPage', { + page: this.page, + pageSize: this.pageSize + }, { + _this: this, + }, res => { + this.data1 = res.data.list + this.count = res.data.count + }, e => { + }) + } else { + this.$http.get("sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage", { + standType: this.itemType, + standNumber: '', + page: this.page, + pageSize: this.pageSize + }, { + _this: this + }, res => { + this.data1 = res.data.list; + this.count = res.data.count; + }, e => { + }); + } + }, // 获取标准数据 + addItem2 () { + this.addDrawer2 = true + this.getItemData() + }, // 点击添加标准事件 + addDrawerClose2 () { + this.addDrawer2 = false + }, // 关闭添加标准事件 + updateFile (item) { window.location.href = '/api/att/attFile/downloadFile?fileId=' + item.id }, @@ -982,14 +1193,15 @@ this.DrawerType = 'edit' let row = this.row if (row.level === '0') { - this.addDrawerTitle = '编辑标委会' } else if (row.level === '1') { - this.addDrawerTitle = '编辑分标委' + this.addDrawerTitle = '编辑标委会' } else if (row.level === '2') { - this.addDrawerTitle = '编辑工作组' + this.addDrawerTitle = '编辑分标委' } else if (row.level === '3') { + this.addDrawerTitle = '编辑工作组' + } else if (row.level === '4') { this.addDrawerTitle = '编辑标准' - } else if (row.level === '4') {} + } this.getArr(row.wgDepts) this.getArr(row.wgPayInfos) this.getArr(row.wgMeetingInfos) @@ -1027,7 +1239,7 @@ changeTime: row.changeTime, mark: row.mark, standerArea: row.standerArea, - itemType: row.level === '0' ? '标委会' : (row.level === '1' ? '分标委' : (row.level === '2' ? '工作组' : '标准')) + itemType: row.level === '1' ? '标委会' : (row.level === '2' ? '分标委' : (row.level === '3' ? '工作组' : '标准')) } this.addDrawer = true }, // 编辑 @@ -1035,14 +1247,15 @@ this.DrawerType = 'see' let row = this.row2 if (row.level === '0') { - this.addDrawerTitle = '查看标委会' } else if (row.level === '1') { - this.addDrawerTitle = '查看分标委' + this.addDrawerTitle = '查看标委会' } else if (row.level === '2') { - this.addDrawerTitle = '查看工作组' + this.addDrawerTitle = '查看分标委' } else if (row.level === '3') { + this.addDrawerTitle = '查看工作组' + } else if (row.level === '4') { this.addDrawerTitle = '查看标准' - } else if (row.level === '4') {} + } this.getArr(row.wgDepts) this.getArr(row.wgPayInfos) this.getArr(row.wgMeetingInfos) @@ -1080,14 +1293,14 @@ changeTime: row.changeTime, mark: row.mark, standerArea: row.standerArea, - itemType: row.level === '0' ? '标委会' : (row.level === '1' ? '分标委' : (row.level === '2' ? '工作组' : '标准')) + itemType: row.level === '1' ? '标委会' : (row.level === '2' ? '分标委' : (row.level === '3' ? '工作组' : '标准')) } this.addDrawer = true }, // 查看 delItem () { - if (this.row.children.length > 0) { + if (this.row.children) { this.$message.warning('不可删除!') - } else { + } else { this.$confirm('您是否确认删除选中数据?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -1096,7 +1309,7 @@ roundButton: true }).then(() => { let ids = [] - if (this.row.wgMeetingInfos.length > 0) { + if (this.row.wgMeetingInfos) { this.row.wgMeetingInfos.forEach(item => { ids.push(item.id) }) @@ -1131,56 +1344,63 @@ } }, addDrawerSubmit () { - this.submitLoading = true - if (this.DrawerType === 'add') { - this.addForm.wgDepts.forEach(item => { - item.joinfile = JSON.stringify(item.joinfile) - }) - this.addForm.wgPayInfos.forEach(item => { - item.joinfile = JSON.stringify(item.joinfile) - }) - this.addForm.wgMeetingInfos.forEach(item => { - item.joinfile = JSON.stringify(item.joinfile) - }) - this.$http.postData('wg_work_group/add', this.addForm, { - _this: this - }, res => { - this.submitLoading = false - this.addDrawer = false - if (res.ok) { - this.headerNo = false - this.$message.success('添加成功') - this.destoryGraph() - this.getData() - } else { - this.$message.warning('添加失败') + this.$refs['addForm'].validate((valid) => { + if (valid) { + this.submitLoading = true + if (this.DrawerType === 'add') { + this.addForm.wgDepts.forEach(item => { + item.joinfile = JSON.stringify(item.joinfile) + }) + this.addForm.wgPayInfos.forEach(item => { + item.joinfile = JSON.stringify(item.joinfile) + }) + this.addForm.wgMeetingInfos.forEach(item => { + item.joinfile = JSON.stringify(item.joinfile) + }) + this.$http.postData('wg_work_group/add', this.addForm, { + _this: this + }, res => { + this.submitLoading = false + this.addDrawer = false + if (res.ok) { + this.headerNo = false + this.$message.success('添加成功') + this.destoryGraph() + this.getData() + } else { + this.$message.warning('添加失败') + } + }) + } else if (this.DrawerType === 'edit') { + this.addForm.wgDepts.forEach(item => { + item.joinfile = JSON.stringify(item.joinfile) + }) + this.addForm.wgPayInfos.forEach(item => { + item.joinfile = JSON.stringify(item.joinfile) + }) + this.addForm.wgMeetingInfos.forEach(item => { + item.joinfile = JSON.stringify(item.joinfile) + }) + this.$http.postData('wg_work_group/updateData', this.addForm, { + _this: this + }, res => { + this.submitLoading = false + this.addDrawer = false + if (res.ok) { + this.headerNo = false + this.$message.success('修改成功') + this.destoryGraph() + this.getData() + } else { + this.$message.warning('修改失败') + } + }) } - }) - } else if (this.DrawerType === 'edit') { - this.addForm.wgDepts.forEach(item => { - item.joinfile = JSON.stringify(item.joinfile) - }) - this.addForm.wgPayInfos.forEach(item => { - item.joinfile = JSON.stringify(item.joinfile) - }) - this.addForm.wgMeetingInfos.forEach(item => { - item.joinfile = JSON.stringify(item.joinfile) - }) - this.$http.postData('wg_work_group/updateData', this.addForm, { - _this: this - }, res => { - this.submitLoading = false - this.addDrawer = false - if (res.ok) { - this.headerNo = false - this.$message.success('修改成功') - this.destoryGraph() - this.getData() - } else { - this.$message.warning('修改失败') - } - }) - } + } else { + this.$message.warning('请完善提交信息') + return false; + } + }) }, // 新增提交 addDrawerClose () { this.addDrawer = false @@ -1200,6 +1420,10 @@ this.headerNo = true let row = node._cfg.model this.addForm.pName = row.name + if (row.level === '4') { + this.standId = row.wgStandorpolicyInfos[0].standId + this.itemType = row.wgStandorpolicyInfos[0].dataType + } this.row = JSON.parse(JSON.stringify(row)) this.row2 = JSON.parse(JSON.stringify(row)) if (row.level === '0') { @@ -1484,6 +1708,15 @@ diff --git a/src/pages/regulatoryRepository/workingGroup/index.vue b/src/pages/regulatoryRepository/workingGroup/index.vue index ff3e1afcc..9c772a455 100644 --- a/src/pages/regulatoryRepository/workingGroup/index.vue +++ b/src/pages/regulatoryRepository/workingGroup/index.vue @@ -6,11 +6,11 @@ class="home-tabs" > - 工作组1 + 标准法规工作组 - 工作组2 + 政策工作组