From 3d261fe269e838e96cf6328e9711843588d8f08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Thu, 28 Mar 2024 10:58:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=A0=87=E5=87=86/=E8=AF=91?= =?UTF-8?q?=E6=96=87=E8=8E=B7=E5=8F=96=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/standLawsAttrManage/index.vue | 4 +- .../components/addModal.vue | 101 +++++++++++++++--- ...dardTranslationAcquisitionRequestModal.vue | 94 +++++++++++----- .../index.vue | 2 +- 4 files changed, 161 insertions(+), 40 deletions(-) diff --git a/src/pages/config/pages/standLawsAttrManage/index.vue b/src/pages/config/pages/standLawsAttrManage/index.vue index c6fdf27a4..d39f74488 100644 --- a/src/pages/config/pages/standLawsAttrManage/index.vue +++ b/src/pages/config/pages/standLawsAttrManage/index.vue @@ -390,12 +390,13 @@ export default { }, goNuwPage (item) { this.$store.commit('setDetailMap', this.$route.path) + console.log(item); const params = { id: item.id, dictionaryName: item.dictionaryName, dictionType: item.dictionType, isRelate: item.isRelate, - relateDicId: item.relateDicId + relateDicId: item.relateDicId || '1' } if(item.dictionType && item.dictionType === 'TREE'){ this.$router.push({ @@ -408,7 +409,6 @@ export default { params: params }) } - }, handleSelectone (data) { this.selectedList = [] diff --git a/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/components/addModal.vue b/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/components/addModal.vue index a8a676972..c94d14dd4 100644 --- a/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/components/addModal.vue +++ b/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/components/addModal.vue @@ -12,28 +12,68 @@ - - + + - - + + - + + + {{ opt.label }} + + - + + + {{ opt.label }} + + + - + + + {{ opt.label }} + + @@ -91,11 +131,21 @@ export default { showLoading: false, id: '', StandardApplyForEO: {}, + typeList: [], standTypeList: [], - standLb: [], + standLbList: [ + { + label: 'GB', + value: 'GB', + }, + { + label: 'GB/T', + value: 'GB/T', + } + ], addFormRules: { - applyForUnitId: [ { required: true, message: '申请单位不能为空', trigger: 'blur' } ], - applyForUserId: [ { required: true, message: '申请人不能为空', trigger: 'blur' } ], + applyForUnitName: [ { required: true, message: '申请单位不能为空', trigger: 'blur' } ], + applyForUserName: [ { required: true, message: '申请人不能为空', trigger: 'blur' } ], type: [ { required: true, message: '类型不能为空', trigger: 'blur' } ], standType: [ { required: true, message: '标准类型类型不能为空', trigger: 'blur' } ], standLb: [ { required: true, message: '标准类型类别不能为空', trigger: 'blur' } ], @@ -113,16 +163,39 @@ export default { } } }, + mounted () { + this.getDicTypeListCode() + }, methods: { + getDicTypeListCode () { + this.$http.get('sys/dictype/getDicTypeListCode', '', { + _this: this + }, res => { + this.typeList = res.data.BZJYWTYPE // 标准类别 + this.standTypeList = res.data.BZJYWSTADNTYPE + }, e => { + }) + }, handleClose () { this.visible = false }, - showModal (id) { + addModel () { this.visible = true - this.id = id + this.StandardApplyForEO = {} + this.StandardApplyForEO.applyForUserId = this.$store.getters.userInfo.userId + this.StandardApplyForEO.applyForUserName = this.$store.getters.userInfo.userName + this.StandardApplyForEO.applyForUnitId = this.$store.getters.userInfo.upDeptId + this.StandardApplyForEO.applyForUnitName = this.$store.getters.userInfo.upDeptName + this.StandardApplyForEO = { ...this.StandardApplyForEO } + this.$nextTick(() => { + this.$refs.addFormRef.clearValidate() + }) + }, + showModal (item) { + this.visible = true + this.StandardApplyForEO = JSON.parse(JSON.stringify(item)) this.$nextTick(() => { this.$refs.addFormRef.clearValidate() - this.StandardApplyForEO = {} }) }, selectStandType () { @@ -136,6 +209,8 @@ export default { if (res.ok) { this.$emit('updateList') this.visible = false + }else{ + this.$message.warning(res.message) } }) } diff --git a/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/components/standardTranslationAcquisitionRequestModal.vue b/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/components/standardTranslationAcquisitionRequestModal.vue index 8ceca9db2..156ed46a0 100644 --- a/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/components/standardTranslationAcquisitionRequestModal.vue +++ b/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/components/standardTranslationAcquisitionRequestModal.vue @@ -9,7 +9,7 @@ 新增标准/译文获取申请 导入 模版下载 - 批量删除 + 批量删除
@@ -103,9 +102,10 @@ />
- 保存 + 取消 提交 + 数据加载中…… @@ -146,15 +146,16 @@ export default { this.visible = false this.$emit('updateIndexList') }, - toView (id) { - this.$refs.addModalRef.showModal(id) + toView (item) { + this.$refs.addModalRef.showModal(item) }, - edit (id) { - this.$refs.addModalRef.showModal(id) + edit (item) { + this.$refs.addModalRef.showModal(item) }, importData () { }, templateDownload () { + window.open('/api/lawss/standardApplyFor/exportTemplateFile?fileName=标准/译文获取申请模板.xlsx') }, getList () { this.tableLoading = true @@ -162,30 +163,68 @@ export default { _this: this, }, res => { if (res.ok) { - this.StandardApplyForEO = res.data.list + this.StandardApplyForEO = res.data.records this.total = res.data.total }else { this.StandardApplyForEO = [] this.total = 0 } + this.tableLoading = false }) }, batchDelete (id) { - if (id.length === 0) { - this.$message({ - message: '请选择至少一条数据', - type: 'warning', - offset: 20 - }) - return + let ids = '' + let tipsText = '' + if (id) { + ids = id + tipsText = '确认删除这条数据?' + } else { + if (this.selectedList && this.selectedList.length > 0) { + ids = this.selectedList.join(',') + tipsText = '确认删除这些数据?' + }else{ + this.$message.warning('请至少勾选一条数据') + return + } } - const ids = id.join(',') - this.$http.postData(this.url.deleteUrl, ids, { _this: this }, res => { - this.$message.success('操作成功') - this.getList() + this.$confirm(tipsText, '提示', { + confirmButtonText: '确定', + confirmButtonClass: 'common-button-primary', + cancelButtonText: '取消', + type: 'warning', + roundButton: false + }).then(() => { + this.$http.postData(this.url.deleteUrl, { ids: ids }, { _this: this }, res => { + if (res.ok) { + this.$message.success('操作成功') + this.getList() + this.selectedList = [] + }else{ + this.$message.warning(res.message) + } + }) + }).catch(() => { + // 取消删除,清空选择 + this.$refs.selections.clearSelection() }) }, - submitData (tag) { + submitData () { + if (this.selectedList && this.selectedList.length > 0){ + const query = { + status: 'pendingApproval', + ids: this.selectedList.join(',') + } + this.$http.postData('/lawss/standardApplyFor/batchUpdateStatus', query, { _this: this }, res => { + if (res.ok) { + this.$message.success('操作成功') + this.getList() + }else{ + this.$message.warning(res.message) + } + }) + } else { + this.$message.warning('请至少勾选一条数据') + } }, handleSelectionChange (value) { const ids = [] @@ -195,7 +234,7 @@ export default { this.selectedList = [ ...ids ] }, standardTranslationAcquisitionRequestAdd () { - this.$refs.addModalRef.showModal() + this.$refs.addModalRef.addModel() }, pageChange (page) { this.questionSerach.page = page @@ -205,6 +244,9 @@ export default { this.questionSerach.pageSize = pageSize this.getList() }, + cancel () { + this.visible = false + }, } } @@ -222,4 +264,8 @@ export default { color: #409EFF; margin: 0 5px; } + /deep/.el-input.is-disabled .el-input__inner{ + background-color: #fff; + color: #606266; + } diff --git a/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/index.vue b/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/index.vue index 50976a0a5..7af53e6c4 100644 --- a/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/index.vue +++ b/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/index.vue @@ -203,7 +203,7 @@ export default { _this: this }, res => { if (res.ok) { - this.StandardApplyForEO = res.data.list + this.StandardApplyForEO = res.data.records this.total = res.data.total }else { this.StandardApplyForEO = []