{"remainingRequest":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/src/components/Common/icon_select.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/src/components/Common/icon_select.vue","mtime":1701674859498},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/babel-loader/lib/index.js","mtime":1701674874357},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/cache-loader/dist/cjs.js","mtime":1701674874584},{"path":"/data/jenkins/workspace/test-v5in-source-front-01/src/badp-bcxin-5.x/obpm-designer-web/node_modules/vue-loader/lib/index.js","mtime":1701674874903}],"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//\n//\n//\n//\n//\n//\n//\n//\n\nimport fileUpload from \"@/components/Common/fileUpload.vue\";\nimport { getAllIcon, getLogoUrl, deleteIcon } from \"@/service/CommontoolsAPI.js\";\n\nexport default {\n data() {\n return {\n imgIcons: [],\n activeTab: \"imgIcon\",\n fileUploadVisible: false,\n imgIconCurrent: -1,\n selectIcon: [],\n iconToolTipVisible: false,\n upIcons: [],\n upIconCurrent: -1,\n checkDelete: true,\n haveDelete: false,\n noDelete: true,\n emptyValue: \"\",\n checkAll: false,\n isIndeterminate: true,\n };\n },\n watch: {\n selectIcon: function(newval) {\n this.selectIcon = newval;\n },\n },\n components: {\n fileUpload,\n },\n created() {\n this.getIcon();\n this.getUpIcons();\n },\n computed: {\n iconSelectVisible: {\n get() {\n return this.visible;\n },\n set(val) {\n this.$emit(\"update:visible\", val);\n },\n },\n },\n // props: [\"visible\", \"logoUrl\"],\n props: {\n visible: Boolean,\n logoUrl: String,\n innerDialog: {\n // 是否为内嵌弹框\n type: Boolean,\n default: false,\n },\n },\n methods: {\n onCancel() {\n this.iconSelectVisible = false;\n },\n onDelete(delIcon) {\n if (delIcon) {\n this.selectIcon = delIcon;\n }\n if (this.selectIcon.length == 0) {\n this.$message({\n showClose: true,\n message: this.$t('msg.select_icon'),\n type: \"error\",\n });\n return false;\n }\n this.checkDelete = true;\n this.noDelete = true;\n this.haveDelete = false;\n\n deleteIcon(\n { data: this.selectIcon },\n {\n onSucess: (resp) => {\n if (resp.data.errcode == 0) {\n this.getUpIcons();\n this.selectIcon = [];\n }\n },\n }\n );\n },\n onOk() {\n this.iconSelectVisible = false;\n if (this.imgIconCurrent != -1) {\n this.$emit(\"select-ok\", this.imgIcons[this.imgIconCurrent],0);\n } else if (this.upIconCurrent != -1) {\n this.$emit(\"select-ok\", this.upIcons[this.upIconCurrent],1);\n }\n },\n onUpload() {\n this.fileUploadVisible = true;\n },\n onBack() {\n this.getIcon();\n },\n getIcon() {\n let that = this;\n getAllIcon(\"\", {\n onSucess: (resp) => {\n // this.imgIcons = resp.data.data;\n resp.data.data.forEach((el) => {\n if (el.path.indexOf(\".png\") != -1 || el.path.indexOf(\".jpg\") != -1 || el.path.indexOf(\".gif\") != -1) {\n that.imgIcons.push(el);\n }\n });\n if (that.logoUrl) {\n that.imgIcons.forEach((elm, index) => {\n if (elm.path.indexOf(that.logoUrl) != -1) {\n that.imgIconCurrent = index;\n }\n elm.name = elm.name.replace(/p[0-9]{2,}_/, \"\");\n });\n }\n },\n });\n },\n getUpIcons() {\n getAllIcon(\"/uploads/lib/icon/upload\", {\n onSucess: (resp) => {\n this.upIcons = resp.data.data;\n },\n });\n },\n onCheckUpload() {\n this.getUpIcons();\n },\n checkedImgIcon(item, index) {\n this.imgIconCurrent = index;\n this.upIconCurrent = -1;\n this.checkIcon = item;\n },\n checkedupIcon(item, index) {\n this.upIconCurrent = index;\n this.imgIconCurrent = -1;\n // this.fontIconCurrent=-1;\n this.checkIcon = item;\n },\n getUrl(url) {\n return getLogoUrl(url);\n },\n },\n};\n",null]}