From 230ce62823f1b3e29f3592b92321c85fbaadf80c Mon Sep 17 00:00:00 2001 From: zhutianqi Date: Mon, 15 Nov 2021 17:57:48 +0800 Subject: [PATCH] commit --- .../enterpriseStandardPlan/index.vue | 504 +++++++++++++++--- 1 file changed, 417 insertions(+), 87 deletions(-) diff --git a/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue b/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue index 80085724a..c9ca4c51b 100644 --- a/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue +++ b/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue @@ -1,10 +1,59 @@ @@ -104,27 +289,149 @@ components: {}, data() { return { + submitLoading: false, + addDrawerTitle: '', + addDrawer: false, + DrawerType: '', + ids: [], + addForm: { + unit: '', // 单位 + esName: '', // 企标名称 + planStatus: '', // 计划状态 + reviseStatus: '', // 制修订状态 + resPerson: '', // 评审责任人 + wgLeader: '', // 工作组组长 + draftTime: '', // 计划标准初稿完成时间 + releaseTime: '', // 计划标准发布时间 + drafter: '', // 起草人 + remake: '', // 备注 + }, + addFormRules: {}, form: { page: 1, - pageSize: '', + pageSize: this.$store.getters.userInfo.configContent, + unit: '', + esName: '', + planStatus: '', + reviseStatus: '', }, total: 0, + data: [], - data: [] } }, props: {}, watch: {}, methods: { - pageChange () {}, - pageSizeChange () {}, - handleCommand () {}, + addDrawerSubmit () {}, + addDrawerClose () { + this.addDrawer = false + }, + addData () { + this.addDrawerTitle = '新增' + this.DrawerType = 'add' + this.addDrawer = true + }, // 新增数据 + deleteList () { + if (this.ids.length) { + this.$confirm('您是否确认删除选中数据?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + confirmButtonClass: 'common-button-primary', + roundButton: true + }).then(() => { + let ids = '' + this.ids.forEach(item => { + if (ids.length > 0) { + ids += ',' + ids += item + } else { + ids = item + } + }) + this.$http.get('esRevisePlan/es-revise-plan/delPlans', { + ids: ids + }, { + _this: this + }, res => { + if (res.ok) { + this.$message.success('删除成功') + this.form.page = 1 + this.getData() + } else { + this.$message.warning('删除失败') + } + }) + }).catch(() => {}) + } else { + this.$message.warning('请选择要移除的数据') + } + }, + dataSelectChange (val) { + this.ids = [] + val.forEach(item =>{ + this.ids.push(item.id) + }) + }, + searchData () { + this.form.page = 1 + this.getData() + }, + clearData () { + this.form.page = 1 + this.form.unit = '' + this.form.esName = '' + this.form.planStatus = '' + this.form.reviseStatus = '' + this.getData() + }, + pageChange (page) {}, + pageSizeChange (pageSize) {}, + handleCommand (command) { + switch (command[1]) { + case '编辑': + this.addDrawerTitle = '编辑' + this.DrawerType = 'edit' + this.addDrawer = true + break + case '删除': + this.$confirm('您是否确认删除选中数据?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + confirmButtonClass: 'common-button-primary', + roundButton: true + }).then(() => { + this.$http.get('esRevisePlan/es-revise-plan/delPlans', { + ids: command[0].id + }, { + _this: this + }, res => { + if (res.ok) { + this.$message.success('删除成功') + this.form.page = 1 + this.getData() + } else { + this.$message.warning('删除失败') + } + }) + }).catch(() => {}) + break + case '查看': + this.addDrawerTitle = '查看' + this.DrawerType = 'see' + this.addDrawer = true + break + } + }, getData () { - this.$http.get('esRevisePlan/es-revise-plan/getAllPlans', {}, { + this.$http.post('esRevisePlan/es-revise-plan/queryAllPlans', this.form, { _this: this }, res => { if (res.ok) { - this.data = res.data + this.data = res.data.list + this.total = res.data.count } }) }, @@ -141,15 +448,38 @@ @import '~@/assets/styles/style'; #enterpriseStandardPlan { height: 100%; - .content { - height: calc(~'100% - 53px'); - .table-wrap { - height: calc(~'100% - 56px'); + background: #fff; + /deep/.table-wrap { + .el-table__fixed { + height: calc(~'100% - 20px') !important; } - .pagination { - position: static; - /deep/ .pagination-slot { - padding: 0; + } + height: 100%; + display: flex; + flex-direction: column; + .content-center { + padding: 10px; + } + .container { + flex: 1; + overflow: hidden; + display: flex; + flex-direction: column; + .table-wrap { + flex: 1; + overflow: hidden; + position: relative; + .inner-wrap { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + } + .footer { + /deep/ .pagination { + position: static; } } }