{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\dialog\\CustomDialogShowDetail.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\dialog\\CustomDialogShowDetail.vue","mtime":1667327529169},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\babel.config.js","mtime":1667327525434},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/xq-web-fvue/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\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 req from \"@/request.js\";\nimport hotentUiUtils from '@/hotent-ui-util.js';\nexport default {\n name: \"custom-dialog-show-detail\",\n props: {\n //自定义对话框的别名\n alias: {\n type: String,\n required: true\n },\n //自定义对话框的配置\n customDialog: {\n type: Object,\n required: true\n }\n },\n data: function data() {\n return {\n customDialogPostParam: [],\n //为REST接口且请求类型是POST,条件字段是固定值的参数\n customDialogGetUrl: \"\",\n //为REST接口且请求类型是GET,条件字段是固定值的请求地址\n selectionRadio: [],\n //ht-table列表单选选择的数据\n textRadio: \"\",\n //ht-table列表数据的单选按钮\n selectable: true,\n //表示ht-table列表第一列是否显示复选框\n isShowSearch: false,\n //是否显示高级搜索\n nopagination: false,\n //是否隐藏分页组件,false:显示,true:隐藏\n tableData: [],\n //ht-table列表数据\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n }\n };\n },\n methods: {\n //显示对话框\n initData: function initData() {\n this.customDialogPostParam = []; //清空为REST接口且请求类型是POST,条件字段是固定值的参数\n\n this.customDialogGetUrl = \"\"; //清空为REST接口且请求类型是GET,条件字段是固定值的请求地址\n\n this.selectionRadio = []; //清空ht-table列表单选选择的数据\n\n this.textRadio = \"\"; //清空ht-table列表数据单选按钮的选中状态\n\n this.isShowSearch = false; //不显示高级搜索\n //是否单选 1:单选;-1:多选\n\n if (this.customDialog.selectNum == 1) {\n this.selectable = false;\n } else {\n this.selectable = true;\n } //是否显示分页组件,true:显示,false:隐藏\n\n\n if (this.customDialog.needPage) {\n this.nopagination = false;\n } else {\n this.nopagination = true;\n } //判断是否有条件查询,且数据来源是数据源或者数据来源是REST接口且请求类型是POST\n\n\n if (this.customDialog.conditionfield.length > 0 && (this.customDialog.dsType == \"dataSource\" || this.customDialog.dsType != \"dataSource\" && this.customDialog.requestType == \"POST\")) {\n for (var i = this.customDialog.conditionfield.length - 1; i >= 0; i--) {\n //判断条件字段是否是参数传入并控制器的类型为单行文本框 (controllerType有值就代表控制器的类型为单行文本框,defaultType:1:参数传入,2:固定值 )\n if (this.customDialog.conditionfield[i].controllerType && this.customDialog.conditionfield[i].defaultType == \"1\") {\n this.isShowSearch = true; //显示高级搜索\n //如果条件字段为data类型,则控制器的类型为日期类型\n\n if (this.customDialog.conditionfield[i].dbType == \"date\") {\n this.customDialog.conditionfield[i].type = \"date\";\n } else {\n this.customDialog.conditionfield[i].type = \"text\";\n }\n } else {\n if (this.customDialog.dsType != \"dataSource\" && this.customDialog.requestType == \"POST\") {\n this.customDialogPostParam.push(this.customDialog.conditionfield[i]); //为REST接口且请求类型是POST,条件字段是固定值的参数\n } //如果是条件字段固定值就清除\n\n\n this.customDialog.conditionfield.splice(i, 1);\n }\n }\n } //判断是否有条件查询,且数据来源是REST接口且请求类型是GET\n\n\n if (this.customDialog.conditionfield.length > 0 && this.customDialog.dsType != \"dataSource\" && this.customDialog.requestType == \"GET\") {\n for (var _i = this.customDialog.conditionfield.length - 1; _i >= 0; _i--) {\n //判断条件字段是否是固定值(defaultType:1:参数传入,2:固定值 )\n if (this.customDialog.conditionfield[_i].defaultType == \"2\") {\n //判断请求地址是否带有 ?\n if (this.customDialog.url.indexOf(\"?\") == -1) {\n //无\n this.customDialog.url = this.customDialog.url + \"?\" + this.customDialog.conditionfield[_i].comment + \"=\" + this.customDialog.conditionfield[_i].defaultValue;\n } else {\n //有\n this.customDialog.url = this.customDialog.url + \"&\" + this.customDialog.conditionfield[_i].comment + \"=\" + this.customDialog.conditionfield[_i].defaultValue;\n } //如果是条件字段固定值就清除\n\n\n this.customDialog.conditionfield.splice(_i, 1);\n this.customDialogGetUrl = this.customDialog.url; //判断条件字段是否是参数传入并控制器的类型为单行文本框(controllerType有值就代表控制器的类型为单行文本框,defaultType:1:参数传入,2:固定值 )\n } else if (this.customDialog.conditionfield[_i].controllerType && this.customDialog.conditionfield[_i].defaultType == \"1\") {\n this.isShowSearch = true; //显示高级搜索\n }\n }\n }\n },\n //加载数据\n loadData: function () {\n var _loadData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(param, cb) {\n var i, operation, obj, ctx, exp, _i2, j, queryUrl, requestMethod, response;\n\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n //为REST接口且请求类型是POST,条件字段是固定值的参数\n if (this.customDialog.dsType != \"dataSource\" && this.customDialog.requestType == \"POST\" && this.customDialogPostParam.length > 0) {\n for (i = 0; i < this.customDialogPostParam.length; i++) {\n //构建查询条件\n operation = this.getOperation(this.customDialogPostParam[i].condition);\n obj = {\n group: \"main\",\n operation: operation,\n property: this.customDialogPostParam[i].comment,\n relation: \"AND\",\n value: this.customDialogPostParam[i].defaultValue\n };\n\n if (param.querys && param.querys.length > 0) {\n param.querys.push(obj);\n } else {\n param.querys = [];\n param.querys.push(obj);\n }\n }\n } // post restful接口,并且配置了post参数。则以post参数作为请求参数\n\n\n if (this.customDialog.dsType != 'dataSource' && this.customDialog.requestType == 'POST' && this.customDialog.dataParam && this.customDialog.dataParam.constructor == String) {\n // 构建上下文数据对象\n ctx = {};\n param && param.querys && param.querys.forEach(function (element) {\n ctx[element.property] = element.value;\n });\n exp = hotentUiUtils.parseExp(this.customDialog.dataParam, ctx);\n\n try {\n param = JSON.parse(exp);\n } catch (e) {\n this.$message.error(\"POST\\u53C2\\u6570\\u4E0D\\u662F\\u6709\\u6548\\u7684JSON\\u683C\\u5F0F\".concat(query.dataParam));\n }\n } //判断是否有条件查询,且数据来源是REST接口且请求类型是GET,并且判断参数传入是否填写了查询条件\n\n\n if (this.customDialog.conditionfield.length > 0 && this.customDialog.dsType != \"dataSource\" && this.customDialog.requestType == \"GET\" && param.querys && param.querys.length > 0) {\n for (_i2 = this.customDialog.conditionfield.length - 1; _i2 >= 0; _i2--) {\n //判断条件字段是否是参数传入并控制器的类型为单行文本框(controllerType有值就代表控制器的类型为单行文本框,defaultType:1:参数传入,2:固定值 )\n if (this.customDialog.conditionfield[_i2].controllerType && this.customDialog.conditionfield[_i2].defaultType == \"1\") {\n //参数传入填写了查询条件\n for (j = 0; j < param.querys.length; j++) {\n //判断为REST接口且请求类型是GET,条件字段是固定值的请求地址是否为空\n if (this.customDialogGetUrl != \"\") {\n this.customDialog.url = this.customDialogGetUrl; //赋值为REST接口且请求类型是GET,条件字段是固定值的请求地址\n } else {\n this.customDialogGetUrl = this.customDialog.url;\n } //判断请求地址是否带有 ?\n\n\n if (this.customDialog.url.indexOf(\"?\") == -1) {\n //无\n this.customDialog.url = this.customDialog.url + \"?\" + param.querys[j].property + \"=\" + param.querys[j].value;\n } else {\n //有\n this.customDialog.url = this.customDialog.url + \"&\" + param.querys[j].property + \"=\" + param.querys[j].value;\n }\n }\n }\n }\n } else {\n //判断为REST接口且请求类型是GET,条件字段是固定值的请求地址是否为空\n if (this.customDialogGetUrl != \"\") {\n this.customDialog.url = this.customDialogGetUrl; //赋值为REST接口且请求类型是GET,条件字段是固定值的请求地址\n }\n }\n\n queryUrl = this.customDialog.dsType == \"dataSource\" ? \"${form}/form/customDialog/v1/getListData?alias=\" + this.alias + \"&mapParam=\" : this.customDialog.url;\n requestMethod = \"POST\"; //如果自定义对话框列表查询数据不是数据源则请求方法为restful配置的请求方式\n\n if (this.customDialog.dsType != \"dataSource\") {\n requestMethod = this.customDialog.requestType;\n } //查询数据\n\n\n _context.next = 8;\n return req.request({\n url: queryUrl,\n method: requestMethod,\n data: param\n }).finally(function () {\n return cb && cb();\n });\n\n case 8:\n response = _context.sent;\n\n //如果数据来源是REST接口,且请求类型是GET\n if (this.customDialog.dsType != \"dataSource\" && this.customDialog.requestType == \"GET\") {\n this.tableData = response.data;\n this.nopagination = true; //隐藏分页组件\n } //如果数据来源是REST接口且请求类型是POST\n\n\n if (this.customDialog.dsType != \"dataSource\" && this.customDialog.requestType == \"POST\") {\n this.tableData = response.data[this.customDialog.listKey]; //如果有分页\n\n if (response.data[this.customDialog.pageKey]) {\n this.pageResult = {\n page: response.data[this.customDialog.pageKey],\n pageSize: response.data[this.customDialog.pageSizeKey],\n total: response.data[this.customDialog.totalKey]\n };\n this.nopagination = false; //显示分页组件\n } else {\n this.nopagination = true; //隐藏分页组件\n }\n } //如果数据来源是数据源\n\n\n if (this.customDialog.dsType == \"dataSource\") {\n if (response.data && response.data.rows) {\n this.tableData = response.data.rows; //如果有分页\n\n if (response.data.page) {\n this.pageResult = {\n page: response.data.page,\n pageSize: response.data.pageSize,\n total: response.data.total\n };\n this.nopagination = false; //显示分页组件\n } else {\n this.nopagination = true; //隐藏分页组件\n }\n } else {\n this.tableData = [];\n this.nopagination = true; //隐藏分页组件\n }\n }\n\n case 12:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function loadData(_x, _x2) {\n return _loadData.apply(this, arguments);\n }\n\n return loadData;\n }(),\n //获取运算符号\n getOperation: function getOperation(old) {\n if (!old) {\n return \"\";\n } else if (old == \"EQ\") {\n return \"EQUAL\";\n } else if (old == \"EIC\") {\n return \"EQUAL_IGNORE_CASE\";\n } else if (old == \"LT\") {\n return \"LESS\";\n } else if (old == \"GT\") {\n return \"GREAT\";\n } else if (old == \"LE\") {\n return \"LESS_EQUAL\";\n } else if (old == \"GE\") {\n return \"GREAT_EQUAL\";\n } else if (old == \"NE\") {\n return \"NOT_EQUAL\";\n } else if (old == \"LK\") {\n return \"LIKE\";\n } else if (old == \"LFK\") {\n return \"LEFT_LIKE\";\n } else if (old == \"RHK\") {\n return \"RIGHT_LIKE\";\n } else if (old == \"ISNULL\") {\n return \"IS_NULL\";\n } else if (old == \"NOTNULL\") {\n return \"NOTNULL\";\n } else if (old == \"IN\") {\n return \"IN\";\n } else if (old == \"BETWEEN\") {\n return \"BETWEEN\";\n } else {\n return \"LIKE\";\n }\n },\n //点击列表某一条数据时触发\n orgRowClick: function orgRowClick(row, column, event) {\n //是否单选 1:单选;-1:多选\n if (this.customDialog.selectNum === 1) {\n //选中单选按钮\n this.textRadio = event.currentTarget.children[0].children[0].children[0].__vue__.$refs.radio.value;\n this.selectionRadio = [row];\n this.$emit(\"orgRowClick\", row);\n } else {\n //点击列表数据选中复选框\n this.$refs.htTable.$refs.htTable.toggleRowSelection(row);\n }\n }\n }\n};",null]}