{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\imMange\\groupMange.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\imMange\\groupMange.vue","mtime":1675071992960},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport uc from '@/api/instantMessag.js'\n\nexport default {\n    data() {\n        return {\n            loadings: {\n                updAcutasLoading: false,\n                sequence: false,\n            },\n            data: [],\n            currentRow: null,\n            params : {\n                \"pageBean\": {\n                    \"page\": 1,\n                    \"pageSize\": 10,\n                    \"showTotal\": true\n                },\n                \"params\": {},\n            },\n            pageResult: {\n                page: 1,\n                pageSize: 50,\n                total: 0,\n            }\n        }\n    },\n    mounted() {\n        this.$validator = this.$root.$validator\n        this.header = { 'Authorization': `Bearer ${this.$store.state.login.currentUser.token}` }\n    },\n    methods: {\n        handleCommond(param) {\n            switch (param.command) {\n                case \"edit\":\n                    this.editRow(param.row);\n                    break;\n                case \"del\":\n                    console.log(param)\n                    this.deleteRow(param.row.id);\n                    break;\n            }\n        },\n        editRow(row) {\n            this.currentRow = row;\n            this.openAddPanl();\n        },\n        deleteRow(id) {\n            this.$confirm('是否删除该数据?', '提示', {\n                confirmButtonText: '删除',\n                cancelButtonText: '取消',\n                type: 'danger'\n            }).then(() => {\n                let data = new FormData();\n                data.append(\"id\",id);\n                uc.deleteFgroupList(data).then(res => {\n                    if(res.state) {\n                        this.loadData(this.pageResult);\n                        this.$message.success('数据已删除')\n                    }\n\n                })\n            }).catch(() => {\n\n            });\n\n        },\n        openAddPanl() {\n            this.$prompt('请输入分组名称', `${this.currentRow ? '编辑' : '新增'}名称`, {\n                confirmButtonText: '确定',\n                cancelButtonText: '取消',\n                inputPattern: /\\S/,\n                inputValue: this.currentRow?.name,\n                inputErrorMessage: '分组名称不能为空'\n            }).then(({ value }) => {\n                const data = {\n                    name: value,\n                    id: this.currentRow?.id\n                },\n                    text = this.currentRow ? '编辑' : '新增',\n                    apiFun = this.currentRow ? 'editFgroupList' : 'addFgroupList';\n                uc[apiFun](data).then(res => {\n                    if(res.state == true)\n                        this.$message.success(`${text}分组完成`);\n                        this.currentRow = null;\n                        this.loadData(this.pageResult);\n                })\n            }).catch(() => {\n                this.currentRow = null;\n            })\n        },\n        loadData(param, cb) {\n            uc.getFgroupList(param)\n            .then((res) => {\n                this.data = res.rows\n                this.pageResult = {\n                    page: res.page,\n                    pageSize: res.pageSize,\n                    total: res.total,\n                }\n                this.$refs.htTable.loading = false\n            })\n            .finally(() => cb())\n        }\n    },\n}\n",null]}