From a89fa26c3a9459bb15a5a269895430193d521224 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Thu, 19 Jun 2025 10:16:23 +0800 Subject: [PATCH] test --- public/admin/index.html | 6 +++--- public/admin/static/js/0.js | 4 ++-- public/admin/static/js/app.js | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/admin/index.html b/public/admin/index.html index e7b621d..b6f152d 100644 --- a/public/admin/index.html +++ b/public/admin/index.html @@ -4,7 +4,7 @@ - + 苏州科技商学院 - +
- + diff --git a/public/admin/static/js/0.js b/public/admin/static/js/0.js index c7524c5..dd9cbe3 100644 --- a/public/admin/static/js/0.js +++ b/public/admin/static/js/0.js @@ -176,7 +176,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Use /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/typeof.js */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ \"./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\");\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ \"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @vue/babel-helper-vue-jsx-merge-props */ \"./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n/* harmony import */ var core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.map.js */ \"./node_modules/core-js/modules/es.map.js\");\n/* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.regexp.test.js */ \"./node_modules/core-js/modules/es.regexp.test.js\");\n/* harmony import */ var core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _api_system_baseForm__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @/api/system/baseForm */ \"./src/api/system/baseForm.js\");\n/* harmony import */ var _api_system_customForm__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @/api/system/customForm */ \"./src/api/system/customForm.js\");\n/* harmony import */ var _api_system_dictionary__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @/api/system/dictionary */ \"./src/api/system/dictionary.js\");\n/* harmony import */ var _api_system_department__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @/api/system/department */ \"./src/api/system/department.js\");\n/* harmony import */ var _utils_downloadRequest__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @/utils/downloadRequest */ \"./src/utils/downloadRequest.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//\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\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"detail\",\n data: function data() {\n return {\n showModal: false,\n codeUri: \"\",\n detail: {},\n fields: [],\n relation: [],\n customForm: {\n customFormId: \"\",\n tableName: \"\"\n },\n allTables: [],\n linkTableList: []\n };\n },\n methods: {\n open: function open(url) {\n this.codeUri = \"\".concat(Object({\"VUE_APP_BASE_API\":\"https://suzhoukeji-test.ali251.langye.net\",\"VUE_APP_UPLOAD_API\":\"https://suzhoukeji-test.ali251.langye.net/api/admin/upload-file\",\"NODE_ENV\":\"development\",\"BASE_URL\":\"/admin_test/\"}).VUE_APP_PREVIEW_API, \"?url=\").concat(encodeURIComponent(new Buffer(url).toString(\"base64\")));\n this.showModal = true;\n },\n down: function down(e) {\n Object(_utils_downloadRequest__WEBPACK_IMPORTED_MODULE_25__[\"download\"])(e.url, \"get\", {}, e.original_name);\n },\n getAllTables: function getAllTables() {\n var _this = this;\n Object(_api_system_customForm__WEBPACK_IMPORTED_MODULE_22__[\"index\"])({\n page: 1,\n page_size: 999\n }).then(function (res) {\n _this.allTables = res.data;\n });\n },\n getLinkTableList: function getLinkTableList() {\n var _this2 = this;\n var h = this.$createElement;\n var relationFields = this.fields.filter(function (field) {\n var _field$_relations, _field$_relations2;\n return ((_field$_relations = field._relations) === null || _field$_relations === void 0 ? void 0 : _field$_relations.link_relation) === 'newHasMany' || ((_field$_relations2 = field._relations) === null || _field$_relations2 === void 0 ? void 0 : _field$_relations2.link_relation) === 'hasMany';\n });\n var _loop = function _loop() {\n var _this2$allTables$find;\n var item = relationFields[i];\n var table_id = (_this2$allTables$find = _this2.allTables.find(function (table) {\n return table.table_name === item._relations.link_table_name;\n })) === null || _this2$allTables$find === void 0 ? void 0 : _this2$allTables$find.id;\n var promiseAll = [Object(_api_system_baseForm__WEBPACK_IMPORTED_MODULE_21__[\"index\"])({\n table_name: item._relations.link_table_name,\n page: 1,\n page_size: 999,\n filter: [{\n key: item._relations.foreign_key,\n op: 'eq',\n value: _this2.$route.params.id\n }]\n }), Object(_api_system_customForm__WEBPACK_IMPORTED_MODULE_22__[\"show\"])({\n id: table_id\n })];\n Promise.all(promiseAll).then(function (res) {\n if (item.edit_input !== 'files') {\n var dataTable = _this2.allTables.find(function (t) {\n return t.table_name === res[1].relation[0].link_table_name;\n });\n if (dataTable) {\n Object(_api_system_customForm__WEBPACK_IMPORTED_MODULE_22__[\"show\"])({\n id: dataTable === null || dataTable === void 0 ? void 0 : dataTable.id\n }).then(function (res1) {\n var _res$0$data, _res$2;\n _this2.linkTableList.push({\n value: (_res$0$data = res[0].data) === null || _res$0$data === void 0 ? void 0 : _res$0$data.map(function (o) {\n var _res$;\n return o[(_res$ = res[1]) === null || _res$ === void 0 || (_res$ = _res$.relation[0]) === null || _res$ === void 0 ? void 0 : _res$.link_with_name];\n }),\n field: _this2.formatColumn(res1),\n title: (_res$2 = res[1]) === null || _res$2 === void 0 ? void 0 : _res$2.name\n });\n });\n } else {\n var _item$_relations, _res$3;\n _this2.linkTableList.push({\n value: _this2.detail[item === null || item === void 0 || (_item$_relations = item._relations) === null || _item$_relations === void 0 ? void 0 : _item$_relations.link_with_name],\n field: _this2.formatColumn(res[1]),\n title: (_res$3 = res[1]) === null || _res$3 === void 0 ? void 0 : _res$3.name\n });\n }\n } else {\n var _res$0$data2, _res$5;\n _this2.linkTableList.push({\n value: (_res$0$data2 = res[0].data) === null || _res$0$data2 === void 0 ? void 0 : _res$0$data2.map(function (o) {\n var _res$4;\n return o[(_res$4 = res[1]) === null || _res$4 === void 0 || (_res$4 = _res$4.relation[0]) === null || _res$4 === void 0 ? void 0 : _res$4.link_with_name];\n }),\n field: [{\n type: 'index',\n label: '序号',\n width: 50\n }, {\n prop: 'original_name',\n label: '文件名'\n }, {\n label: '操作',\n width: 100,\n customFn: function customFn(row) {\n return h(\"div\", [h(\"el-button\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_3___default()([{\n \"attrs\": {\n \"type\": \"primary\",\n \"icon\": \"el-icon-download\",\n \"circle\": true,\n \"size\": \"mini\"\n }\n }, {\n \"on\": Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({}, 'click', function click(_) {\n return _this2.down(row);\n })\n }])), h(\"el-button\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_3___default()([{\n \"attrs\": {\n \"type\": \"primary\",\n \"icon\": \"el-icon-search\",\n \"circle\": true,\n \"size\": \"mini\"\n }\n }, {\n \"on\": Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({}, 'click', function click(_) {\n return _this2.open(row.url);\n })\n }]))]);\n }\n }],\n title: (_res$5 = res[1]) === null || _res$5 === void 0 ? void 0 : _res$5.name\n });\n }\n });\n };\n for (var i = 0; i < relationFields.length; i++) {\n _loop();\n }\n },\n formatColumn: function formatColumn(info) {\n var _this3 = this;\n var h = this.$createElement;\n var table = [];\n //字段处理\n //初始表白名单\n var baseTable = new Map([['departments', /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])( /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().mark(function _callee() {\n var res;\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Object(_api_system_department__WEBPACK_IMPORTED_MODULE_24__[\"listdept\"])();\n case 2:\n res = _context.sent;\n return _context.abrupt(\"return\", res);\n case 4:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }))], ['admins', []]]);\n var fields = info.fields,\n relation = info.relation;\n var fieldRes = fields.sort(function (a, b) {\n return a.sort - b.sort;\n });\n if (!fields || !relation || !fields instanceof Array || !relation instanceof Array) {\n throw new Error(\"fields或relation格式错误\");\n }\n fieldRes === null || fieldRes === void 0 || fieldRes.forEach(function (i, index) {\n i._relations = relation.find(function (j) {\n return j.custom_form_field === i.field;\n });\n if (i.select_item && Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(i.select_item) === 'object') {\n var keys = Object.keys(i.select_item);\n i._params = keys.map(function (key) {\n return {\n key: key,\n value: i.select_item[key]\n };\n });\n }\n if (i.edit_input === 'file' || i.edit_input === 'files') {\n return;\n }\n if (i._relations) {\n if (baseTable.get(i._relations.link_table_name)) {\n baseTable.get(i._relations.link_table_name)().then(function (res) {\n return i._params = res;\n });\n } else {\n i._params = i._relations.parameter_id ? Object(_api_system_dictionary__WEBPACK_IMPORTED_MODULE_23__[\"getparameter\"])({\n id: i._relations.parameter_id\n }, false).then(function (res) {\n i._params = res.detail;\n }) : _this3.index({\n table_name: i._relations.link_table_name,\n page: 1,\n page_size: 9999\n }).then(function (res) {\n i._params = res.data;\n });\n }\n }\n });\n fields === null || fields === void 0 || fields.filter(function (i) {\n return i.list_show;\n }).forEach(function (i) {\n if (i._relations) return;\n var linkOb = {};\n if (i.edit_input === \"richtext\") {\n linkOb.customFn = function (row) {\n return h(\"div\", {\n \"style\": {\n \"max-height\": \"55px\",\n \"overflow\": \"scroll\"\n },\n \"domProps\": {\n \"innerHTML\": row[i.field]\n }\n });\n };\n }\n if (i.select_item && Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(i.select_item) === \"object\" && !(i.select_item instanceof Array)) {\n var keys = Object.keys(i.select_item);\n linkOb.customFn = function (row) {\n var _row$i$field;\n var paramMap = new Map();\n keys.forEach(function (key) {\n paramMap.set(i.select_item[key], key);\n });\n return h(\"span\", [paramMap.get((_row$i$field = row[i.field]) === null || _row$i$field === void 0 ? void 0 : _row$i$field.toString())]);\n };\n }\n if (i._relations) {\n var _i$_relations = i._relations,\n link_relation = _i$_relations.link_relation,\n foreign_key = _i$_relations.foreign_key,\n link_with_name = _i$_relations.link_with_name;\n if (link_relation === \"newHasOne\" || link_relation === \"hasOne\") {\n linkOb.customFn = function (row) {\n if (i.edit_input === \"file\") {\n var _row$link_with_name, _row$link_with_name2, _row$link_with_name3;\n return h(\"a\", {\n \"attrs\": {\n \"download\": (_row$link_with_name = row[link_with_name]) === null || _row$link_with_name === void 0 ? void 0 : _row$link_with_name.original_name,\n \"href\": (_row$link_with_name2 = row[link_with_name]) === null || _row$link_with_name2 === void 0 ? void 0 : _row$link_with_name2.url\n }\n }, [(_row$link_with_name3 = row[link_with_name]) === null || _row$link_with_name3 === void 0 ? void 0 : _row$link_with_name3.original_name]);\n } else {\n var _row$link_with_name4, _row$link_with_name5, _row$link_with_name6;\n return h(\"span\", [((_row$link_with_name4 = row[link_with_name]) === null || _row$link_with_name4 === void 0 ? void 0 : _row$link_with_name4.name) || ((_row$link_with_name5 = row[link_with_name]) === null || _row$link_with_name5 === void 0 ? void 0 : _row$link_with_name5.no) || ((_row$link_with_name6 = row[link_with_name]) === null || _row$link_with_name6 === void 0 ? void 0 : _row$link_with_name6.value)]);\n }\n };\n }\n if (link_relation === \"hasMany\" || link_relation === \"newHasMany\") {\n linkOb.customFn = function (row) {\n if (i.edit_input === \"files\") {\n var _row$link_with_name7;\n return h(\"div\", {\n \"style\": \"display: flex;flex-direction: column;\"\n }, [(_row$link_with_name7 = row[link_with_name]) === null || _row$link_with_name7 === void 0 ? void 0 : _row$link_with_name7.map(function (o) {\n return h(\"a\", [(o === null || o === void 0 ? void 0 : o.original_name) || (o === null || o === void 0 ? void 0 : o.name)]);\n })]);\n } else {\n var _row$link_with_name8;\n return h(\"div\", [(_row$link_with_name8 = row[link_with_name]) === null || _row$link_with_name8 === void 0 ? void 0 : _row$link_with_name8.map(function (o) {\n return h(\"p\", [(o === null || o === void 0 ? void 0 : o.name) || (o === null || o === void 0 ? void 0 : o.no) || (o === null || o === void 0 ? void 0 : o.value) || (o === null || o === void 0 ? void 0 : o.biaoti) || (o === null || o === void 0 ? void 0 : o.mingcheng)]);\n })]);\n }\n };\n }\n }\n table.push(Object.assign({\n prop: i.field,\n label: i.name,\n width: i.width,\n fixed: i.is_fixed\n }, linkOb));\n });\n table.unshift({\n type: \"index\",\n width: 60,\n label: \"序号\"\n });\n return table;\n },\n getFields: function getFields() {\n var _this4 = this;\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])( /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().mark(function _callee3() {\n var _this4$$route$meta$pa;\n var _this4$$route$meta$pa2, decode, custom_form, res, baseTable, fields, relation, detail;\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n _this4.getAllTables();\n if ((_this4$$route$meta$pa = _this4.$route.meta.params) !== null && _this4$$route$meta$pa !== void 0 && _this4$$route$meta$pa.custom_form) {\n decode = decodeURIComponent((_this4$$route$meta$pa2 = _this4.$route.meta.params) === null || _this4$$route$meta$pa2 === void 0 ? void 0 : _this4$$route$meta$pa2.custom_form);\n try {\n custom_form = JSON.parse(decode);\n _this4.customForm.customFormId = custom_form.custom_form_id;\n _this4.customForm.tableName = custom_form.table_name;\n } catch (err) {\n console.warn(err);\n }\n }\n _context3.next = 4;\n return Object(_api_system_customForm__WEBPACK_IMPORTED_MODULE_22__[\"show\"])({\n id: _this4.customForm.customFormId\n }, false);\n case 4:\n res = _context3.sent;\n _this4.fields = res.fields.sort(function (a, b) {\n return a.sort - b.sort;\n });\n _this4.relation = res.relation;\n\n //字段处理\n //初始表白名单\n baseTable = new Map([[\"departments\", /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])( /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().mark(function _callee2() {\n var res;\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return Object(_api_system_department__WEBPACK_IMPORTED_MODULE_24__[\"listdept\"])();\n case 2:\n res = _context2.sent;\n return _context2.abrupt(\"return\", res);\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }))], [\"admins\", []]]);\n fields = _this4.fields, relation = _this4.relation;\n if (!(!fields || !relation || !fields instanceof Array || !relation instanceof Array)) {\n _context3.next = 11;\n break;\n }\n throw new Error(\"fields或relation格式错误\");\n case 11:\n fields.sort(function (a, b) {\n return a.sort - b.sort;\n }).forEach(function (i) {\n i._relations = relation.find(function (j) {\n return j.custom_form_field === i.field;\n });\n if (i.select_item && Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(i.select_item) === \"object\") {\n var keys = Object.keys(i.select_item);\n i._params = keys.map(function (key) {\n return {\n key: key,\n value: /^\\d*$/.test(i.select_item[key]) ? Number(i.select_item[key]) : i.select_item[key]\n };\n });\n }\n if (i.edit_input === \"file\" || i.edit_input === \"files\") {\n return;\n }\n if (i._relations) {\n if (baseTable.get(i._relations.link_table_name)) {\n baseTable.get(i._relations.link_table_name)().then(function (res) {\n i._params = res.data;\n });\n } else {\n // i._params = i._relations.parameter_id\n // ? getparameter({ id: i._relations.parameter_id }, false).then(\n // (res) => {\n // i._params = res.detail;\n // }\n // )\n // : this.index({\n // table_name: i._relations.link_table_name,\n // page: 1,\n // page_size: 9999,\n // }).then((res) => {\n // i._params = res.data;\n // });\n }\n }\n });\n _context3.next = 14;\n return Object(_api_system_baseForm__WEBPACK_IMPORTED_MODULE_21__[\"show\"])({\n id: _this4.$route.params.id,\n table_name: _this4.customForm.tableName\n });\n case 14:\n detail = _context3.sent;\n _this4.detail = detail;\n case 16:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }))();\n }\n },\n computed: {\n showFields: function showFields() {\n console.log(this.fields);\n return this.fields.filter(function (field) {\n return !field._relations || field._relations.link_relation === 'hasOne' || field._relations.link_relation === 'newHasOne';\n });\n },\n contentFormat: function contentFormat() {\n return function (i) {\n var _this5 = this;\n var _relations = i._relations;\n if (_relations && _relations.link_table_name) {\n if (_relations.link_relation === \"hasOne\" || _relations.link_relation === \"newHasOne\") {\n var _this$detail$_relatio, _this$detail$_relatio2, _this$detail$_relatio3, _this$detail$_relatio4, _this$detail$_relatio5;\n return ((_this$detail$_relatio = this.detail[_relations.link_with_name]) === null || _this$detail$_relatio === void 0 ? void 0 : _this$detail$_relatio.original_name) || ((_this$detail$_relatio2 = this.detail[_relations.link_with_name]) === null || _this$detail$_relatio2 === void 0 ? void 0 : _this$detail$_relatio2.name) || ((_this$detail$_relatio3 = this.detail[_relations.link_with_name]) === null || _this$detail$_relatio3 === void 0 ? void 0 : _this$detail$_relatio3.no) || ((_this$detail$_relatio4 = this.detail[_relations.link_with_name]) === null || _this$detail$_relatio4 === void 0 ? void 0 : _this$detail$_relatio4.value) || ((_this$detail$_relatio5 = this.detail[_relations.link_with_name]) === null || _this$detail$_relatio5 === void 0 ? void 0 : _this$detail$_relatio5.mingcheng);\n }\n return;\n }\n if (i._params && i._params.length > 0) {\n var _i$_params$find;\n return (_i$_params$find = i._params.find(function (j) {\n return j.value == _this5.detail[i.field];\n })) === null || _i$_params$find === void 0 ? void 0 : _i$_params$find.key;\n }\n return this.detail[i.field];\n };\n }\n },\n created: function created() {\n var _this6 = this;\n this.getFields().then(function (_) {\n _this6.getLinkTableList();\n });\n }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./src/views/component/detail.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/typeof.js */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ \"./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\");\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ \"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @vue/babel-helper-vue-jsx-merge-props */ \"./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n/* harmony import */ var core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.map.js */ \"./node_modules/core-js/modules/es.map.js\");\n/* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.regexp.test.js */ \"./node_modules/core-js/modules/es.regexp.test.js\");\n/* harmony import */ var core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _api_system_baseForm__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @/api/system/baseForm */ \"./src/api/system/baseForm.js\");\n/* harmony import */ var _api_system_customForm__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @/api/system/customForm */ \"./src/api/system/customForm.js\");\n/* harmony import */ var _api_system_dictionary__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @/api/system/dictionary */ \"./src/api/system/dictionary.js\");\n/* harmony import */ var _api_system_department__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @/api/system/department */ \"./src/api/system/department.js\");\n/* harmony import */ var _utils_downloadRequest__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @/utils/downloadRequest */ \"./src/utils/downloadRequest.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//\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\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"detail\",\n data: function data() {\n return {\n showModal: false,\n codeUri: \"\",\n detail: {},\n fields: [],\n relation: [],\n customForm: {\n customFormId: \"\",\n tableName: \"\"\n },\n allTables: [],\n linkTableList: []\n };\n },\n methods: {\n open: function open(url) {\n this.codeUri = \"\".concat(Object({\"VUE_APP_BASE_API\":\"https://suzhoukeji-test.ali251.langye.net\",\"VUE_APP_UPLOAD_API\":\"https://suzhoukeji-test.ali251.langye.net/api/admin/upload-file\",\"NODE_ENV\":\"development\",\"BASE_URL\":\"/admin/\"}).VUE_APP_PREVIEW_API, \"?url=\").concat(encodeURIComponent(new Buffer(url).toString(\"base64\")));\n this.showModal = true;\n },\n down: function down(e) {\n Object(_utils_downloadRequest__WEBPACK_IMPORTED_MODULE_25__[\"download\"])(e.url, \"get\", {}, e.original_name);\n },\n getAllTables: function getAllTables() {\n var _this = this;\n Object(_api_system_customForm__WEBPACK_IMPORTED_MODULE_22__[\"index\"])({\n page: 1,\n page_size: 999\n }).then(function (res) {\n _this.allTables = res.data;\n });\n },\n getLinkTableList: function getLinkTableList() {\n var _this2 = this;\n var h = this.$createElement;\n var relationFields = this.fields.filter(function (field) {\n var _field$_relations, _field$_relations2;\n return ((_field$_relations = field._relations) === null || _field$_relations === void 0 ? void 0 : _field$_relations.link_relation) === 'newHasMany' || ((_field$_relations2 = field._relations) === null || _field$_relations2 === void 0 ? void 0 : _field$_relations2.link_relation) === 'hasMany';\n });\n var _loop = function _loop() {\n var _this2$allTables$find;\n var item = relationFields[i];\n var table_id = (_this2$allTables$find = _this2.allTables.find(function (table) {\n return table.table_name === item._relations.link_table_name;\n })) === null || _this2$allTables$find === void 0 ? void 0 : _this2$allTables$find.id;\n var promiseAll = [Object(_api_system_baseForm__WEBPACK_IMPORTED_MODULE_21__[\"index\"])({\n table_name: item._relations.link_table_name,\n page: 1,\n page_size: 999,\n filter: [{\n key: item._relations.foreign_key,\n op: 'eq',\n value: _this2.$route.params.id\n }]\n }), Object(_api_system_customForm__WEBPACK_IMPORTED_MODULE_22__[\"show\"])({\n id: table_id\n })];\n Promise.all(promiseAll).then(function (res) {\n if (item.edit_input !== 'files') {\n var dataTable = _this2.allTables.find(function (t) {\n return t.table_name === res[1].relation[0].link_table_name;\n });\n if (dataTable) {\n Object(_api_system_customForm__WEBPACK_IMPORTED_MODULE_22__[\"show\"])({\n id: dataTable === null || dataTable === void 0 ? void 0 : dataTable.id\n }).then(function (res1) {\n var _res$0$data, _res$2;\n _this2.linkTableList.push({\n value: (_res$0$data = res[0].data) === null || _res$0$data === void 0 ? void 0 : _res$0$data.map(function (o) {\n var _res$;\n return o[(_res$ = res[1]) === null || _res$ === void 0 || (_res$ = _res$.relation[0]) === null || _res$ === void 0 ? void 0 : _res$.link_with_name];\n }),\n field: _this2.formatColumn(res1),\n title: (_res$2 = res[1]) === null || _res$2 === void 0 ? void 0 : _res$2.name\n });\n });\n } else {\n var _item$_relations, _res$3;\n _this2.linkTableList.push({\n value: _this2.detail[item === null || item === void 0 || (_item$_relations = item._relations) === null || _item$_relations === void 0 ? void 0 : _item$_relations.link_with_name],\n field: _this2.formatColumn(res[1]),\n title: (_res$3 = res[1]) === null || _res$3 === void 0 ? void 0 : _res$3.name\n });\n }\n } else {\n var _res$0$data2, _res$5;\n _this2.linkTableList.push({\n value: (_res$0$data2 = res[0].data) === null || _res$0$data2 === void 0 ? void 0 : _res$0$data2.map(function (o) {\n var _res$4;\n return o[(_res$4 = res[1]) === null || _res$4 === void 0 || (_res$4 = _res$4.relation[0]) === null || _res$4 === void 0 ? void 0 : _res$4.link_with_name];\n }),\n field: [{\n type: 'index',\n label: '序号',\n width: 50\n }, {\n prop: 'original_name',\n label: '文件名'\n }, {\n label: '操作',\n width: 100,\n customFn: function customFn(row) {\n return h(\"div\", [h(\"el-button\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_3___default()([{\n \"attrs\": {\n \"type\": \"primary\",\n \"icon\": \"el-icon-download\",\n \"circle\": true,\n \"size\": \"mini\"\n }\n }, {\n \"on\": Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({}, 'click', function click(_) {\n return _this2.down(row);\n })\n }])), h(\"el-button\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_3___default()([{\n \"attrs\": {\n \"type\": \"primary\",\n \"icon\": \"el-icon-search\",\n \"circle\": true,\n \"size\": \"mini\"\n }\n }, {\n \"on\": Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({}, 'click', function click(_) {\n return _this2.open(row.url);\n })\n }]))]);\n }\n }],\n title: (_res$5 = res[1]) === null || _res$5 === void 0 ? void 0 : _res$5.name\n });\n }\n });\n };\n for (var i = 0; i < relationFields.length; i++) {\n _loop();\n }\n },\n formatColumn: function formatColumn(info) {\n var _this3 = this;\n var h = this.$createElement;\n var table = [];\n //字段处理\n //初始表白名单\n var baseTable = new Map([['departments', /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])( /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().mark(function _callee() {\n var res;\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Object(_api_system_department__WEBPACK_IMPORTED_MODULE_24__[\"listdept\"])();\n case 2:\n res = _context.sent;\n return _context.abrupt(\"return\", res);\n case 4:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }))], ['admins', []]]);\n var fields = info.fields,\n relation = info.relation;\n var fieldRes = fields.sort(function (a, b) {\n return a.sort - b.sort;\n });\n if (!fields || !relation || !fields instanceof Array || !relation instanceof Array) {\n throw new Error(\"fields或relation格式错误\");\n }\n fieldRes === null || fieldRes === void 0 || fieldRes.forEach(function (i, index) {\n i._relations = relation.find(function (j) {\n return j.custom_form_field === i.field;\n });\n if (i.select_item && Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(i.select_item) === 'object') {\n var keys = Object.keys(i.select_item);\n i._params = keys.map(function (key) {\n return {\n key: key,\n value: i.select_item[key]\n };\n });\n }\n if (i.edit_input === 'file' || i.edit_input === 'files') {\n return;\n }\n if (i._relations) {\n if (baseTable.get(i._relations.link_table_name)) {\n baseTable.get(i._relations.link_table_name)().then(function (res) {\n return i._params = res;\n });\n } else {\n i._params = i._relations.parameter_id ? Object(_api_system_dictionary__WEBPACK_IMPORTED_MODULE_23__[\"getparameter\"])({\n id: i._relations.parameter_id\n }, false).then(function (res) {\n i._params = res.detail;\n }) : _this3.index({\n table_name: i._relations.link_table_name,\n page: 1,\n page_size: 9999\n }).then(function (res) {\n i._params = res.data;\n });\n }\n }\n });\n fields === null || fields === void 0 || fields.filter(function (i) {\n return i.list_show;\n }).forEach(function (i) {\n if (i._relations) return;\n var linkOb = {};\n if (i.edit_input === \"richtext\") {\n linkOb.customFn = function (row) {\n return h(\"div\", {\n \"style\": {\n \"max-height\": \"55px\",\n \"overflow\": \"scroll\"\n },\n \"domProps\": {\n \"innerHTML\": row[i.field]\n }\n });\n };\n }\n if (i.select_item && Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(i.select_item) === \"object\" && !(i.select_item instanceof Array)) {\n var keys = Object.keys(i.select_item);\n linkOb.customFn = function (row) {\n var _row$i$field;\n var paramMap = new Map();\n keys.forEach(function (key) {\n paramMap.set(i.select_item[key], key);\n });\n return h(\"span\", [paramMap.get((_row$i$field = row[i.field]) === null || _row$i$field === void 0 ? void 0 : _row$i$field.toString())]);\n };\n }\n if (i._relations) {\n var _i$_relations = i._relations,\n link_relation = _i$_relations.link_relation,\n foreign_key = _i$_relations.foreign_key,\n link_with_name = _i$_relations.link_with_name;\n if (link_relation === \"newHasOne\" || link_relation === \"hasOne\") {\n linkOb.customFn = function (row) {\n if (i.edit_input === \"file\") {\n var _row$link_with_name, _row$link_with_name2, _row$link_with_name3;\n return h(\"a\", {\n \"attrs\": {\n \"download\": (_row$link_with_name = row[link_with_name]) === null || _row$link_with_name === void 0 ? void 0 : _row$link_with_name.original_name,\n \"href\": (_row$link_with_name2 = row[link_with_name]) === null || _row$link_with_name2 === void 0 ? void 0 : _row$link_with_name2.url\n }\n }, [(_row$link_with_name3 = row[link_with_name]) === null || _row$link_with_name3 === void 0 ? void 0 : _row$link_with_name3.original_name]);\n } else {\n var _row$link_with_name4, _row$link_with_name5, _row$link_with_name6;\n return h(\"span\", [((_row$link_with_name4 = row[link_with_name]) === null || _row$link_with_name4 === void 0 ? void 0 : _row$link_with_name4.name) || ((_row$link_with_name5 = row[link_with_name]) === null || _row$link_with_name5 === void 0 ? void 0 : _row$link_with_name5.no) || ((_row$link_with_name6 = row[link_with_name]) === null || _row$link_with_name6 === void 0 ? void 0 : _row$link_with_name6.value)]);\n }\n };\n }\n if (link_relation === \"hasMany\" || link_relation === \"newHasMany\") {\n linkOb.customFn = function (row) {\n if (i.edit_input === \"files\") {\n var _row$link_with_name7;\n return h(\"div\", {\n \"style\": \"display: flex;flex-direction: column;\"\n }, [(_row$link_with_name7 = row[link_with_name]) === null || _row$link_with_name7 === void 0 ? void 0 : _row$link_with_name7.map(function (o) {\n return h(\"a\", [(o === null || o === void 0 ? void 0 : o.original_name) || (o === null || o === void 0 ? void 0 : o.name)]);\n })]);\n } else {\n var _row$link_with_name8;\n return h(\"div\", [(_row$link_with_name8 = row[link_with_name]) === null || _row$link_with_name8 === void 0 ? void 0 : _row$link_with_name8.map(function (o) {\n return h(\"p\", [(o === null || o === void 0 ? void 0 : o.name) || (o === null || o === void 0 ? void 0 : o.no) || (o === null || o === void 0 ? void 0 : o.value) || (o === null || o === void 0 ? void 0 : o.biaoti) || (o === null || o === void 0 ? void 0 : o.mingcheng)]);\n })]);\n }\n };\n }\n }\n table.push(Object.assign({\n prop: i.field,\n label: i.name,\n width: i.width,\n fixed: i.is_fixed\n }, linkOb));\n });\n table.unshift({\n type: \"index\",\n width: 60,\n label: \"序号\"\n });\n return table;\n },\n getFields: function getFields() {\n var _this4 = this;\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])( /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().mark(function _callee3() {\n var _this4$$route$meta$pa;\n var _this4$$route$meta$pa2, decode, custom_form, res, baseTable, fields, relation, detail;\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n _this4.getAllTables();\n if ((_this4$$route$meta$pa = _this4.$route.meta.params) !== null && _this4$$route$meta$pa !== void 0 && _this4$$route$meta$pa.custom_form) {\n decode = decodeURIComponent((_this4$$route$meta$pa2 = _this4.$route.meta.params) === null || _this4$$route$meta$pa2 === void 0 ? void 0 : _this4$$route$meta$pa2.custom_form);\n try {\n custom_form = JSON.parse(decode);\n _this4.customForm.customFormId = custom_form.custom_form_id;\n _this4.customForm.tableName = custom_form.table_name;\n } catch (err) {\n console.warn(err);\n }\n }\n _context3.next = 4;\n return Object(_api_system_customForm__WEBPACK_IMPORTED_MODULE_22__[\"show\"])({\n id: _this4.customForm.customFormId\n }, false);\n case 4:\n res = _context3.sent;\n _this4.fields = res.fields.sort(function (a, b) {\n return a.sort - b.sort;\n });\n _this4.relation = res.relation;\n\n //字段处理\n //初始表白名单\n baseTable = new Map([[\"departments\", /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])( /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().mark(function _callee2() {\n var res;\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return Object(_api_system_department__WEBPACK_IMPORTED_MODULE_24__[\"listdept\"])();\n case 2:\n res = _context2.sent;\n return _context2.abrupt(\"return\", res);\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }))], [\"admins\", []]]);\n fields = _this4.fields, relation = _this4.relation;\n if (!(!fields || !relation || !fields instanceof Array || !relation instanceof Array)) {\n _context3.next = 11;\n break;\n }\n throw new Error(\"fields或relation格式错误\");\n case 11:\n fields.sort(function (a, b) {\n return a.sort - b.sort;\n }).forEach(function (i) {\n i._relations = relation.find(function (j) {\n return j.custom_form_field === i.field;\n });\n if (i.select_item && Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(i.select_item) === \"object\") {\n var keys = Object.keys(i.select_item);\n i._params = keys.map(function (key) {\n return {\n key: key,\n value: /^\\d*$/.test(i.select_item[key]) ? Number(i.select_item[key]) : i.select_item[key]\n };\n });\n }\n if (i.edit_input === \"file\" || i.edit_input === \"files\") {\n return;\n }\n if (i._relations) {\n if (baseTable.get(i._relations.link_table_name)) {\n baseTable.get(i._relations.link_table_name)().then(function (res) {\n i._params = res.data;\n });\n } else {\n // i._params = i._relations.parameter_id\n // ? getparameter({ id: i._relations.parameter_id }, false).then(\n // (res) => {\n // i._params = res.detail;\n // }\n // )\n // : this.index({\n // table_name: i._relations.link_table_name,\n // page: 1,\n // page_size: 9999,\n // }).then((res) => {\n // i._params = res.data;\n // });\n }\n }\n });\n _context3.next = 14;\n return Object(_api_system_baseForm__WEBPACK_IMPORTED_MODULE_21__[\"show\"])({\n id: _this4.$route.params.id,\n table_name: _this4.customForm.tableName\n });\n case 14:\n detail = _context3.sent;\n _this4.detail = detail;\n case 16:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }))();\n }\n },\n computed: {\n showFields: function showFields() {\n console.log(this.fields);\n return this.fields.filter(function (field) {\n return !field._relations || field._relations.link_relation === 'hasOne' || field._relations.link_relation === 'newHasOne';\n });\n },\n contentFormat: function contentFormat() {\n return function (i) {\n var _this5 = this;\n var _relations = i._relations;\n if (_relations && _relations.link_table_name) {\n if (_relations.link_relation === \"hasOne\" || _relations.link_relation === \"newHasOne\") {\n var _this$detail$_relatio, _this$detail$_relatio2, _this$detail$_relatio3, _this$detail$_relatio4, _this$detail$_relatio5;\n return ((_this$detail$_relatio = this.detail[_relations.link_with_name]) === null || _this$detail$_relatio === void 0 ? void 0 : _this$detail$_relatio.original_name) || ((_this$detail$_relatio2 = this.detail[_relations.link_with_name]) === null || _this$detail$_relatio2 === void 0 ? void 0 : _this$detail$_relatio2.name) || ((_this$detail$_relatio3 = this.detail[_relations.link_with_name]) === null || _this$detail$_relatio3 === void 0 ? void 0 : _this$detail$_relatio3.no) || ((_this$detail$_relatio4 = this.detail[_relations.link_with_name]) === null || _this$detail$_relatio4 === void 0 ? void 0 : _this$detail$_relatio4.value) || ((_this$detail$_relatio5 = this.detail[_relations.link_with_name]) === null || _this$detail$_relatio5 === void 0 ? void 0 : _this$detail$_relatio5.mingcheng);\n }\n return;\n }\n if (i._params && i._params.length > 0) {\n var _i$_params$find;\n return (_i$_params$find = i._params.find(function (j) {\n return j.value == _this5.detail[i.field];\n })) === null || _i$_params$find === void 0 ? void 0 : _i$_params$find.key;\n }\n return this.detail[i.field];\n };\n }\n },\n created: function created() {\n var _this6 = this;\n this.getFields().then(function (_) {\n _this6.getLinkTableList();\n });\n }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./src/views/component/detail.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -8450,7 +8450,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getForm\", function() { return getForm; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getRenderTable\", function() { return getRenderTable; });\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/typeof.js */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/babel-helper-vue-jsx-merge-props */ \"./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ \"./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\");\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ \"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n/* harmony import */ var core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.map.js */ \"./node_modules/core-js/modules/es.map.js\");\n/* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.regexp.test.js */ \"./node_modules/core-js/modules/es.regexp.test.js\");\n/* harmony import */ var core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _api_system_customForm__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @/api/system/customForm */ \"./src/api/system/customForm.js\");\n/* harmony import */ var _api_common__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @/api/common */ \"./src/api/common.js\");\n/* harmony import */ var _styles_variables_scss__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @/styles/variables.scss */ \"./src/styles/variables.scss\");\n/* harmony import */ var _styles_variables_scss__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_styles_variables_scss__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _utils_downloadRequest__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @/utils/downloadRequest */ \"./src/utils/downloadRequest.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\nfunction down(url) {\n Object(_utils_downloadRequest__WEBPACK_IMPORTED_MODULE_23__[\"download\"])(url);\n}\nfunction preview(url) {\n var codeUri = \"\".concat(Object({\"VUE_APP_BASE_API\":\"https://suzhoukeji-test.ali251.langye.net\",\"VUE_APP_UPLOAD_API\":\"https://suzhoukeji-test.ali251.langye.net/api/admin/upload-file\",\"NODE_ENV\":\"development\",\"BASE_URL\":\"/admin_test/\"}).VUE_APP_PREVIEW_API, \"?url=\").concat(encodeURIComponent(new Buffer(url).toString(\"base64\")));\n window.open(codeUri, '_blank');\n}\nvar baseTable = new Map([['departments', /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])( /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().mark(function _callee() {\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Object(_api_common__WEBPACK_IMPORTED_MODULE_21__[\"listCommondepartment\"])();\n case 2:\n return _context.abrupt(\"return\", _context.sent);\n case 3:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n}))], ['admins', /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])( /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().mark(function _callee2() {\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return Object(_api_common__WEBPACK_IMPORTED_MODULE_21__[\"listCommonuser\"])();\n case 2:\n return _context2.abrupt(\"return\", _context2.sent);\n case 3:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n}))]]);\nfunction getForm(_x) {\n return _getForm.apply(this, arguments);\n}\nfunction _getForm() {\n _getForm = Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])( /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().mark(function _callee3(customFormId) {\n var selectItemMap, res, fields, relation, fieldRes;\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n selectItemMap = new Map();\n if (customFormId) {\n _context3.next = 4;\n break;\n }\n console.warn(\"customFormId is required!\");\n return _context3.abrupt(\"return\");\n case 4:\n _context3.next = 6;\n return Object(_api_system_customForm__WEBPACK_IMPORTED_MODULE_20__[\"show\"])({\n id: customFormId\n }, false);\n case 6:\n res = _context3.sent;\n fields = res.fields, relation = res.relation;\n fieldRes = fields.sort(function (a, b) {\n return a.sort - b.sort;\n });\n if (!(!fields || !relation || !fields instanceof Array || !relation instanceof Array)) {\n _context3.next = 11;\n break;\n }\n throw new Error(\"fields或relation参数错误\");\n case 11:\n fieldRes === null || fieldRes === void 0 || fieldRes.forEach(function (i, index) {\n i._relations = relation.find(function (j) {\n return j.custom_form_field === i.field;\n });\n if (i.select_item && Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(i.select_item) === 'object') {\n var keys = Object.keys(i.select_item);\n if (keys.length > 0) {\n i._params = keys.map(function (key) {\n return {\n key: key,\n value: /^\\d*$/.test(i.select_item[key]) ? Number(i.select_item[key]) : i.select_item[key]\n };\n });\n selectItemMap.set(i.field, i._params);\n\n //有select,radio\n i.edit_input = 'radio';\n }\n }\n });\n return _context3.abrupt(\"return\", {\n fieldRes: fieldRes,\n selectItemMap: selectItemMap\n });\n case 13:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return _getForm.apply(this, arguments);\n}\nfunction getRenderTable(ctx, fields, replaces) {\n var h = ctx.$createElement;\n if (replaces && !(replaces instanceof Map)) {\n throw new Error(\"replaces参数错误,需要Map类型\");\n }\n return fields.map(function (field, index) {\n console.log(\"fields\", fields);\n //\n\n //自定义替换\n if (replaces instanceof Map && replaces.get(field.field)) {\n return replaces.get(field.field);\n }\n //文件\n if (field.edit_input === 'file' || field.edit_input === 'files') {\n var renderFn = function renderFn() {};\n var _field$_relations = field._relations,\n link_relation = _field$_relations.link_relation,\n foreign_key = _field$_relations.foreign_key,\n link_with_name = _field$_relations.link_with_name;\n if (link_relation === 'hasOne' || link_relation === 'newHasOne') {\n renderFn = function renderFn(row) {\n var _row$link_with_name, _row$link_with_name2, _row$link_with_name3, _row$link_with_name4, _row$link_with_name5, _row$link_with_name6, _row$link_with_name7;\n if (!((_row$link_with_name = row[link_with_name]) !== null && _row$link_with_name !== void 0 && _row$link_with_name.url)) {\n return '';\n }\n return h(\"div\", {\n \"style\": \"display: flex;align-items: center;\"\n }, [['jpg', 'jpeg', 'png', 'gif', 'svg', 'webp', 'bmp'].indexOf((_row$link_with_name2 = row[link_with_name]) === null || _row$link_with_name2 === void 0 ? void 0 : _row$link_with_name2.extension) === -1 ? h(\"el-link\", {\n \"attrs\": {\n \"type\": \"primary\",\n \"download\": (_row$link_with_name3 = row[link_with_name]) === null || _row$link_with_name3 === void 0 ? void 0 : _row$link_with_name3.original_name\n }\n }, [(_row$link_with_name4 = row[link_with_name]) === null || _row$link_with_name4 === void 0 ? void 0 : _row$link_with_name4.original_name]) : h(\"el-image\", {\n \"attrs\": {\n \"fit\": \"contain\",\n \"src\": (_row$link_with_name5 = row[link_with_name]) === null || _row$link_with_name5 === void 0 ? void 0 : _row$link_with_name5.url,\n \"alt\": (_row$link_with_name6 = row[link_with_name]) === null || _row$link_with_name6 === void 0 ? void 0 : _row$link_with_name6.original_name,\n \"preview-src-list\": [(_row$link_with_name7 = row[link_with_name]) === null || _row$link_with_name7 === void 0 ? void 0 : _row$link_with_name7.url]\n },\n \"style\": \"max-width: 80px;max-height: 60px;\"\n }), h(\"Icon\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default()([{\n \"attrs\": {\n \"type\": \"md-cloud-download\",\n \"color\": _styles_variables_scss__WEBPACK_IMPORTED_MODULE_22__[\"primaryColor\"]\n },\n \"style\": \"margin-left: 10px;cursor: pointer;font-size: 17px;\"\n }, {\n \"on\": Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, 'click', function click(_) {\n var _row$link_with_name8;\n return down((_row$link_with_name8 = row[link_with_name]) === null || _row$link_with_name8 === void 0 ? void 0 : _row$link_with_name8.url);\n })\n }])), h(\"Icon\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default()([{\n \"attrs\": {\n \"type\": \"md-eye\",\n \"color\": _styles_variables_scss__WEBPACK_IMPORTED_MODULE_22__[\"primaryColor\"]\n },\n \"style\": \"margin-left: 4px;cursor: pointer;font-size: 17px;\"\n }, {\n \"on\": Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, 'click', function click(_) {\n var _row$link_with_name9;\n return preview((_row$link_with_name9 = row[link_with_name]) === null || _row$link_with_name9 === void 0 ? void 0 : _row$link_with_name9.url);\n })\n }]))]);\n };\n } else {\n renderFn = function renderFn(row) {\n var _row$link_with_name10;\n return h(\"div\", {\n \"style\": \"display: flex;flex-direction: column;align-items: flex-start;\"\n }, [(_row$link_with_name10 = row[link_with_name]) === null || _row$link_with_name10 === void 0 ? void 0 : _row$link_with_name10.map(function (o, oi) {\n return h(\"div\", {\n \"style\": \"display: flex;align-items: center;\"\n }, [['jpg', 'jpeg', 'png', 'gif', 'svg', 'webp', 'bmp'].indexOf(o === null || o === void 0 ? void 0 : o.extension) === -1 ? h(\"el-link\", {\n \"attrs\": {\n \"type\": \"primary\",\n \"download\": o === null || o === void 0 ? void 0 : o.original_name,\n \"href\": o === null || o === void 0 ? void 0 : o.url\n }\n }, [oi + 1, \". \", (o === null || o === void 0 ? void 0 : o.original_name) || (o === null || o === void 0 ? void 0 : o.name)]) : h(\"el-image\", {\n \"attrs\": {\n \"fit\": \"contain\",\n \"src\": o === null || o === void 0 ? void 0 : o.url,\n \"alt\": o === null || o === void 0 ? void 0 : o.original_name,\n \"preview-src-list\": [o === null || o === void 0 ? void 0 : o.url]\n },\n \"style\": \"max-width: 80px;\"\n }), h(\"Icon\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default()([{\n \"attrs\": {\n \"type\": \"md-cloud-download\",\n \"color\": _styles_variables_scss__WEBPACK_IMPORTED_MODULE_22__[\"primaryColor\"]\n },\n \"style\": \"margin-left: 10px;cursor: pointer;font-size: 17px;\"\n }, {\n \"on\": Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, 'click', function click(_) {\n return down(o === null || o === void 0 ? void 0 : o.url);\n })\n }])), h(\"Icon\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default()([{\n \"attrs\": {\n \"type\": \"md-eye\",\n \"color\": _styles_variables_scss__WEBPACK_IMPORTED_MODULE_22__[\"primaryColor\"]\n },\n \"style\": \"margin-left: 4px;cursor: pointer;font-size: 17px;\"\n }, {\n \"on\": Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, 'click', function click(_) {\n return preview(o === null || o === void 0 ? void 0 : o.url);\n })\n }]))]);\n })]);\n };\n }\n return {\n prop: field.field,\n label: field.name,\n width: field.width,\n align: \"left\",\n showOverflowTooltip: false,\n customFn: function customFn(row) {\n return renderFn(row);\n }\n };\n }\n\n //关联\n if (field._relations && Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(field._relations) === 'object') {\n var _renderFn = function _renderFn() {};\n var _field$_relations2 = field._relations,\n _link_relation = _field$_relations2.link_relation,\n _foreign_key = _field$_relations2.foreign_key,\n _link_with_name = _field$_relations2.link_with_name;\n if (_link_relation === 'hasOne' || _link_relation === 'newHasOne') {\n _renderFn = function _renderFn(row) {\n var _row$_link_with_name, _row$_link_with_name2, _row$_link_with_name3, _row$_link_with_name4, _row$_link_with_name5, _row$_link_with_name6;\n return h(\"span\", [((_row$_link_with_name = row[_link_with_name]) === null || _row$_link_with_name === void 0 ? void 0 : _row$_link_with_name.name) || ((_row$_link_with_name2 = row[_link_with_name]) === null || _row$_link_with_name2 === void 0 ? void 0 : _row$_link_with_name2.title) || ((_row$_link_with_name3 = row[_link_with_name]) === null || _row$_link_with_name3 === void 0 ? void 0 : _row$_link_with_name3.no) || ((_row$_link_with_name4 = row[_link_with_name]) === null || _row$_link_with_name4 === void 0 ? void 0 : _row$_link_with_name4.value) || ((_row$_link_with_name5 = row[_link_with_name]) === null || _row$_link_with_name5 === void 0 ? void 0 : _row$_link_with_name5.biaoti) || ((_row$_link_with_name6 = row[_link_with_name]) === null || _row$_link_with_name6 === void 0 ? void 0 : _row$_link_with_name6.mingcheng)]);\n };\n }\n if (_link_relation === 'hasMany' || _link_relation === 'newHasMany') {\n _renderFn = function _renderFn(row) {\n var _row$_link_with_name7;\n return h(\"div\", [(_row$_link_with_name7 = row[_link_with_name]) === null || _row$_link_with_name7 === void 0 ? void 0 : _row$_link_with_name7.map(function (o) {\n return h(\"p\", [(o === null || o === void 0 ? void 0 : o.name) || (o === null || o === void 0 ? void 0 : o.title) || (o === null || o === void 0 ? void 0 : o.no) || (o === null || o === void 0 ? void 0 : o.value) || (o === null || o === void 0 ? void 0 : o.biaoti) || (o === null || o === void 0 ? void 0 : o.mingcheng)]);\n })]);\n };\n }\n return {\n prop: field.field,\n label: field.name,\n width: field.width,\n customFn: function customFn(row) {\n return _renderFn(row);\n },\n fixed: field.is_fixed\n };\n }\n\n //富文本\n if (field.edit_input === 'richtext') {\n return {\n prop: field.field,\n label: field.name,\n width: field.width,\n showOverflowTooltip: false,\n customFn: function customFn(row) {\n return h(\"el-popover\", {\n \"attrs\": {\n \"placement\": \"bottom\",\n \"trigger\": \"click\",\n \"width\": row[field.field] ? 400 : 100\n }\n }, [row[field.field] ? h(\"div\", {\n \"slot\": \"default\",\n \"style\": \"width: 100%;max-height: 200px;overflow: scroll;\",\n \"domProps\": {\n \"innerHTML\": row[field.field]\n }\n }) : h(\"div\", {\n \"slot\": 'default',\n \"style\": 'text-align: center'\n }, [\"\\u6682\\u65E0\\u5185\\u5BB9\"]), h(\"el-link\", {\n \"attrs\": {\n \"type\": \"primary\"\n },\n \"slot\": \"reference\"\n }, [\"\\u67E5\\u770B\"])]);\n },\n fixed: field.is_fixed\n };\n }\n\n //select内容\n if (field._params && field._params instanceof Array) {\n return {\n prop: field.field,\n label: field.name,\n width: field.width,\n customFn: function customFn(row) {\n var _field$_params$find;\n return h(\"span\", [(_field$_params$find = field._params.find(function (param) {\n return param.value == row[field.field];\n })) === null || _field$_params$find === void 0 ? void 0 : _field$_params$find.key]);\n },\n fixed: field.is_fixed\n };\n }\n if (field.list_show === 0) {} else {\n return {\n prop: field.field,\n label: field.name,\n width: field.width,\n fixed: field.is_fixed\n };\n }\n });\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./src/utils/table.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getForm\", function() { return getForm; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getRenderTable\", function() { return getRenderTable; });\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/typeof.js */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/babel-helper-vue-jsx-merge-props */ \"./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ \"./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\");\n/* harmony import */ var _Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ \"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n/* harmony import */ var core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_sort_js__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.map.js */ \"./node_modules/core-js/modules/es.map.js\");\n/* harmony import */ var core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map_js__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.regexp.test.js */ \"./node_modules/core-js/modules/es.regexp.test.js\");\n/* harmony import */ var core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_test_js__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _api_system_customForm__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @/api/system/customForm */ \"./src/api/system/customForm.js\");\n/* harmony import */ var _api_common__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @/api/common */ \"./src/api/common.js\");\n/* harmony import */ var _styles_variables_scss__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @/styles/variables.scss */ \"./src/styles/variables.scss\");\n/* harmony import */ var _styles_variables_scss__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_styles_variables_scss__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _utils_downloadRequest__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @/utils/downloadRequest */ \"./src/utils/downloadRequest.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\nfunction down(url) {\n Object(_utils_downloadRequest__WEBPACK_IMPORTED_MODULE_23__[\"download\"])(url);\n}\nfunction preview(url) {\n var codeUri = \"\".concat(Object({\"VUE_APP_BASE_API\":\"https://suzhoukeji-test.ali251.langye.net\",\"VUE_APP_UPLOAD_API\":\"https://suzhoukeji-test.ali251.langye.net/api/admin/upload-file\",\"NODE_ENV\":\"development\",\"BASE_URL\":\"/admin/\"}).VUE_APP_PREVIEW_API, \"?url=\").concat(encodeURIComponent(new Buffer(url).toString(\"base64\")));\n window.open(codeUri, '_blank');\n}\nvar baseTable = new Map([['departments', /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])( /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().mark(function _callee() {\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Object(_api_common__WEBPACK_IMPORTED_MODULE_21__[\"listCommondepartment\"])();\n case 2:\n return _context.abrupt(\"return\", _context.sent);\n case 3:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n}))], ['admins', /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])( /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().mark(function _callee2() {\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return Object(_api_common__WEBPACK_IMPORTED_MODULE_21__[\"listCommonuser\"])();\n case 2:\n return _context2.abrupt(\"return\", _context2.sent);\n case 3:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n}))]]);\nfunction getForm(_x) {\n return _getForm.apply(this, arguments);\n}\nfunction _getForm() {\n _getForm = Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])( /*#__PURE__*/Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().mark(function _callee3(customFormId) {\n var selectItemMap, res, fields, relation, fieldRes;\n return Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n selectItemMap = new Map();\n if (customFormId) {\n _context3.next = 4;\n break;\n }\n console.warn(\"customFormId is required!\");\n return _context3.abrupt(\"return\");\n case 4:\n _context3.next = 6;\n return Object(_api_system_customForm__WEBPACK_IMPORTED_MODULE_20__[\"show\"])({\n id: customFormId\n }, false);\n case 6:\n res = _context3.sent;\n fields = res.fields, relation = res.relation;\n fieldRes = fields.sort(function (a, b) {\n return a.sort - b.sort;\n });\n if (!(!fields || !relation || !fields instanceof Array || !relation instanceof Array)) {\n _context3.next = 11;\n break;\n }\n throw new Error(\"fields或relation参数错误\");\n case 11:\n fieldRes === null || fieldRes === void 0 || fieldRes.forEach(function (i, index) {\n i._relations = relation.find(function (j) {\n return j.custom_form_field === i.field;\n });\n if (i.select_item && Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(i.select_item) === 'object') {\n var keys = Object.keys(i.select_item);\n if (keys.length > 0) {\n i._params = keys.map(function (key) {\n return {\n key: key,\n value: /^\\d*$/.test(i.select_item[key]) ? Number(i.select_item[key]) : i.select_item[key]\n };\n });\n selectItemMap.set(i.field, i._params);\n\n //有select,radio\n i.edit_input = 'radio';\n }\n }\n });\n return _context3.abrupt(\"return\", {\n fieldRes: fieldRes,\n selectItemMap: selectItemMap\n });\n case 13:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return _getForm.apply(this, arguments);\n}\nfunction getRenderTable(ctx, fields, replaces) {\n var h = ctx.$createElement;\n if (replaces && !(replaces instanceof Map)) {\n throw new Error(\"replaces参数错误,需要Map类型\");\n }\n return fields.map(function (field, index) {\n console.log(\"fields\", fields);\n //\n\n //自定义替换\n if (replaces instanceof Map && replaces.get(field.field)) {\n return replaces.get(field.field);\n }\n //文件\n if (field.edit_input === 'file' || field.edit_input === 'files') {\n var renderFn = function renderFn() {};\n var _field$_relations = field._relations,\n link_relation = _field$_relations.link_relation,\n foreign_key = _field$_relations.foreign_key,\n link_with_name = _field$_relations.link_with_name;\n if (link_relation === 'hasOne' || link_relation === 'newHasOne') {\n renderFn = function renderFn(row) {\n var _row$link_with_name, _row$link_with_name2, _row$link_with_name3, _row$link_with_name4, _row$link_with_name5, _row$link_with_name6, _row$link_with_name7;\n if (!((_row$link_with_name = row[link_with_name]) !== null && _row$link_with_name !== void 0 && _row$link_with_name.url)) {\n return '';\n }\n return h(\"div\", {\n \"style\": \"display: flex;align-items: center;\"\n }, [['jpg', 'jpeg', 'png', 'gif', 'svg', 'webp', 'bmp'].indexOf((_row$link_with_name2 = row[link_with_name]) === null || _row$link_with_name2 === void 0 ? void 0 : _row$link_with_name2.extension) === -1 ? h(\"el-link\", {\n \"attrs\": {\n \"type\": \"primary\",\n \"download\": (_row$link_with_name3 = row[link_with_name]) === null || _row$link_with_name3 === void 0 ? void 0 : _row$link_with_name3.original_name\n }\n }, [(_row$link_with_name4 = row[link_with_name]) === null || _row$link_with_name4 === void 0 ? void 0 : _row$link_with_name4.original_name]) : h(\"el-image\", {\n \"attrs\": {\n \"fit\": \"contain\",\n \"src\": (_row$link_with_name5 = row[link_with_name]) === null || _row$link_with_name5 === void 0 ? void 0 : _row$link_with_name5.url,\n \"alt\": (_row$link_with_name6 = row[link_with_name]) === null || _row$link_with_name6 === void 0 ? void 0 : _row$link_with_name6.original_name,\n \"preview-src-list\": [(_row$link_with_name7 = row[link_with_name]) === null || _row$link_with_name7 === void 0 ? void 0 : _row$link_with_name7.url]\n },\n \"style\": \"max-width: 80px;max-height: 60px;\"\n }), h(\"Icon\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default()([{\n \"attrs\": {\n \"type\": \"md-cloud-download\",\n \"color\": _styles_variables_scss__WEBPACK_IMPORTED_MODULE_22__[\"primaryColor\"]\n },\n \"style\": \"margin-left: 10px;cursor: pointer;font-size: 17px;\"\n }, {\n \"on\": Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, 'click', function click(_) {\n var _row$link_with_name8;\n return down((_row$link_with_name8 = row[link_with_name]) === null || _row$link_with_name8 === void 0 ? void 0 : _row$link_with_name8.url);\n })\n }])), h(\"Icon\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default()([{\n \"attrs\": {\n \"type\": \"md-eye\",\n \"color\": _styles_variables_scss__WEBPACK_IMPORTED_MODULE_22__[\"primaryColor\"]\n },\n \"style\": \"margin-left: 4px;cursor: pointer;font-size: 17px;\"\n }, {\n \"on\": Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, 'click', function click(_) {\n var _row$link_with_name9;\n return preview((_row$link_with_name9 = row[link_with_name]) === null || _row$link_with_name9 === void 0 ? void 0 : _row$link_with_name9.url);\n })\n }]))]);\n };\n } else {\n renderFn = function renderFn(row) {\n var _row$link_with_name10;\n return h(\"div\", {\n \"style\": \"display: flex;flex-direction: column;align-items: flex-start;\"\n }, [(_row$link_with_name10 = row[link_with_name]) === null || _row$link_with_name10 === void 0 ? void 0 : _row$link_with_name10.map(function (o, oi) {\n return h(\"div\", {\n \"style\": \"display: flex;align-items: center;\"\n }, [['jpg', 'jpeg', 'png', 'gif', 'svg', 'webp', 'bmp'].indexOf(o === null || o === void 0 ? void 0 : o.extension) === -1 ? h(\"el-link\", {\n \"attrs\": {\n \"type\": \"primary\",\n \"download\": o === null || o === void 0 ? void 0 : o.original_name,\n \"href\": o === null || o === void 0 ? void 0 : o.url\n }\n }, [oi + 1, \". \", (o === null || o === void 0 ? void 0 : o.original_name) || (o === null || o === void 0 ? void 0 : o.name)]) : h(\"el-image\", {\n \"attrs\": {\n \"fit\": \"contain\",\n \"src\": o === null || o === void 0 ? void 0 : o.url,\n \"alt\": o === null || o === void 0 ? void 0 : o.original_name,\n \"preview-src-list\": [o === null || o === void 0 ? void 0 : o.url]\n },\n \"style\": \"max-width: 80px;\"\n }), h(\"Icon\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default()([{\n \"attrs\": {\n \"type\": \"md-cloud-download\",\n \"color\": _styles_variables_scss__WEBPACK_IMPORTED_MODULE_22__[\"primaryColor\"]\n },\n \"style\": \"margin-left: 10px;cursor: pointer;font-size: 17px;\"\n }, {\n \"on\": Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, 'click', function click(_) {\n return down(o === null || o === void 0 ? void 0 : o.url);\n })\n }])), h(\"Icon\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default()([{\n \"attrs\": {\n \"type\": \"md-eye\",\n \"color\": _styles_variables_scss__WEBPACK_IMPORTED_MODULE_22__[\"primaryColor\"]\n },\n \"style\": \"margin-left: 4px;cursor: pointer;font-size: 17px;\"\n }, {\n \"on\": Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, 'click', function click(_) {\n return preview(o === null || o === void 0 ? void 0 : o.url);\n })\n }]))]);\n })]);\n };\n }\n return {\n prop: field.field,\n label: field.name,\n width: field.width,\n align: \"left\",\n showOverflowTooltip: false,\n customFn: function customFn(row) {\n return renderFn(row);\n }\n };\n }\n\n //关联\n if (field._relations && Object(_Users_mac_Documents_2024_s_sz_kjsxy_web_node_modules_babel_runtime_helpers_esm_typeof_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(field._relations) === 'object') {\n var _renderFn = function _renderFn() {};\n var _field$_relations2 = field._relations,\n _link_relation = _field$_relations2.link_relation,\n _foreign_key = _field$_relations2.foreign_key,\n _link_with_name = _field$_relations2.link_with_name;\n if (_link_relation === 'hasOne' || _link_relation === 'newHasOne') {\n _renderFn = function _renderFn(row) {\n var _row$_link_with_name, _row$_link_with_name2, _row$_link_with_name3, _row$_link_with_name4, _row$_link_with_name5, _row$_link_with_name6;\n return h(\"span\", [((_row$_link_with_name = row[_link_with_name]) === null || _row$_link_with_name === void 0 ? void 0 : _row$_link_with_name.name) || ((_row$_link_with_name2 = row[_link_with_name]) === null || _row$_link_with_name2 === void 0 ? void 0 : _row$_link_with_name2.title) || ((_row$_link_with_name3 = row[_link_with_name]) === null || _row$_link_with_name3 === void 0 ? void 0 : _row$_link_with_name3.no) || ((_row$_link_with_name4 = row[_link_with_name]) === null || _row$_link_with_name4 === void 0 ? void 0 : _row$_link_with_name4.value) || ((_row$_link_with_name5 = row[_link_with_name]) === null || _row$_link_with_name5 === void 0 ? void 0 : _row$_link_with_name5.biaoti) || ((_row$_link_with_name6 = row[_link_with_name]) === null || _row$_link_with_name6 === void 0 ? void 0 : _row$_link_with_name6.mingcheng)]);\n };\n }\n if (_link_relation === 'hasMany' || _link_relation === 'newHasMany') {\n _renderFn = function _renderFn(row) {\n var _row$_link_with_name7;\n return h(\"div\", [(_row$_link_with_name7 = row[_link_with_name]) === null || _row$_link_with_name7 === void 0 ? void 0 : _row$_link_with_name7.map(function (o) {\n return h(\"p\", [(o === null || o === void 0 ? void 0 : o.name) || (o === null || o === void 0 ? void 0 : o.title) || (o === null || o === void 0 ? void 0 : o.no) || (o === null || o === void 0 ? void 0 : o.value) || (o === null || o === void 0 ? void 0 : o.biaoti) || (o === null || o === void 0 ? void 0 : o.mingcheng)]);\n })]);\n };\n }\n return {\n prop: field.field,\n label: field.name,\n width: field.width,\n customFn: function customFn(row) {\n return _renderFn(row);\n },\n fixed: field.is_fixed\n };\n }\n\n //富文本\n if (field.edit_input === 'richtext') {\n return {\n prop: field.field,\n label: field.name,\n width: field.width,\n showOverflowTooltip: false,\n customFn: function customFn(row) {\n return h(\"el-popover\", {\n \"attrs\": {\n \"placement\": \"bottom\",\n \"trigger\": \"click\",\n \"width\": row[field.field] ? 400 : 100\n }\n }, [row[field.field] ? h(\"div\", {\n \"slot\": \"default\",\n \"style\": \"width: 100%;max-height: 200px;overflow: scroll;\",\n \"domProps\": {\n \"innerHTML\": row[field.field]\n }\n }) : h(\"div\", {\n \"slot\": 'default',\n \"style\": 'text-align: center'\n }, [\"\\u6682\\u65E0\\u5185\\u5BB9\"]), h(\"el-link\", {\n \"attrs\": {\n \"type\": \"primary\"\n },\n \"slot\": \"reference\"\n }, [\"\\u67E5\\u770B\"])]);\n },\n fixed: field.is_fixed\n };\n }\n\n //select内容\n if (field._params && field._params instanceof Array) {\n return {\n prop: field.field,\n label: field.name,\n width: field.width,\n customFn: function customFn(row) {\n var _field$_params$find;\n return h(\"span\", [(_field$_params$find = field._params.find(function (param) {\n return param.value == row[field.field];\n })) === null || _field$_params$find === void 0 ? void 0 : _field$_params$find.key]);\n },\n fixed: field.is_fixed\n };\n }\n if (field.list_show === 0) {} else {\n return {\n prop: field.field,\n label: field.name,\n width: field.width,\n fixed: field.is_fixed\n };\n }\n });\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./src/utils/table.js?"); /***/ }), diff --git a/public/admin/static/js/app.js b/public/admin/static/js/app.js index 2bd4019..1fe9c3f 100644 --- a/public/admin/static/js/app.js +++ b/public/admin/static/js/app.js @@ -203,7 +203,7 @@ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "/admin_test/"; +/******/ __webpack_require__.p = "/admin/"; /******/ /******/ // on error function for async loading /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };