{"remainingRequest":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/test-v5inweb-5.x-vue/src/expandedComponents/view_multi_level_column.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/src/expandedComponents/view_multi_level_column.vue","mtime":1739760944327},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":315532800000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":1655715099000}],"contextDependencies":[],"result":["\nexport default {\n name: 'viewMultiColumn',\n props: {\n column: {\n type: Object\n }\n },\n methods: {\n /**\n * 后台配置视图列按图标显示\n */\n getIconMapping(val,keyVal) {\n let valObj = JSON.parse(val)\n for(let i = 0; i < valObj.length; i++) {\n if(valObj[i].key == keyVal) {\n return valObj[i].key\n }\n }\n },\n picturePreview(list, i, type) { //图片预览\n if(type) {\n if(list.charAt(0) == '[') {\n list = list.replace(/"/g,\"\\\"\");\n let onlinePhotoPath = eval('(' + list + ')');\n let pl = onlinePhotoPath;\n for (let i = 0; i < pl.length; i++) {\n pl[i] = obpmConfig.obpmFilePath + pl[i];\n }\n let params = {\n hiddenDialog: true,\n pathLists: pl,\n initialIndex: i,\n };\n this.$parent.setDialogStatus(params);\n }\n }else {\n let pList = JSON.parse(list);\n let pathLists = [];\n pList.forEach(el => {\n let path = obpmConfig.obpmFilePath + el.path;\n pathLists.push(path);\n });\n let params = {\n hiddenDialog: true,\n pathLists,\n initialIndex: i,\n };\n console.log(\"params--2->\",params)\n this.$parent.setDialogStatus(params);\n }\n },\n /**\n 点击文件直接预览\n */\n handleFileClick(flie){\n let flieType = flie.name.substring(flie.name.lastIndexOf(\".\")).toLowerCase();\n const imgType = this.isImgType(flieType);\n if(imgType){\n this.isShowImg = true;\n this.addHtml = '';\n }else{\n this.handlePreview(flie)\n }\n },\n viewFieldPath(value, field) {\n if (value && field == \"ImageUploadField\") {\n // // let arr = JSON.parse(value);\n // let name = value.path.name;\n // // if(arr && arr.length > 0) {\n // // for(let i=0; i 0) {\n // for (let i = 0; i < arr.length; i++) {\n // name += arr[i].name + \";\";\n // }\n // }\n // name = name.replace(/^(\\s|;)+|(\\s|;)+$/g, \"\");\n // return name;\n let arr = JSON.parse(value);\n return arr;\n }\n },\n\n //列表视图在线拍照控件显示的图片\n viewPhotoPath(value,field) {\n if(value && field == \"OnLineTakePhotoField\") {\n if(value.charAt(0) == '[') {\n value = value.replace(/"/g,\"\\\"\")\n let onlinePhotoPath = eval('(' + value+ ')');\n let list = onlinePhotoPath;\n for (let i = 0; i < list.length; i++) {\n list[i] = obpmConfig.obpmFilePath + list[i];\n }\n return list\n }\n else {\n //默认保存的value是字符串\"/resource/image/photo.png\"\n let statiContextPath = obpmConfig.statiContextPath;\n if(statiContextPath) {\n value = statiContextPath + value\n }else {\n value = obpmConfig.obpmFilePath + value\n }\n let defaultArr = []\n defaultArr.push(value)\n return defaultArr\n }\n }\n },\n\n downloadFile(file){ //列表文件下载\n // let link = document.createElement('a')\n // link.style.display = 'none'\n // link.href = this.obpmConfig.obpmFilePath + \n // \"/runtime/file/download?filename=\"+ file.name +\n // \"&filepath=\" + file.path;\n // link.setAttribute('download', file.name);\n // link.click();\n let link = document.createElement('a')\n link.style.display = 'none'\n\n let op = obpmConfig.obpmFilePath;\n let statiContextPath = obpmConfig.statiContextPath;\n if(statiContextPath) { //5.0 trunk\n op = obpmConfig.contextPath;\n }\n link.href = op + \"/runtime/file/download?filename=\" + file.name + \"&filepath=\" + file.path;\n link.setAttribute('download', file.name);\n link.click();\n },\n\n handlePreview(file) {\n this.$api.getenvironment(\n {\n onSucess: res => {\n if(res.data.errcode === 0) {\n if(res.data.data === true) {\n let realName = file.path.split(\"/\")[file.path.split(\"/\").length - 1];\n let isEdit = 'edit';\n let waterMark = '';\n let openWaterMark = false;\n let curEditUserId = this.$store.state.myProfile.id;\n let userName = this.$store.state.myProfile.name;\n let showTrackRevisions = false;\n let selectEditPlug = 'tray';\n let cp = obpmConfig.obpmFilePath;\n sessionStorage.setItem(\"obpmContextPath\", cp);\n let statiContextPath = obpmConfig.statiContextPath;\n let pdfPath = \"\";\n if(statiContextPath) { //5.0 trunk\n pdfPath = obpmConfig.statiContextPath;\n }else { //4.4 stable\n pdfPath = cp;\n }\n let url = pdfPath + '/portal/vue/pdf/pdfviewer.html?action=' + isEdit + \n \"&path=\" + file.path + \n \"&name=\" + realName + \n \"&showName=\" + file.name + \n \"&waterMark=\" + waterMark + \n \"&openWaterMark=\" + openWaterMark +\n \"&curEditUserId=\" + curEditUserId +\n \"&userName=\" + userName + \n \"&showTrackRevisions=\" + showTrackRevisions +\n \"&selectEditPlug=\" + selectEditPlug;\n let URL = encodeURI(url)\n window.open(URL);\n }\n }\n }\n }\n )\n\n },\n //视图列设置默认图标显示\n setDefaultIcon(value, isLogo,rowVal){\n let statiContextPath = obpmConfig.statiContextPath;\n let path = '';\n if(isLogo) {\n path = this.setDefaultPath() + '/uploads/lib/icon/' + value;\n }else {\n let valueObject = JSON.parse(value)//字符串转对象\n if(valueObject) {\n for(let i = 0; i < valueObject.length; i ++) {\n if(valueObject[i].key == rowVal) {\n if(statiContextPath) {//5.0\n path = this.setDefaultPath() + valueObject[i].value;\n }else {\n path = this.setDefaultPath() + '/uploads/lib/icon' +valueObject[i].value;\n }\n }\n }\n }\n }\n return path;\n },\n /*number 需要保留小数的数\n fractionDigits 保留小数位数\n */\n toFixed(number, fractionDigits) {\n let times = Math.pow(10, fractionDigits);\n let roundNum = Math.round(number * times) / times;\n let currentVal = roundNum.toFixed(fractionDigits);\n if (fractionDigits == \"5\") {\n let num = (roundNum || 0).toString();\n let result = \"\";\n while (num.length > 3) {\n result = \",\" + num.slice(-3) + result;\n num = num.slice(0, num.length - 3);\n }\n if (result) {\n result = num + result + \".\" + currentVal.split(\".\")[1];\n return result;\n } else {\n return currentVal;\n }\n } else {\n return currentVal;\n }\n },\n /* number:要格式化的数字\n * decimals:保留几位小数 默认0位\n * currency:货币类型\n * decPoint:小数点符号 默认.\n * thousandsSep:千分位符号 默认为,\n */\n currencyChange(\n number,\n decimals,\n currency,\n decPoint = \".\",\n thousandsSep = \",\"\n ) {\n number = (number + \"\").replace(/[^0-9+-Ee.]/g, \"\");\n let n = !isFinite(+number) ? 0 : +number;\n let prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);\n let sep = typeof thousandsSep === \"undefined\" ? \",\" : thousandsSep;\n let dec = typeof decPoint === \"undefined\" ? \".\" : decPoint;\n let s = \"\";\n let symbol;\n if (currency == \"zh_CN\") {\n symbol = \"¥\";\n } else if (currency == \"en_US\") {\n symbol = \"$\";\n } else if (currency == \"en_GB\") {\n symbol = \"£\";\n } else if (currency == \"ja_JP\") {\n symbol = \"¥\";\n } else {\n symbol = \"\";\n }\n let toFixedFix = function (n, prec) {\n let k = Math.pow(10, prec);\n return \"\" + Math.ceil(n * k) / k;\n };\n s = (prec ? toFixedFix(n, prec) : \"\" + Math.round(n)).split(\".\");\n let re = /(-?\\d+)(\\d{3})/;\n while (re.test(s[0])) {\n s[0] = s[0].replace(re, \"$1\" + sep + \"$2\");\n }\n if ((s[1] || \"\").length < prec) {\n s[1] = s[1] || \"\";\n s[1] += new Array(prec - s[1].length + 1).join(\"0\");\n }\n return symbol + s.join(dec);\n },\n\n //o-action跳转\n calctextJump(openType, params, jumpType) {\n if(params.title) {\n params.name = params.title\n }else {\n params.name = this.view.name\n }\n if(jumpType === 'opendocument') {\n if (openType == \"open-eject\" || openType == \"dialog\") {\n let type = \"FORM\";\n this.$parent.openDialogJump(params,type)\n }else if (openType == \"open-present\") {\n this.$emit(\"openNewpage\",params)\n }else if (openType == \"open-blank\"){\n let routeData = this.$router.resolve({\n // name: \"form_blank\",\n name: 'open',\n query: params,\n });\n window.open(routeData.href, \"_blank\");\n }else {//默认用tab方式打开\n // this.$emit(\"add-tab\", params);\n this.addTab(params)\n }\n }else if(jumpType === 'openview') {\n if (openType == \"open-eject\" || openType == \"dialog\") {\n let type = \"VIEW\";\n this.$parent.openDialogJump(params,type);\n }else if (openType == \"open-present\") {\n this.$emit(\"openNewpage\",params)\n }else if (openType == \"open-blank\"){\n let routeData = this.$router.resolve({\n name: \"view_blank\",\n query: params,\n });\n window.open(routeData.href, \"_blank\");\n }else {//默认用tab方式打开\n this.addTab(params)\n // this.$emit(\"add-tab\", params);\n }\n }else if(jumpType === 'jumpto'){\n if (openType == \"open-eject\" || openType == \"dialog\") {\n let type = \"JUMP\";\n this.$parent.openDialogJump(params,type);\n }else if (openType == \"open-present\") {\n this.$emit(\"openNewpage\",params)\n }else if (openType == \"open-blank\"){\n let routeData = this.$router.resolve({\n name: \"view_blank\",\n query: params,\n });\n window.open(routeData.href, \"_blank\");\n }else {//默认用tab方式打开\n // this.$emit(\"add-tab\", params);\n this.addTab(params)\n }\n }\n },\n \n regReplace(value){\n if(value){\n return value.replace(/%/g, \"%\")\n }\n },\n\n /*\n * 脚本,o-action\n */\n template(val) {\n return {\n methods: {\n calctextJump: this.calctextJump,\n },\n template: \"
\"+val+\"
\"\n };\n },\n }\n}\n",null]}