|
@@ -55,26 +55,8 @@
|
|
|
import systemTable from '@/components/ledger/cenote/table/systemTable'
|
|
|
import exhibitionBaseInformation from "@/components/ledger/details/detail/exhibitionBaseInformation";
|
|
|
import selectRadio from "@/components/ledger/details/detail/selectRadio";
|
|
|
- function flattenKeys(obj) {
|
|
|
- let res = {}
|
|
|
+ import tools from "@/utils/scan/tools"
|
|
|
|
|
|
- function isObject(val) {
|
|
|
- return typeof val === 'object' && !Array.isArray(val)
|
|
|
- }
|
|
|
-
|
|
|
- function digKeys(prev, obj) {
|
|
|
- Object.entries(obj).forEach(([key, value]) => {
|
|
|
- const currentKey = prev ? `${prev}.${key}` : key
|
|
|
- if (isObject(value)) {
|
|
|
- digKeys(currentKey, value)
|
|
|
- } else {
|
|
|
- res[currentKey] = value
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- digKeys('', obj)
|
|
|
- return res
|
|
|
- }
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -163,7 +145,7 @@
|
|
|
this.pointData = values[0].Content;
|
|
|
this.exampleData = values[1].Content[0];
|
|
|
let obj = this.deepCopy(values[1].Content[0]);
|
|
|
- obj = flattenKeys(obj);
|
|
|
+ obj = tools.flattenKeys(obj);
|
|
|
this.instance = obj;
|
|
|
this.handleRadios(1)
|
|
|
})
|