{"remainingRequest":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/cache-loader/dist/cjs.js??ref--0-0!/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/babel.config.js","mtime":1739760943855},{"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/thread-loader/dist/cjs.js","mtime":499162500000},{"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":["import \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.replace\";\nexport default {\n name: 'viewMultiColumn',\n props: {\n column: {\n type: Object\n }\n },\n methods: {\n /**\n * 后台配置视图列按图标显示\n */\n getIconMapping: function getIconMapping(val, keyVal) {\n var valObj = JSON.parse(val);\n for (var i = 0; i < valObj.length; i++) {\n if (valObj[i].key == keyVal) {\n return valObj[i].key;\n }\n }\n },\n picturePreview: function picturePreview(list, i, type) {\n //图片预览\n if (type) {\n if (list.charAt(0) == '[') {\n list = list.replace(/"/g, \"\\\"\");\n var onlinePhotoPath = eval('(' + list + ')');\n var pl = onlinePhotoPath;\n for (var _i = 0; _i < pl.length; _i++) {\n pl[_i] = obpmConfig.obpmFilePath + pl[_i];\n }\n var params = {\n hiddenDialog: true,\n pathLists: pl,\n initialIndex: i\n };\n this.$parent.setDialogStatus(params);\n }\n } else {\n var pList = JSON.parse(list);\n var pathLists = [];\n pList.forEach(function (el) {\n var path = obpmConfig.obpmFilePath + el.path;\n pathLists.push(path);\n });\n var _params = {\n hiddenDialog: true,\n pathLists: pathLists,\n initialIndex: i\n };\n this.$parent.setDialogStatus(_params);\n }\n },\n /**\n 点击文件直接预览\n */\n handleFileClick: function handleFileClick(flie) {\n var flieType = flie.name.substring(flie.name.lastIndexOf(\".\")).toLowerCase();\n var imgType = this.isImgType(flieType);\n if (imgType) {\n this.isShowImg = true;\n this.addHtml = '
';\n } else {\n this.handlePreview(flie);\n }\n },\n viewFieldPath: function 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 var arr = JSON.parse(value);\n return arr;\n }\n },\n //列表视图在线拍照控件显示的图片\n viewPhotoPath: function viewPhotoPath(value, field) {\n if (value && field == \"OnLineTakePhotoField\") {\n if (value.charAt(0) == '[') {\n value = value.replace(/"/g, \"\\\"\");\n var onlinePhotoPath = eval('(' + value + ')');\n var list = onlinePhotoPath;\n for (var i = 0; i < list.length; i++) {\n list[i] = obpmConfig.obpmFilePath + list[i];\n }\n return list;\n } else {\n //默认保存的value是字符串\"/resource/image/photo.png\"\n var statiContextPath = obpmConfig.statiContextPath;\n if (statiContextPath) {\n value = statiContextPath + value;\n } else {\n value = obpmConfig.obpmFilePath + value;\n }\n var defaultArr = [];\n defaultArr.push(value);\n return defaultArr;\n }\n }\n },\n downloadFile: function downloadFile(file) {\n //列表文件下载\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 var link = document.createElement('a');\n link.style.display = 'none';\n var op = obpmConfig.obpmFilePath;\n var statiContextPath = obpmConfig.statiContextPath;\n if (statiContextPath) {\n //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 handlePreview: function handlePreview(file) {\n var _this = this;\n this.$api.getenvironment({\n onSucess: function onSucess(res) {\n if (res.data.errcode === 0) {\n if (res.data.data === true) {\n var realName = file.path.split(\"/\")[file.path.split(\"/\").length - 1];\n var isEdit = 'edit';\n var waterMark = '';\n var openWaterMark = false;\n var curEditUserId = _this.$store.state.myProfile.id;\n var userName = _this.$store.state.myProfile.name;\n var showTrackRevisions = false;\n var selectEditPlug = 'tray';\n var cp = obpmConfig.obpmFilePath;\n sessionStorage.setItem(\"obpmContextPath\", cp);\n var statiContextPath = obpmConfig.statiContextPath;\n var pdfPath = \"\";\n if (statiContextPath) {\n //5.0 trunk\n pdfPath = obpmConfig.statiContextPath;\n } else {\n //4.4 stable\n pdfPath = cp;\n }\n var url = pdfPath + '/portal/vue/pdf/pdfviewer.html?action=' + isEdit + \"&path=\" + file.path + \"&name=\" + realName + \"&showName=\" + file.name + \"&waterMark=\" + waterMark + \"&openWaterMark=\" + openWaterMark + \"&curEditUserId=\" + curEditUserId + \"&userName=\" + userName + \"&showTrackRevisions=\" + showTrackRevisions + \"&selectEditPlug=\" + selectEditPlug;\n var URL = encodeURI(url);\n window.open(URL);\n }\n }\n }\n });\n },\n //视图列设置默认图标显示\n setDefaultIcon: function setDefaultIcon(value, isLogo, rowVal) {\n var statiContextPath = obpmConfig.statiContextPath;\n var path = '';\n if (isLogo) {\n path = this.setDefaultPath() + '/uploads/lib/icon/' + value;\n } else {\n var valueObject = JSON.parse(value); //字符串转对象\n if (valueObject) {\n for (var i = 0; i < valueObject.length; i++) {\n if (valueObject[i].key == rowVal) {\n if (statiContextPath) {\n //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: function toFixed(number, fractionDigits) {\n var times = Math.pow(10, fractionDigits);\n var roundNum = Math.round(number * times) / times;\n var currentVal = roundNum.toFixed(fractionDigits);\n if (fractionDigits == \"5\") {\n var num = (roundNum || 0).toString();\n var 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: function currencyChange(number, decimals, currency) {\n var decPoint = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : \".\";\n var thousandsSep = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : \",\";\n number = (number + \"\").replace(/[^0-9+-Ee.]/g, \"\");\n var n = !isFinite(+number) ? 0 : +number;\n var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);\n var sep = typeof thousandsSep === \"undefined\" ? \",\" : thousandsSep;\n var dec = typeof decPoint === \"undefined\" ? \".\" : decPoint;\n var s = \"\";\n var 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 var toFixedFix = function toFixedFix(n, prec) {\n var k = Math.pow(10, prec);\n return \"\" + Math.ceil(n * k) / k;\n };\n s = (prec ? toFixedFix(n, prec) : \"\" + Math.round(n)).split(\".\");\n var 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 //o-action跳转\n calctextJump: function 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 var 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 var routeData = this.$router.resolve({\n // name: \"form_blank\",\n name: 'open',\n query: params\n });\n window.open(routeData.href, \"_blank\");\n } else {\n //默认用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 var _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 var _routeData = this.$router.resolve({\n name: \"view_blank\",\n query: params\n });\n window.open(_routeData.href, \"_blank\");\n } else {\n //默认用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 var _type2 = \"JUMP\";\n this.$parent.openDialogJump(params, _type2);\n } else if (openType == \"open-present\") {\n this.$emit(\"openNewpage\", params);\n } else if (openType == \"open-blank\") {\n var _routeData2 = this.$router.resolve({\n name: \"view_blank\",\n query: params\n });\n window.open(_routeData2.href, \"_blank\");\n } else {\n //默认用tab方式打开\n // this.$emit(\"add-tab\", params);\n this.addTab(params);\n }\n }\n },\n regReplace: function regReplace(value) {\n if (value) {\n return value.replace(/%/g, \"%\");\n }\n },\n /*\n * 脚本,o-action\n */\n template: function template(val) {\n return {\n methods: {\n calctextJump: this.calctextJump\n },\n template: \"\" + val + \"
\"\n };\n }\n }\n};",null]}