{"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\\module\\addAndUpdateQgroup.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\imMange\\module\\addAndUpdateQgroup.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\nimport {mapState} from \"vuex\";\nimport uc from '@/api/instantMessag.js'\n\nexport default {\n name: \"addAndUpdateQgroup\",\n props: [ 'currentRow' ],\n data() {\n return {\n dialogVisible: false,\n data: [],\n imageUrl: \"\",\n form: {\n name: \"\",\n file: null\n },\n }\n },\n computed: {\n ...mapState({\n currentUser: state => state.login.currentUser\n })\n },\n methods: {\n init() {\n this.form.name = this.currentRow?.name;\n this.imageUrl = this.currentRow?.photo;\n },\n addQgroup() {\n const formData = new FormData(),\n { name, file } = this.form;\n formData.append('file', file )\n formData.append('name', name )\n const text = this.currentRow ? '编辑' : '新建',\n apiFun = this.currentRow ? 'editFgroupList' : 'addQgroup';\n uc[apiFun](formData).then(res => {\n if(res.state == true) {\n this.$message.success(`${text}群成功`);\n this.$emit('onSuccess')\n }\n this.dialogVisible = false\n })\n },\n choseFile(file) {\n this.imageUrl = URL.createObjectURL(file.raw);\n this.form.file = file.raw;\n },\n beforeAvatarUpload(file) {\n const isJPG = file.type.includes('image');\n const isLt2M = file.size / 1024 / 1024 < 10;\n if (!isJPG) {\n this.$message.error('只能上传图片!');\n }\n if (!isLt2M) {\n this.$message.error('上传图片大小不能超过 10MB!');\n }\n return isJPG && isLt2M;\n },\n }\n}\n",null]}