olp-table 7.2.103 → 7.2.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -366,7 +366,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
366
366
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
367
367
 
368
368
  "use strict";
369
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.filter.js */ \"./node_modules/core-js/modules/es.iterator.filter.js\");\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/utils/ExcelUtil */ \"./src/utils/ExcelUtil.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/AESCRUDUtils */ \"./src/utils/AESCRUDUtils.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)();\nconst message = (0,_utils_message__WEBPACK_IMPORTED_MODULE_6__.useMessage)(); // 消息弹窗\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'olDialogImport',\n inject: ['http'],\n props: {\n title: {\n default: '导入数据'\n },\n name: {\n default: '导入数据'\n },\n width: {\n default: 800\n },\n draggable: {\n default: true\n },\n center: {\n default: false\n },\n selectData: {\n default: '1'\n }\n },\n data() {\n return {\n form: {\n selectData: ''\n },\n saveParams: {},\n show: '',\n formData: {},\n gridOptions: {\n border: true,\n keepSource: true,\n showOverflow: true,\n loading: false,\n height: 330,\n align: 'left',\n scrollX: {\n enabled: true,\n gt: 15\n },\n scrollY: {\n enabled: true,\n gt: 0\n },\n columnConfig: {\n resizable: true\n },\n rowConfig: {\n isCurrent: true,\n useKey: true,\n keyField: 'id'\n },\n expandConfig: {\n labelField: 'seq'\n },\n editConfig: {\n trigger: 'click',\n mode: 'row',\n showStatus: true\n },\n checkboxConfig: {\n labelField: 'title',\n reserve: true,\n highlight: true,\n range: true,\n checkAll: false\n },\n columns: [],\n data: [],\n toolbarConfig: {},\n initColumns: [{\n type: 'checkbox',\n width: 50,\n fixed: 'left'\n }, {\n type: 'seq',\n title: '序号',\n width: 50,\n fixed: 'left'\n }]\n },\n genIdMap: undefined,\n defaultValue: undefined,\n url: '/online/crudAes/batchSave'\n };\n },\n methods: {\n customUpload(param) {\n const formData = new FormData();\n // 添加文件\n formData.append('file', param.file);\n // 使用 axios 或其他 HTTP 客户端发送请求\n this.http.upload('/online/crud/upload', formData).then(response => {\n this.onChange(response);\n }).catch(error => {\n console.error('上传失败:', error);\n });\n },\n submit() {\n if (!this.gridOptions.data || this.gridOptions.data.length == 0) return message.error('导入数据为空!');\n this.gridOptions.loading = true;\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__.request)(this.http, {\n url: this.url,\n method: 'post',\n data: this.url === '/online/crudAes/batchSave' ? (0,_utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__.encryptWithCompress)(this.getParams()) : this.gridOptions.data,\n timeout: 1000 * 90 * 90\n }, false, false).then(({\n msg,\n code,\n data\n }) => {\n if (data instanceof Array) {\n // 过滤表格数据:只保留 id 在返回成功数组里的项\n this.gridOptions.data = this.gridOptions.data.filter(item => {\n return data.includes(item.id);\n });\n message.warning(msg);\n } else if (code == 200) {\n this.show = false;\n this.$emit('emits', {\n m: 'query'\n });\n message.success(msg);\n } else {\n message.error(msg);\n }\n }).finally(() => {\n this.gridOptions.loading = false;\n });\n },\n open({\n column,\n saveParams,\n json,\n defaultValue\n }) {\n if (json) {\n if (json.genIdMap) {\n this.genIdMap = json.genIdMap;\n }\n if (json.url) {\n this.url = json.url;\n }\n }\n this.defaultValue = defaultValue;\n this.saveParams = saveParams;\n this.show = true;\n let columns = column.filter(o => o.visible == 1 && o.importToOtherProp != 1);\n columns.push(...this.gridOptions.initColumns);\n this.gridOptions.columns = columns;\n this.$refs.xGrid.loadColumn(this.gridOptions.columns);\n },\n handleChange(value) {\n // 1. 获取选中的选项对象\n const selectedItem = this.gridOptions.columns.find(o => o.field && o.field === value);\n if (selectedItem) {\n let que = [];\n for (let j = 0; j < this.gridOptions.data.length; j++) {\n let data = this.gridOptions.data[j];\n if (!data || !data[value]) {\n return message.warning(selectedItem.title + '数据为空!');\n }\n if (j == 0) {\n que.push(data[value]);\n continue;\n }\n let index = que.indexOf(data[value]);\n if (index != -1) {\n if (this.$refs.xGrid) {\n // 获取重复行的索引\n this.$refs.xGrid.scrollToRow(data); // 滚动到对应行\n this.$refs.xGrid.setCurrentRow(data); // 高亮\n // this.$refs.xGrid.toggleCheckboxRow(data); // 选中\n }\n return message.warning('第' + (j + 1) + '行-第' + (index + 1) + '行数据不唯-:' + data[value]);\n }\n que.push(data[value]);\n }\n message.success(selectedItem.title + '无重复数据!');\n }\n },\n selectRowChange() {\n this.formData.disabled = this.$refs.xGrid.getCheckboxRecords(true).length == 0;\n this.formData.selected_but = this.formData.disabled ? 'unselected_but' : 'selected_but';\n },\n batchRemove() {\n let records = this.$refs.xGrid.getCheckboxRecords(true);\n if (!records || records.length == 0) return message.error('未选中数据!');\n this.$refs.xGrid.removeCheckboxRow();\n const selectedIds = records.map(row => row.id);\n\n // 过滤掉已删除的行,更新数据源\n this.gridOptions.data = this.gridOptions.data.filter(item => !selectedIds.includes(item.id));\n this.formData.uniCode = '';\n this.selectRowChange();\n },\n getParams() {\n return {\n ...this.saveParams,\n genIdMap: this.genIdMap,\n columnAndValueListMap: this.getDataByDict(this.gridOptions.data)\n };\n },\n onChange({\n data\n }) {\n data = this.getDataByTitle(data);\n this.setDefaultValue(data);\n this.gridOptions.data = data;\n },\n setDefaultValue(data) {\n if (this.defaultValue) {\n for (let key of Object.keys(this.defaultValue)) {\n for (let datum of data) {\n datum[key] = this.defaultValue[key];\n }\n }\n }\n },\n getDataByTitle(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.title == key) {\n obj[item.field] = row[key];\n }\n });\n }\n rows.push(obj);\n });\n return rows;\n }\n },\n getDataByDict(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.field == key && item.tableSaveToOtherProp != 1) {\n obj[item.field] = this.getRowValue(item.dictCode, row[key]);\n }\n });\n }\n rows.push(obj);\n });\n this.setDefaultValue(rows);\n return rows;\n }\n },\n download() {\n (0,_utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__.exportExcel)({\n data: [],\n name: '模板下载',\n columns: this.gridOptions.columns.filter(o => o.field),\n option: {\n align: 'center'\n }\n });\n },\n getRowValue(dictCode, val) {\n if (dictCode) {\n return this.getDictValueByCode(dictCode, val);\n }\n return val;\n },\n getDictValueByCode(dictCode, val) {\n for (const option of dict.val(dictCode)) {\n if (option.label == val) {\n return option;\n }\n }\n return val;\n },\n close() {\n this.$emit('emits', {});\n this.show = false;\n }\n },\n created() {\n this.formData = {\n action: this.http.axios().defaults.baseURL + '/online/crud/upload',\n uniCode: '',\n headers: this.http.axios().defaults.headers,\n disabled: true,\n selected_but: 'unselected_but'\n };\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/components/ol-dialog-import.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
369
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.filter.js */ \"./node_modules/core-js/modules/es.iterator.filter.js\");\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/utils/ExcelUtil */ \"./src/utils/ExcelUtil.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/AESCRUDUtils */ \"./src/utils/AESCRUDUtils.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)();\nconst message = (0,_utils_message__WEBPACK_IMPORTED_MODULE_6__.useMessage)(); // 消息弹窗\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'olDialogImport',\n inject: ['http'],\n props: {\n title: {\n default: '导入数据'\n },\n name: {\n default: '导入数据'\n },\n width: {\n default: 800\n },\n draggable: {\n default: true\n },\n center: {\n default: false\n },\n selectData: {\n default: '1'\n }\n },\n data() {\n return {\n form: {\n selectData: ''\n },\n saveParams: {},\n show: '',\n formData: {},\n gridOptions: {\n border: true,\n keepSource: true,\n showOverflow: true,\n loading: false,\n height: 330,\n align: 'left',\n scrollX: {\n enabled: true,\n gt: 15\n },\n scrollY: {\n enabled: true,\n gt: 0\n },\n columnConfig: {\n resizable: true\n },\n rowConfig: {\n isCurrent: true,\n useKey: true,\n keyField: 'id'\n },\n expandConfig: {\n labelField: 'seq'\n },\n editConfig: {\n trigger: 'click',\n mode: 'row',\n showStatus: true\n },\n checkboxConfig: {\n labelField: 'title',\n reserve: true,\n highlight: true,\n range: true,\n checkAll: false\n },\n columns: [],\n data: [],\n toolbarConfig: {},\n initColumns: [{\n type: 'checkbox',\n width: 50,\n fixed: 'left'\n }, {\n type: 'seq',\n title: '序号',\n width: 50,\n fixed: 'left'\n }]\n },\n genIdMap: undefined,\n defaultValue: undefined,\n url: '/online/crudAes/batchSave'\n };\n },\n methods: {\n customUpload(param) {\n const formData = new FormData();\n // 添加文件\n formData.append('file', param.file);\n // 使用 axios 或其他 HTTP 客户端发送请求\n this.http.upload('/online/crud/upload', formData).then(response => {\n this.onChange(response);\n }).catch(error => {\n console.error('上传失败:', error);\n });\n },\n submit() {\n if (!this.gridOptions.data || this.gridOptions.data.length == 0) return message.error('导入数据为空!');\n this.gridOptions.loading = true;\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__.request)(this.http, {\n url: this.url,\n method: 'post',\n data: this.url === '/online/crudAes/batchSave' ? (0,_utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__.encryptWithCompress)(this.getParams()) : this.gridOptions.data,\n timeout: 1000 * 90 * 90\n }, false, false).then(({\n msg,\n code,\n data\n }) => {\n if (data instanceof Array) {\n // 过滤表格数据:只保留 id 在返回成功数组里的项\n this.gridOptions.data = this.gridOptions.data.filter(item => {\n return data.includes(item.id);\n });\n message.warning(msg);\n } else if (code == 200 || code == 0) {\n this.show = false;\n this.$emit('emits', {\n m: 'query'\n });\n message.success(msg);\n } else {\n message.error(msg);\n }\n }).finally(() => {\n this.gridOptions.loading = false;\n });\n },\n open({\n column,\n saveParams,\n json,\n defaultValue\n }) {\n if (json) {\n if (json.genIdMap) {\n this.genIdMap = json.genIdMap;\n }\n if (json.url) {\n this.url = json.url;\n }\n }\n this.defaultValue = defaultValue;\n this.saveParams = saveParams;\n this.show = true;\n let columns = column.filter(o => o.visible == 1 && o.importToOtherProp != 1);\n columns.push(...this.gridOptions.initColumns);\n this.gridOptions.columns = columns;\n this.$refs.xGrid.loadColumn(this.gridOptions.columns);\n },\n handleChange(value) {\n // 1. 获取选中的选项对象\n const selectedItem = this.gridOptions.columns.find(o => o.field && o.field === value);\n if (selectedItem) {\n let que = [];\n for (let j = 0; j < this.gridOptions.data.length; j++) {\n let data = this.gridOptions.data[j];\n if (!data || !data[value]) {\n return message.warning(selectedItem.title + '数据为空!');\n }\n if (j == 0) {\n que.push(data[value]);\n continue;\n }\n let index = que.indexOf(data[value]);\n if (index != -1) {\n if (this.$refs.xGrid) {\n // 获取重复行的索引\n this.$refs.xGrid.scrollToRow(data); // 滚动到对应行\n this.$refs.xGrid.setCurrentRow(data); // 高亮\n // this.$refs.xGrid.toggleCheckboxRow(data); // 选中\n }\n return message.warning('第' + (j + 1) + '行-第' + (index + 1) + '行数据不唯-:' + data[value]);\n }\n que.push(data[value]);\n }\n message.success(selectedItem.title + '无重复数据!');\n }\n },\n selectRowChange() {\n this.formData.disabled = this.$refs.xGrid.getCheckboxRecords(true).length == 0;\n this.formData.selected_but = this.formData.disabled ? 'unselected_but' : 'selected_but';\n },\n batchRemove() {\n let records = this.$refs.xGrid.getCheckboxRecords(true);\n if (!records || records.length == 0) return message.error('未选中数据!');\n this.$refs.xGrid.removeCheckboxRow();\n const selectedIds = records.map(row => row.id);\n\n // 过滤掉已删除的行,更新数据源\n this.gridOptions.data = this.gridOptions.data.filter(item => !selectedIds.includes(item.id));\n this.formData.uniCode = '';\n this.selectRowChange();\n },\n getParams() {\n return {\n ...this.saveParams,\n genIdMap: this.genIdMap,\n columnAndValueListMap: this.getDataByDict(this.gridOptions.data)\n };\n },\n onChange({\n data\n }) {\n data = this.getDataByTitle(data);\n this.setDefaultValue(data);\n this.gridOptions.data = data;\n },\n setDefaultValue(data) {\n if (this.defaultValue) {\n for (let key of Object.keys(this.defaultValue)) {\n for (let datum of data) {\n datum[key] = this.defaultValue[key];\n }\n }\n }\n },\n getDataByTitle(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.title == key) {\n obj[item.field] = row[key];\n }\n });\n }\n rows.push(obj);\n });\n return rows;\n }\n },\n getDataByDict(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.field == key && item.tableSaveToOtherProp != 1) {\n obj[item.field] = this.getRowValue(item.dictCode, row[key]);\n }\n });\n }\n rows.push(obj);\n });\n this.setDefaultValue(rows);\n return rows;\n }\n },\n download() {\n (0,_utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__.exportExcel)({\n data: [],\n name: '模板下载',\n columns: this.gridOptions.columns.filter(o => o.field),\n option: {\n align: 'center'\n }\n });\n },\n getRowValue(dictCode, val) {\n if (dictCode) {\n return this.getDictValueByCode(dictCode, val);\n }\n return val;\n },\n getDictValueByCode(dictCode, val) {\n for (const option of dict.val(dictCode)) {\n if (option.label == val) {\n return option;\n }\n }\n return val;\n },\n close() {\n this.$emit('emits', {});\n this.show = false;\n }\n },\n created() {\n this.formData = {\n action: this.http.axios().defaults.baseURL + '/online/crud/upload',\n uniCode: '',\n headers: this.http.axios().defaults.headers,\n disabled: true,\n selected_but: 'unselected_but'\n };\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/components/ol-dialog-import.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
370
370
 
371
371
  /***/ }),
372
372
 
package/olp-table.umd.js CHANGED
@@ -366,7 +366,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
366
366
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
367
367
 
368
368
  "use strict";
369
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.filter.js */ \"./node_modules/core-js/modules/es.iterator.filter.js\");\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/utils/ExcelUtil */ \"./src/utils/ExcelUtil.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/AESCRUDUtils */ \"./src/utils/AESCRUDUtils.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)();\nconst message = (0,_utils_message__WEBPACK_IMPORTED_MODULE_6__.useMessage)(); // 消息弹窗\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'olDialogImport',\n inject: ['http'],\n props: {\n title: {\n default: '导入数据'\n },\n name: {\n default: '导入数据'\n },\n width: {\n default: 800\n },\n draggable: {\n default: true\n },\n center: {\n default: false\n },\n selectData: {\n default: '1'\n }\n },\n data() {\n return {\n form: {\n selectData: ''\n },\n saveParams: {},\n show: '',\n formData: {},\n gridOptions: {\n border: true,\n keepSource: true,\n showOverflow: true,\n loading: false,\n height: 330,\n align: 'left',\n scrollX: {\n enabled: true,\n gt: 15\n },\n scrollY: {\n enabled: true,\n gt: 0\n },\n columnConfig: {\n resizable: true\n },\n rowConfig: {\n isCurrent: true,\n useKey: true,\n keyField: 'id'\n },\n expandConfig: {\n labelField: 'seq'\n },\n editConfig: {\n trigger: 'click',\n mode: 'row',\n showStatus: true\n },\n checkboxConfig: {\n labelField: 'title',\n reserve: true,\n highlight: true,\n range: true,\n checkAll: false\n },\n columns: [],\n data: [],\n toolbarConfig: {},\n initColumns: [{\n type: 'checkbox',\n width: 50,\n fixed: 'left'\n }, {\n type: 'seq',\n title: '序号',\n width: 50,\n fixed: 'left'\n }]\n },\n genIdMap: undefined,\n defaultValue: undefined,\n url: '/online/crudAes/batchSave'\n };\n },\n methods: {\n customUpload(param) {\n const formData = new FormData();\n // 添加文件\n formData.append('file', param.file);\n // 使用 axios 或其他 HTTP 客户端发送请求\n this.http.upload('/online/crud/upload', formData).then(response => {\n this.onChange(response);\n }).catch(error => {\n console.error('上传失败:', error);\n });\n },\n submit() {\n if (!this.gridOptions.data || this.gridOptions.data.length == 0) return message.error('导入数据为空!');\n this.gridOptions.loading = true;\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__.request)(this.http, {\n url: this.url,\n method: 'post',\n data: this.url === '/online/crudAes/batchSave' ? (0,_utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__.encryptWithCompress)(this.getParams()) : this.gridOptions.data,\n timeout: 1000 * 90 * 90\n }, false, false).then(({\n msg,\n code,\n data\n }) => {\n if (data instanceof Array) {\n // 过滤表格数据:只保留 id 在返回成功数组里的项\n this.gridOptions.data = this.gridOptions.data.filter(item => {\n return data.includes(item.id);\n });\n message.warning(msg);\n } else if (code == 200) {\n this.show = false;\n this.$emit('emits', {\n m: 'query'\n });\n message.success(msg);\n } else {\n message.error(msg);\n }\n }).finally(() => {\n this.gridOptions.loading = false;\n });\n },\n open({\n column,\n saveParams,\n json,\n defaultValue\n }) {\n if (json) {\n if (json.genIdMap) {\n this.genIdMap = json.genIdMap;\n }\n if (json.url) {\n this.url = json.url;\n }\n }\n this.defaultValue = defaultValue;\n this.saveParams = saveParams;\n this.show = true;\n let columns = column.filter(o => o.visible == 1 && o.importToOtherProp != 1);\n columns.push(...this.gridOptions.initColumns);\n this.gridOptions.columns = columns;\n this.$refs.xGrid.loadColumn(this.gridOptions.columns);\n },\n handleChange(value) {\n // 1. 获取选中的选项对象\n const selectedItem = this.gridOptions.columns.find(o => o.field && o.field === value);\n if (selectedItem) {\n let que = [];\n for (let j = 0; j < this.gridOptions.data.length; j++) {\n let data = this.gridOptions.data[j];\n if (!data || !data[value]) {\n return message.warning(selectedItem.title + '数据为空!');\n }\n if (j == 0) {\n que.push(data[value]);\n continue;\n }\n let index = que.indexOf(data[value]);\n if (index != -1) {\n if (this.$refs.xGrid) {\n // 获取重复行的索引\n this.$refs.xGrid.scrollToRow(data); // 滚动到对应行\n this.$refs.xGrid.setCurrentRow(data); // 高亮\n // this.$refs.xGrid.toggleCheckboxRow(data); // 选中\n }\n return message.warning('第' + (j + 1) + '行-第' + (index + 1) + '行数据不唯-:' + data[value]);\n }\n que.push(data[value]);\n }\n message.success(selectedItem.title + '无重复数据!');\n }\n },\n selectRowChange() {\n this.formData.disabled = this.$refs.xGrid.getCheckboxRecords(true).length == 0;\n this.formData.selected_but = this.formData.disabled ? 'unselected_but' : 'selected_but';\n },\n batchRemove() {\n let records = this.$refs.xGrid.getCheckboxRecords(true);\n if (!records || records.length == 0) return message.error('未选中数据!');\n this.$refs.xGrid.removeCheckboxRow();\n const selectedIds = records.map(row => row.id);\n\n // 过滤掉已删除的行,更新数据源\n this.gridOptions.data = this.gridOptions.data.filter(item => !selectedIds.includes(item.id));\n this.formData.uniCode = '';\n this.selectRowChange();\n },\n getParams() {\n return {\n ...this.saveParams,\n genIdMap: this.genIdMap,\n columnAndValueListMap: this.getDataByDict(this.gridOptions.data)\n };\n },\n onChange({\n data\n }) {\n data = this.getDataByTitle(data);\n this.setDefaultValue(data);\n this.gridOptions.data = data;\n },\n setDefaultValue(data) {\n if (this.defaultValue) {\n for (let key of Object.keys(this.defaultValue)) {\n for (let datum of data) {\n datum[key] = this.defaultValue[key];\n }\n }\n }\n },\n getDataByTitle(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.title == key) {\n obj[item.field] = row[key];\n }\n });\n }\n rows.push(obj);\n });\n return rows;\n }\n },\n getDataByDict(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.field == key && item.tableSaveToOtherProp != 1) {\n obj[item.field] = this.getRowValue(item.dictCode, row[key]);\n }\n });\n }\n rows.push(obj);\n });\n this.setDefaultValue(rows);\n return rows;\n }\n },\n download() {\n (0,_utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__.exportExcel)({\n data: [],\n name: '模板下载',\n columns: this.gridOptions.columns.filter(o => o.field),\n option: {\n align: 'center'\n }\n });\n },\n getRowValue(dictCode, val) {\n if (dictCode) {\n return this.getDictValueByCode(dictCode, val);\n }\n return val;\n },\n getDictValueByCode(dictCode, val) {\n for (const option of dict.val(dictCode)) {\n if (option.label == val) {\n return option;\n }\n }\n return val;\n },\n close() {\n this.$emit('emits', {});\n this.show = false;\n }\n },\n created() {\n this.formData = {\n action: this.http.axios().defaults.baseURL + '/online/crud/upload',\n uniCode: '',\n headers: this.http.axios().defaults.headers,\n disabled: true,\n selected_but: 'unselected_but'\n };\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/components/ol-dialog-import.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
369
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.filter.js */ \"./node_modules/core-js/modules/es.iterator.filter.js\");\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/utils/ExcelUtil */ \"./src/utils/ExcelUtil.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/AESCRUDUtils */ \"./src/utils/AESCRUDUtils.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)();\nconst message = (0,_utils_message__WEBPACK_IMPORTED_MODULE_6__.useMessage)(); // 消息弹窗\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'olDialogImport',\n inject: ['http'],\n props: {\n title: {\n default: '导入数据'\n },\n name: {\n default: '导入数据'\n },\n width: {\n default: 800\n },\n draggable: {\n default: true\n },\n center: {\n default: false\n },\n selectData: {\n default: '1'\n }\n },\n data() {\n return {\n form: {\n selectData: ''\n },\n saveParams: {},\n show: '',\n formData: {},\n gridOptions: {\n border: true,\n keepSource: true,\n showOverflow: true,\n loading: false,\n height: 330,\n align: 'left',\n scrollX: {\n enabled: true,\n gt: 15\n },\n scrollY: {\n enabled: true,\n gt: 0\n },\n columnConfig: {\n resizable: true\n },\n rowConfig: {\n isCurrent: true,\n useKey: true,\n keyField: 'id'\n },\n expandConfig: {\n labelField: 'seq'\n },\n editConfig: {\n trigger: 'click',\n mode: 'row',\n showStatus: true\n },\n checkboxConfig: {\n labelField: 'title',\n reserve: true,\n highlight: true,\n range: true,\n checkAll: false\n },\n columns: [],\n data: [],\n toolbarConfig: {},\n initColumns: [{\n type: 'checkbox',\n width: 50,\n fixed: 'left'\n }, {\n type: 'seq',\n title: '序号',\n width: 50,\n fixed: 'left'\n }]\n },\n genIdMap: undefined,\n defaultValue: undefined,\n url: '/online/crudAes/batchSave'\n };\n },\n methods: {\n customUpload(param) {\n const formData = new FormData();\n // 添加文件\n formData.append('file', param.file);\n // 使用 axios 或其他 HTTP 客户端发送请求\n this.http.upload('/online/crud/upload', formData).then(response => {\n this.onChange(response);\n }).catch(error => {\n console.error('上传失败:', error);\n });\n },\n submit() {\n if (!this.gridOptions.data || this.gridOptions.data.length == 0) return message.error('导入数据为空!');\n this.gridOptions.loading = true;\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__.request)(this.http, {\n url: this.url,\n method: 'post',\n data: this.url === '/online/crudAes/batchSave' ? (0,_utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__.encryptWithCompress)(this.getParams()) : this.gridOptions.data,\n timeout: 1000 * 90 * 90\n }, false, false).then(({\n msg,\n code,\n data\n }) => {\n if (data instanceof Array) {\n // 过滤表格数据:只保留 id 在返回成功数组里的项\n this.gridOptions.data = this.gridOptions.data.filter(item => {\n return data.includes(item.id);\n });\n message.warning(msg);\n } else if (code == 200 || code == 0) {\n this.show = false;\n this.$emit('emits', {\n m: 'query'\n });\n message.success(msg);\n } else {\n message.error(msg);\n }\n }).finally(() => {\n this.gridOptions.loading = false;\n });\n },\n open({\n column,\n saveParams,\n json,\n defaultValue\n }) {\n if (json) {\n if (json.genIdMap) {\n this.genIdMap = json.genIdMap;\n }\n if (json.url) {\n this.url = json.url;\n }\n }\n this.defaultValue = defaultValue;\n this.saveParams = saveParams;\n this.show = true;\n let columns = column.filter(o => o.visible == 1 && o.importToOtherProp != 1);\n columns.push(...this.gridOptions.initColumns);\n this.gridOptions.columns = columns;\n this.$refs.xGrid.loadColumn(this.gridOptions.columns);\n },\n handleChange(value) {\n // 1. 获取选中的选项对象\n const selectedItem = this.gridOptions.columns.find(o => o.field && o.field === value);\n if (selectedItem) {\n let que = [];\n for (let j = 0; j < this.gridOptions.data.length; j++) {\n let data = this.gridOptions.data[j];\n if (!data || !data[value]) {\n return message.warning(selectedItem.title + '数据为空!');\n }\n if (j == 0) {\n que.push(data[value]);\n continue;\n }\n let index = que.indexOf(data[value]);\n if (index != -1) {\n if (this.$refs.xGrid) {\n // 获取重复行的索引\n this.$refs.xGrid.scrollToRow(data); // 滚动到对应行\n this.$refs.xGrid.setCurrentRow(data); // 高亮\n // this.$refs.xGrid.toggleCheckboxRow(data); // 选中\n }\n return message.warning('第' + (j + 1) + '行-第' + (index + 1) + '行数据不唯-:' + data[value]);\n }\n que.push(data[value]);\n }\n message.success(selectedItem.title + '无重复数据!');\n }\n },\n selectRowChange() {\n this.formData.disabled = this.$refs.xGrid.getCheckboxRecords(true).length == 0;\n this.formData.selected_but = this.formData.disabled ? 'unselected_but' : 'selected_but';\n },\n batchRemove() {\n let records = this.$refs.xGrid.getCheckboxRecords(true);\n if (!records || records.length == 0) return message.error('未选中数据!');\n this.$refs.xGrid.removeCheckboxRow();\n const selectedIds = records.map(row => row.id);\n\n // 过滤掉已删除的行,更新数据源\n this.gridOptions.data = this.gridOptions.data.filter(item => !selectedIds.includes(item.id));\n this.formData.uniCode = '';\n this.selectRowChange();\n },\n getParams() {\n return {\n ...this.saveParams,\n genIdMap: this.genIdMap,\n columnAndValueListMap: this.getDataByDict(this.gridOptions.data)\n };\n },\n onChange({\n data\n }) {\n data = this.getDataByTitle(data);\n this.setDefaultValue(data);\n this.gridOptions.data = data;\n },\n setDefaultValue(data) {\n if (this.defaultValue) {\n for (let key of Object.keys(this.defaultValue)) {\n for (let datum of data) {\n datum[key] = this.defaultValue[key];\n }\n }\n }\n },\n getDataByTitle(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.title == key) {\n obj[item.field] = row[key];\n }\n });\n }\n rows.push(obj);\n });\n return rows;\n }\n },\n getDataByDict(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.field == key && item.tableSaveToOtherProp != 1) {\n obj[item.field] = this.getRowValue(item.dictCode, row[key]);\n }\n });\n }\n rows.push(obj);\n });\n this.setDefaultValue(rows);\n return rows;\n }\n },\n download() {\n (0,_utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__.exportExcel)({\n data: [],\n name: '模板下载',\n columns: this.gridOptions.columns.filter(o => o.field),\n option: {\n align: 'center'\n }\n });\n },\n getRowValue(dictCode, val) {\n if (dictCode) {\n return this.getDictValueByCode(dictCode, val);\n }\n return val;\n },\n getDictValueByCode(dictCode, val) {\n for (const option of dict.val(dictCode)) {\n if (option.label == val) {\n return option;\n }\n }\n return val;\n },\n close() {\n this.$emit('emits', {});\n this.show = false;\n }\n },\n created() {\n this.formData = {\n action: this.http.axios().defaults.baseURL + '/online/crud/upload',\n uniCode: '',\n headers: this.http.axios().defaults.headers,\n disabled: true,\n selected_but: 'unselected_but'\n };\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/components/ol-dialog-import.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
370
370
 
371
371
  /***/ }),
372
372
 
@@ -366,7 +366,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core
366
366
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
367
367
 
368
368
  "use strict";
369
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.filter.js */ \"./node_modules/core-js/modules/es.iterator.filter.js\");\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/utils/ExcelUtil */ \"./src/utils/ExcelUtil.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/AESCRUDUtils */ \"./src/utils/AESCRUDUtils.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)();\nconst message = (0,_utils_message__WEBPACK_IMPORTED_MODULE_6__.useMessage)(); // 消息弹窗\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'olDialogImport',\n inject: ['http'],\n props: {\n title: {\n default: '导入数据'\n },\n name: {\n default: '导入数据'\n },\n width: {\n default: 800\n },\n draggable: {\n default: true\n },\n center: {\n default: false\n },\n selectData: {\n default: '1'\n }\n },\n data() {\n return {\n form: {\n selectData: ''\n },\n saveParams: {},\n show: '',\n formData: {},\n gridOptions: {\n border: true,\n keepSource: true,\n showOverflow: true,\n loading: false,\n height: 330,\n align: 'left',\n scrollX: {\n enabled: true,\n gt: 15\n },\n scrollY: {\n enabled: true,\n gt: 0\n },\n columnConfig: {\n resizable: true\n },\n rowConfig: {\n isCurrent: true,\n useKey: true,\n keyField: 'id'\n },\n expandConfig: {\n labelField: 'seq'\n },\n editConfig: {\n trigger: 'click',\n mode: 'row',\n showStatus: true\n },\n checkboxConfig: {\n labelField: 'title',\n reserve: true,\n highlight: true,\n range: true,\n checkAll: false\n },\n columns: [],\n data: [],\n toolbarConfig: {},\n initColumns: [{\n type: 'checkbox',\n width: 50,\n fixed: 'left'\n }, {\n type: 'seq',\n title: '序号',\n width: 50,\n fixed: 'left'\n }]\n },\n genIdMap: undefined,\n defaultValue: undefined,\n url: '/online/crudAes/batchSave'\n };\n },\n methods: {\n customUpload(param) {\n const formData = new FormData();\n // 添加文件\n formData.append('file', param.file);\n // 使用 axios 或其他 HTTP 客户端发送请求\n this.http.upload('/online/crud/upload', formData).then(response => {\n this.onChange(response);\n }).catch(error => {\n console.error('上传失败:', error);\n });\n },\n submit() {\n if (!this.gridOptions.data || this.gridOptions.data.length == 0) return message.error('导入数据为空!');\n this.gridOptions.loading = true;\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__.request)(this.http, {\n url: this.url,\n method: 'post',\n data: this.url === '/online/crudAes/batchSave' ? (0,_utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__.encryptWithCompress)(this.getParams()) : this.gridOptions.data,\n timeout: 1000 * 90 * 90\n }, false, false).then(({\n msg,\n code,\n data\n }) => {\n if (data instanceof Array) {\n // 过滤表格数据:只保留 id 在返回成功数组里的项\n this.gridOptions.data = this.gridOptions.data.filter(item => {\n return data.includes(item.id);\n });\n message.warning(msg);\n } else if (code == 200) {\n this.show = false;\n this.$emit('emits', {\n m: 'query'\n });\n message.success(msg);\n } else {\n message.error(msg);\n }\n }).finally(() => {\n this.gridOptions.loading = false;\n });\n },\n open({\n column,\n saveParams,\n json,\n defaultValue\n }) {\n if (json) {\n if (json.genIdMap) {\n this.genIdMap = json.genIdMap;\n }\n if (json.url) {\n this.url = json.url;\n }\n }\n this.defaultValue = defaultValue;\n this.saveParams = saveParams;\n this.show = true;\n let columns = column.filter(o => o.visible == 1 && o.importToOtherProp != 1);\n columns.push(...this.gridOptions.initColumns);\n this.gridOptions.columns = columns;\n this.$refs.xGrid.loadColumn(this.gridOptions.columns);\n },\n handleChange(value) {\n // 1. 获取选中的选项对象\n const selectedItem = this.gridOptions.columns.find(o => o.field && o.field === value);\n if (selectedItem) {\n let que = [];\n for (let j = 0; j < this.gridOptions.data.length; j++) {\n let data = this.gridOptions.data[j];\n if (!data || !data[value]) {\n return message.warning(selectedItem.title + '数据为空!');\n }\n if (j == 0) {\n que.push(data[value]);\n continue;\n }\n let index = que.indexOf(data[value]);\n if (index != -1) {\n if (this.$refs.xGrid) {\n // 获取重复行的索引\n this.$refs.xGrid.scrollToRow(data); // 滚动到对应行\n this.$refs.xGrid.setCurrentRow(data); // 高亮\n // this.$refs.xGrid.toggleCheckboxRow(data); // 选中\n }\n return message.warning('第' + (j + 1) + '行-第' + (index + 1) + '行数据不唯-:' + data[value]);\n }\n que.push(data[value]);\n }\n message.success(selectedItem.title + '无重复数据!');\n }\n },\n selectRowChange() {\n this.formData.disabled = this.$refs.xGrid.getCheckboxRecords(true).length == 0;\n this.formData.selected_but = this.formData.disabled ? 'unselected_but' : 'selected_but';\n },\n batchRemove() {\n let records = this.$refs.xGrid.getCheckboxRecords(true);\n if (!records || records.length == 0) return message.error('未选中数据!');\n this.$refs.xGrid.removeCheckboxRow();\n const selectedIds = records.map(row => row.id);\n\n // 过滤掉已删除的行,更新数据源\n this.gridOptions.data = this.gridOptions.data.filter(item => !selectedIds.includes(item.id));\n this.formData.uniCode = '';\n this.selectRowChange();\n },\n getParams() {\n return {\n ...this.saveParams,\n genIdMap: this.genIdMap,\n columnAndValueListMap: this.getDataByDict(this.gridOptions.data)\n };\n },\n onChange({\n data\n }) {\n data = this.getDataByTitle(data);\n this.setDefaultValue(data);\n this.gridOptions.data = data;\n },\n setDefaultValue(data) {\n if (this.defaultValue) {\n for (let key of Object.keys(this.defaultValue)) {\n for (let datum of data) {\n datum[key] = this.defaultValue[key];\n }\n }\n }\n },\n getDataByTitle(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.title == key) {\n obj[item.field] = row[key];\n }\n });\n }\n rows.push(obj);\n });\n return rows;\n }\n },\n getDataByDict(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.field == key && item.tableSaveToOtherProp != 1) {\n obj[item.field] = this.getRowValue(item.dictCode, row[key]);\n }\n });\n }\n rows.push(obj);\n });\n this.setDefaultValue(rows);\n return rows;\n }\n },\n download() {\n (0,_utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__.exportExcel)({\n data: [],\n name: '模板下载',\n columns: this.gridOptions.columns.filter(o => o.field),\n option: {\n align: 'center'\n }\n });\n },\n getRowValue(dictCode, val) {\n if (dictCode) {\n return this.getDictValueByCode(dictCode, val);\n }\n return val;\n },\n getDictValueByCode(dictCode, val) {\n for (const option of dict.val(dictCode)) {\n if (option.label == val) {\n return option;\n }\n }\n return val;\n },\n close() {\n this.$emit('emits', {});\n this.show = false;\n }\n },\n created() {\n this.formData = {\n action: this.http.axios().defaults.baseURL + '/online/crud/upload',\n uniCode: '',\n headers: this.http.axios().defaults.headers,\n disabled: true,\n selected_but: 'unselected_but'\n };\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/components/ol-dialog-import.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-124.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
369
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.iterator.constructor.js */ \"./node_modules/core-js/modules/es.iterator.constructor.js\");\n/* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.iterator.filter.js */ \"./node_modules/core-js/modules/es.iterator.filter.js\");\n/* harmony import */ var core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_filter_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.iterator.find.js */ \"./node_modules/core-js/modules/es.iterator.find.js\");\n/* harmony import */ var core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_find_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.iterator.for-each.js */ \"./node_modules/core-js/modules/es.iterator.for-each.js\");\n/* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.iterator.map.js */ \"./node_modules/core-js/modules/es.iterator.map.js\");\n/* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_message__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/message */ \"./src/utils/message.js\");\n/* harmony import */ var _utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/http/httpUtils */ \"./src/utils/http/httpUtils.js\");\n/* harmony import */ var _utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/utils/ExcelUtil */ \"./src/utils/ExcelUtil.js\");\n/* harmony import */ var _store_dict__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/store/dict */ \"./src/store/dict.js\");\n/* harmony import */ var _utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/utils/AESCRUDUtils */ \"./src/utils/AESCRUDUtils.js\");\n\n\n\n\n\n\n\n\n\n\n\nconst dict = (0,_store_dict__WEBPACK_IMPORTED_MODULE_9__.storeDict)();\nconst message = (0,_utils_message__WEBPACK_IMPORTED_MODULE_6__.useMessage)(); // 消息弹窗\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'olDialogImport',\n inject: ['http'],\n props: {\n title: {\n default: '导入数据'\n },\n name: {\n default: '导入数据'\n },\n width: {\n default: 800\n },\n draggable: {\n default: true\n },\n center: {\n default: false\n },\n selectData: {\n default: '1'\n }\n },\n data() {\n return {\n form: {\n selectData: ''\n },\n saveParams: {},\n show: '',\n formData: {},\n gridOptions: {\n border: true,\n keepSource: true,\n showOverflow: true,\n loading: false,\n height: 330,\n align: 'left',\n scrollX: {\n enabled: true,\n gt: 15\n },\n scrollY: {\n enabled: true,\n gt: 0\n },\n columnConfig: {\n resizable: true\n },\n rowConfig: {\n isCurrent: true,\n useKey: true,\n keyField: 'id'\n },\n expandConfig: {\n labelField: 'seq'\n },\n editConfig: {\n trigger: 'click',\n mode: 'row',\n showStatus: true\n },\n checkboxConfig: {\n labelField: 'title',\n reserve: true,\n highlight: true,\n range: true,\n checkAll: false\n },\n columns: [],\n data: [],\n toolbarConfig: {},\n initColumns: [{\n type: 'checkbox',\n width: 50,\n fixed: 'left'\n }, {\n type: 'seq',\n title: '序号',\n width: 50,\n fixed: 'left'\n }]\n },\n genIdMap: undefined,\n defaultValue: undefined,\n url: '/online/crudAes/batchSave'\n };\n },\n methods: {\n customUpload(param) {\n const formData = new FormData();\n // 添加文件\n formData.append('file', param.file);\n // 使用 axios 或其他 HTTP 客户端发送请求\n this.http.upload('/online/crud/upload', formData).then(response => {\n this.onChange(response);\n }).catch(error => {\n console.error('上传失败:', error);\n });\n },\n submit() {\n if (!this.gridOptions.data || this.gridOptions.data.length == 0) return message.error('导入数据为空!');\n this.gridOptions.loading = true;\n (0,_utils_http_httpUtils__WEBPACK_IMPORTED_MODULE_7__.request)(this.http, {\n url: this.url,\n method: 'post',\n data: this.url === '/online/crudAes/batchSave' ? (0,_utils_AESCRUDUtils__WEBPACK_IMPORTED_MODULE_10__.encryptWithCompress)(this.getParams()) : this.gridOptions.data,\n timeout: 1000 * 90 * 90\n }, false, false).then(({\n msg,\n code,\n data\n }) => {\n if (data instanceof Array) {\n // 过滤表格数据:只保留 id 在返回成功数组里的项\n this.gridOptions.data = this.gridOptions.data.filter(item => {\n return data.includes(item.id);\n });\n message.warning(msg);\n } else if (code == 200 || code == 0) {\n this.show = false;\n this.$emit('emits', {\n m: 'query'\n });\n message.success(msg);\n } else {\n message.error(msg);\n }\n }).finally(() => {\n this.gridOptions.loading = false;\n });\n },\n open({\n column,\n saveParams,\n json,\n defaultValue\n }) {\n if (json) {\n if (json.genIdMap) {\n this.genIdMap = json.genIdMap;\n }\n if (json.url) {\n this.url = json.url;\n }\n }\n this.defaultValue = defaultValue;\n this.saveParams = saveParams;\n this.show = true;\n let columns = column.filter(o => o.visible == 1 && o.importToOtherProp != 1);\n columns.push(...this.gridOptions.initColumns);\n this.gridOptions.columns = columns;\n this.$refs.xGrid.loadColumn(this.gridOptions.columns);\n },\n handleChange(value) {\n // 1. 获取选中的选项对象\n const selectedItem = this.gridOptions.columns.find(o => o.field && o.field === value);\n if (selectedItem) {\n let que = [];\n for (let j = 0; j < this.gridOptions.data.length; j++) {\n let data = this.gridOptions.data[j];\n if (!data || !data[value]) {\n return message.warning(selectedItem.title + '数据为空!');\n }\n if (j == 0) {\n que.push(data[value]);\n continue;\n }\n let index = que.indexOf(data[value]);\n if (index != -1) {\n if (this.$refs.xGrid) {\n // 获取重复行的索引\n this.$refs.xGrid.scrollToRow(data); // 滚动到对应行\n this.$refs.xGrid.setCurrentRow(data); // 高亮\n // this.$refs.xGrid.toggleCheckboxRow(data); // 选中\n }\n return message.warning('第' + (j + 1) + '行-第' + (index + 1) + '行数据不唯-:' + data[value]);\n }\n que.push(data[value]);\n }\n message.success(selectedItem.title + '无重复数据!');\n }\n },\n selectRowChange() {\n this.formData.disabled = this.$refs.xGrid.getCheckboxRecords(true).length == 0;\n this.formData.selected_but = this.formData.disabled ? 'unselected_but' : 'selected_but';\n },\n batchRemove() {\n let records = this.$refs.xGrid.getCheckboxRecords(true);\n if (!records || records.length == 0) return message.error('未选中数据!');\n this.$refs.xGrid.removeCheckboxRow();\n const selectedIds = records.map(row => row.id);\n\n // 过滤掉已删除的行,更新数据源\n this.gridOptions.data = this.gridOptions.data.filter(item => !selectedIds.includes(item.id));\n this.formData.uniCode = '';\n this.selectRowChange();\n },\n getParams() {\n return {\n ...this.saveParams,\n genIdMap: this.genIdMap,\n columnAndValueListMap: this.getDataByDict(this.gridOptions.data)\n };\n },\n onChange({\n data\n }) {\n data = this.getDataByTitle(data);\n this.setDefaultValue(data);\n this.gridOptions.data = data;\n },\n setDefaultValue(data) {\n if (this.defaultValue) {\n for (let key of Object.keys(this.defaultValue)) {\n for (let datum of data) {\n datum[key] = this.defaultValue[key];\n }\n }\n }\n },\n getDataByTitle(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.title == key) {\n obj[item.field] = row[key];\n }\n });\n }\n rows.push(obj);\n });\n return rows;\n }\n },\n getDataByDict(data) {\n if (data && data.length >= 1) {\n let rows = [];\n data.map(row => {\n let obj = {};\n for (let key in row) {\n this.gridOptions.columns.forEach(item => {\n if (item.field == key && item.tableSaveToOtherProp != 1) {\n obj[item.field] = this.getRowValue(item.dictCode, row[key]);\n }\n });\n }\n rows.push(obj);\n });\n this.setDefaultValue(rows);\n return rows;\n }\n },\n download() {\n (0,_utils_ExcelUtil__WEBPACK_IMPORTED_MODULE_8__.exportExcel)({\n data: [],\n name: '模板下载',\n columns: this.gridOptions.columns.filter(o => o.field),\n option: {\n align: 'center'\n }\n });\n },\n getRowValue(dictCode, val) {\n if (dictCode) {\n return this.getDictValueByCode(dictCode, val);\n }\n return val;\n },\n getDictValueByCode(dictCode, val) {\n for (const option of dict.val(dictCode)) {\n if (option.label == val) {\n return option;\n }\n }\n return val;\n },\n close() {\n this.$emit('emits', {});\n this.show = false;\n }\n },\n created() {\n this.formData = {\n action: this.http.axios().defaults.baseURL + '/online/crud/upload',\n uniCode: '',\n headers: this.http.axios().defaults.headers,\n disabled: true,\n selected_but: 'unselected_but'\n };\n }\n});\n\n//# sourceURL=webpack://olp-table/./src/components/ol-dialog-import.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-124.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
370
370
 
371
371
  /***/ }),
372
372
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "olp-table",
3
- "version": "7.2.103",
3
+ "version": "7.2.104",
4
4
  "main": "olp-table.common.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"