|
@@ -66,7 +66,7 @@ import {
|
|
|
queryDictionaryHead,
|
|
|
queryLinkSys
|
|
|
} from '@/api/scan/request';
|
|
|
-import { getDataDictionary } from "@/api/dict";
|
|
|
+import { getDataDictionary, queryPhysicsAllType } from "@/api/dict";
|
|
|
import { buildingQuery } from '@/api/object/build';
|
|
|
import cenoteTable from '@/components/ledger/system/table/cenoteTable';
|
|
|
import deviceTable from '@/components/ledger/system/table/deviceTable';
|
|
@@ -167,12 +167,13 @@ export default {
|
|
|
this.getData();
|
|
|
|
|
|
let pa = {
|
|
|
- Filters: `parentId='Space'`
|
|
|
+ type: `space`
|
|
|
}
|
|
|
- queryDictionaryHead(pa, res => {
|
|
|
- res.Content.map(t => {
|
|
|
- if (t.Name != "元空间") {
|
|
|
- this.spaceType[t.Code] = t.Name;
|
|
|
+ // queryDictionaryHead(pa, res => {
|
|
|
+ queryPhysicsAllType(pa, res => {
|
|
|
+ res.content.map(t => {
|
|
|
+ if (t.name != "元空间") {
|
|
|
+ this.spaceType[t.code] = t.name;
|
|
|
}
|
|
|
})
|
|
|
});
|
|
@@ -299,20 +300,20 @@ export default {
|
|
|
arr.map(i => {
|
|
|
if (i.InputMode == 'F2') {
|
|
|
switch (i.Path) {
|
|
|
- case 'LedgerParam.PhotoDoc.Drawing':
|
|
|
- case 'LedgerParam.Siteinstall.InstallPic':
|
|
|
- case 'LedgerParam.Siteinstall.InstallDrawing':
|
|
|
- case 'LedgerParam.PhotoDoc.Nameplate':
|
|
|
- case 'LedgerParam.PhotoDoc.Pic':
|
|
|
- if (this.instance.hasOwnProperty(i.Path)) {
|
|
|
- i.PicList = this.instance[i.Path]
|
|
|
+ case 'infos.drawing':
|
|
|
+ case 'infos.installPic':
|
|
|
+ case 'infos.installDrawing':
|
|
|
+ case 'infos.nameplate':
|
|
|
+ case 'infos.pic':
|
|
|
+ if (this.instance.hasOwnProperty(i.path)) {
|
|
|
+ i.PicList = this.instance[i.path]
|
|
|
}
|
|
|
- if (picObject[i.InfoPointName]) {
|
|
|
+ if (picObject[i.name]) {
|
|
|
|
|
|
} else {
|
|
|
- picObject[i.InfoPointName] = []
|
|
|
+ picObject[i.name] = []
|
|
|
}
|
|
|
- picObject[i.InfoPointName].push({
|
|
|
+ picObject[i.name].push({
|
|
|
...i,
|
|
|
})
|
|
|
break;
|
|
@@ -348,19 +349,19 @@ export default {
|
|
|
arr.map(i => {
|
|
|
if (i.InputMode == 'F2') {
|
|
|
switch (i.Path) {
|
|
|
- case 'LedgerParam.InsuranceDoc.InsuranceFile':
|
|
|
- case 'LedgerParam.PhotoDoc.Archive':
|
|
|
- case 'LedgerParam.Siteinstall.CheckReport':
|
|
|
- if (this.instance.hasOwnProperty(i.Path)) {
|
|
|
- i.fileList = this.instance[i.Path]
|
|
|
+ case 'infos.insuranceFile':
|
|
|
+ case 'infos.archive':
|
|
|
+ case 'infos.checkReport':
|
|
|
+ if (this.instance.hasOwnProperty(i.path)) {
|
|
|
+ i.fileList = this.instance[i.path]
|
|
|
}
|
|
|
- if (picObject[i.InfoPointName]) {
|
|
|
+ if (picObject[i.name]) {
|
|
|
|
|
|
} else {
|
|
|
- picObject[i.InfoPointName] = []
|
|
|
+ picObject[i.name] = []
|
|
|
}
|
|
|
|
|
|
- picObject[i.InfoPointName].push({
|
|
|
+ picObject[i.name].push({
|
|
|
...i,
|
|
|
})
|
|
|
break
|
|
@@ -402,67 +403,85 @@ export default {
|
|
|
displayData(arr) {//对数据进行处理传给组件展示
|
|
|
const result = {}
|
|
|
arr.forEach(i => {
|
|
|
- if (this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
|
|
|
- i.value = this.instance[i.Path]
|
|
|
+ if (this.instance.hasOwnProperty(i.path) && this.currentRadio != 2) {
|
|
|
+ i.value = this.instance[i.path]
|
|
|
}
|
|
|
- if (i.InputMode == 'C5') {
|
|
|
- if (this.instance.hasOwnProperty(i.Path)) {
|
|
|
- let time = this.instance[i.Path]
|
|
|
+ if (i.inputMode == 'C5') {
|
|
|
+ if (this.instance.hasOwnProperty(i.path)) {
|
|
|
+ let time = this.instance[i.path]
|
|
|
i.value = this.formatDate(time)
|
|
|
}
|
|
|
}
|
|
|
- if (i.DataSource && i.DataSource.length) {
|
|
|
- let source = JSON.parse(i.DataSource)
|
|
|
+ if (i.dataSource && i.dataSource.length) {
|
|
|
+ // let source = JSON.parse(i.DataSource)
|
|
|
+ let source = i.dataSource
|
|
|
//判断输入类型
|
|
|
- if (i.InputMode == 'D1L') {
|
|
|
- let d1l = tools.formatDataSource(i.DataSource)
|
|
|
+ if (i.inputMode == 'D1L') {
|
|
|
+ let d1l = tools.formatDataSource(i.dataSource)
|
|
|
d1l.forEach(k => {
|
|
|
- if (k.Code == this.instance[i.Path]) {
|
|
|
- i.value = k.Name
|
|
|
+ if (k.code == this.instance[i.path]) {
|
|
|
+ i.value = k.name
|
|
|
}
|
|
|
})
|
|
|
- } else if (i.InputMode == 'D2' || i.InputMode == 'C6') {
|
|
|
- if (this.instance.hasOwnProperty(i.Path)) {
|
|
|
- if (!Array.isArray(this.instance[i.Path])) {
|
|
|
- let transArray = this.instance[i.Path].split(',')
|
|
|
- i.value = source.filter(item => transArray.includes(item.Code)).map(item => item.Name).join(',')
|
|
|
+ } else if (i.inputMode == 'D2' || i.inputMode == 'C6') {
|
|
|
+ if (this.instance.hasOwnProperty(i.path)) {
|
|
|
+ if (!Array.isArray(this.instance[i.path])) {
|
|
|
+ let transArray = this.instance[i.path].split(',')
|
|
|
+ i.value = source.filter(item => transArray.includes(item.code)).map(item => item.name).join(',')
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
source.forEach(j => {
|
|
|
- if (j.Code == this.instance[i.Path]) {
|
|
|
- console.log(j.Name)
|
|
|
- i.value = j.Name
|
|
|
+ if (j.code == this.instance[i.path]) {
|
|
|
+ i.value = j.name
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- switch (i.InputMode) {
|
|
|
+ switch (i.inputMode) {
|
|
|
case "L":
|
|
|
case "L1":
|
|
|
case "L2":
|
|
|
case "M":
|
|
|
break;
|
|
|
default:
|
|
|
- if (result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`]) {
|
|
|
- result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`].paths.push({
|
|
|
+ if (result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`]) {
|
|
|
+ result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`].paths.push({
|
|
|
Path: i.Path,
|
|
|
- InfoPointName: i.InfoPointName,
|
|
|
- InfoPointCode: i.InfoPointCode,
|
|
|
+ InfoPointName: i.name,
|
|
|
+ InfoPointCode: i.code,
|
|
|
Value: i.value,
|
|
|
- Visible: i.Visible,
|
|
|
- KeyWord: i.KeyWord,
|
|
|
- InputMode: i.InputMode
|
|
|
+ Visible: i.visible,
|
|
|
+ KeyWord: i.keyWord,
|
|
|
+ InputMode: i.inputMode,
|
|
|
+ data: i.data,
|
|
|
+ receivetime: i.receivetime,
|
|
|
+ error: i.error,
|
|
|
+ Unit: i.unit,
|
|
|
+ FirstName: i.firstName,
|
|
|
+ classCode: i.classCode,
|
|
|
+ id: i.id,
|
|
|
+ groupCode: i.groupCode,
|
|
|
+ type: i.type
|
|
|
})
|
|
|
} else {
|
|
|
- result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
|
|
|
+ result[`${i.firstName}${i.secondName ? '/' + i.secondName : ''}`] = {
|
|
|
paths: [{
|
|
|
- Path: i.Path,
|
|
|
- InfoPointName: i.InfoPointName,
|
|
|
- InfoPointCode: i.InfoPointCode,
|
|
|
+ Path: i.path,
|
|
|
+ InfoPointName: i.name,
|
|
|
+ InfoPointCode: i.code,
|
|
|
Value: i.value,
|
|
|
- Visible: i.Visible,
|
|
|
- KeyWord: i.KeyWord,
|
|
|
- InputMode: i.InputMode
|
|
|
+ Visible: i.visible,
|
|
|
+ KeyWord: i.keyWord,
|
|
|
+ InputMode: i.inputMode,
|
|
|
+ data: i.data,
|
|
|
+ receivetime: i.receivetime,
|
|
|
+ error: i.error,
|
|
|
+ Unit: i.unit,
|
|
|
+ FirstName: i.firstName,
|
|
|
+ classCode: i.classCode,
|
|
|
+ id: i.id,
|
|
|
+ groupCode: i.groupCode,
|
|
|
+ type: i.type
|
|
|
}]
|
|
|
}
|
|
|
}
|