|
@@ -71,7 +71,7 @@
|
|
|
<div>
|
|
<div>
|
|
|
<el-button type="primary" @click="goadd">添加</el-button>
|
|
<el-button type="primary" @click="goadd">添加</el-button>
|
|
|
<el-button type="danger">批量删除</el-button>
|
|
<el-button type="danger">批量删除</el-button>
|
|
|
- <el-button type="primary" plain>显示字段</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" plain @click="ziduanshow=true">显示字段</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -81,7 +81,14 @@
|
|
|
<el-table :data="devicetabledata" :border="true" >
|
|
<el-table :data="devicetabledata" :border="true" >
|
|
|
<el-table-column type="selection" width="55" />
|
|
<el-table-column type="selection" width="55" />
|
|
|
<el-table-column v-for="item in columns.filter(i => i.visible)" :prop="item.prop"
|
|
<el-table-column v-for="item in columns.filter(i => i.visible)" :prop="item.prop"
|
|
|
- :label="item.label"></el-table-column>
|
|
|
|
|
|
|
+ :label="item.label">
|
|
|
|
|
+ <template #default="scope" v-if="item.isTemplate">
|
|
|
|
|
+ <span>
|
|
|
|
|
+ {{ getData(item.func,scope.row,item.prop) }}
|
|
|
|
|
+ <!-- {{ eval(item.prop)}} -->
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<!-- <el-table-column label="设备类型">
|
|
<!-- <el-table-column label="设备类型">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
{{ getTypeName(scope.row) }}
|
|
{{ getTypeName(scope.row) }}
|
|
@@ -153,6 +160,18 @@
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ title="字段显示"
|
|
|
|
|
+ v-model="ziduanshow"
|
|
|
|
|
+ width="50%"
|
|
|
|
|
+ @close="ziduanshow = false"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div style="display: flex;flex-wrap: wrap;align-content: center;justify-content: center;align-items: center;">
|
|
|
|
|
+ <el-checkbox v-for="item in columns" v-model="item.visible" :label="item.label" size="large" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -179,6 +198,8 @@ const goadd = () => {
|
|
|
|
|
|
|
|
const dialogFormVisible = ref(false)
|
|
const dialogFormVisible = ref(false)
|
|
|
|
|
|
|
|
|
|
+const ziduanshow = ref(false)
|
|
|
|
|
+
|
|
|
const formLabelWidth = '140px'
|
|
const formLabelWidth = '140px'
|
|
|
|
|
|
|
|
const dialogTitle = ref("新增组织架构")
|
|
const dialogTitle = ref("新增组织架构")
|
|
@@ -244,34 +265,34 @@ const searchform = ref({
|
|
|
|
|
|
|
|
const columns = ref([
|
|
const columns = ref([
|
|
|
// {label: '上层位置', prop: 'v', visible: true},
|
|
// {label: '上层位置', prop: 'v', visible: true},
|
|
|
- { label: '上层位置', prop: 'deptName', visible: true },
|
|
|
|
|
- { label: '设备编码', prop: 'sn', visible: true },
|
|
|
|
|
- { label: '备用编码', prop: 'spareSn', visible: true },
|
|
|
|
|
- { label: '设备名称', prop: 'name', visible: true },
|
|
|
|
|
- { label: '设备模板', prop: 'equipment.name', visible: true },
|
|
|
|
|
|
|
+ { label: '上层位置', prop: 'deptName', visible: true ,isTemplate:false},
|
|
|
|
|
+ { label: '设备编码', prop: 'sn', visible: true ,isTemplate:false},
|
|
|
|
|
+ { label: '备用编码', prop: 'spareSn', visible: true ,isTemplate:false},
|
|
|
|
|
+ { label: '设备名称', prop: 'name', visible: true ,isTemplate:false},
|
|
|
|
|
+ { label: '设备模板', prop: 'equipment.name', visible: true ,isTemplate:false},
|
|
|
//{label: '所属公司', prop: 'parity', visible: true},
|
|
//{label: '所属公司', prop: 'parity', visible: true},
|
|
|
// { label: '所属组织机构', prop: 'deptName', visible: true },
|
|
// { label: '所属组织机构', prop: 'deptName', visible: true },
|
|
|
- { label: '所属类型', prop: 'equipment.type', visible: true },
|
|
|
|
|
- { label: '负责人', prop: 'uuid', visible: false },
|
|
|
|
|
- { label: '安装日期', prop: 'installationDate', visible: false },
|
|
|
|
|
- { label: '安装地点地址', prop: 'address', visible: false },
|
|
|
|
|
- { label: '关联设备Id', prop: 'protocolDesc', visible: false },
|
|
|
|
|
- { label: '标签', prop: 'tagids', visible: false },
|
|
|
|
|
- { label: '状态', prop: 'status', visible: false },
|
|
|
|
|
- { label: '保修期结束日期', prop: 'endOfWarrantyPeriod', visible: false },
|
|
|
|
|
- { label: '制造日期', prop: 'manufacturingDate', visible: false },
|
|
|
|
|
- { label: '资产编码', prop: 'assetNo', visible: false },
|
|
|
|
|
- { label: '资产编号', prop: 'serialNumber', visible: false },
|
|
|
|
|
- { label: '使用证编号', prop: 'useCertificateNo', visible: false },
|
|
|
|
|
- { label: '安全级别', prop: 'securityLevel', visible: false },
|
|
|
|
|
- { label: '使用年限', prop: 'usefulLife', visible: false },
|
|
|
|
|
- { label: '变动日期', prop: 'changeDate', visible: false },
|
|
|
|
|
- { label: '供货厂家', prop: 'supplier', visible: false },
|
|
|
|
|
- { label: '创建人', prop: 'createBy', visible: false },
|
|
|
|
|
- { label: '创建时间', prop: 'createTime', visible: false },
|
|
|
|
|
- { label: '更新人', prop: 'updateBy', visible: false },
|
|
|
|
|
- { label: '更新时间', prop: 'updateTime', visible: false },
|
|
|
|
|
- { label: '备注', prop: 'remark', visible: false },
|
|
|
|
|
|
|
+ { label: '所属类型', prop: 'equipment.type', visible: true,},
|
|
|
|
|
+ { label: '负责人', prop: 'uuid', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '安装日期', prop: 'installationDate', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '安装地点地址', prop: 'address', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '关联设备Id', prop: 'protocolDesc', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '标签', prop: 'tagids', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '状态', prop: 'status', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '保修期结束日期', prop: 'endOfWarrantyPeriod', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '制造日期', prop: 'manufacturingDate', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '资产编码', prop: 'assetNo', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '资产编号', prop: 'serialNumber', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '使用证编号', prop: 'useCertificateNo', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '安全级别', prop: 'securityLevel', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '使用年限', prop: 'usefulLife', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '变动日期', prop: 'changeDate', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '供货厂家', prop: 'supplier', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '创建人', prop: 'createBy', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '创建时间', prop: 'createTime', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '更新人', prop: 'updateBy', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '更新时间', prop: 'updateTime', visible: false ,isTemplate:false},
|
|
|
|
|
+ { label: '备注', prop: 'remark', visible: false ,isTemplate:false},
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
const onchangepage = (page) => {
|
|
const onchangepage = (page) => {
|
|
@@ -287,6 +308,14 @@ const getTreedata = () => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const getData = (str,data,prop) =>{
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ // let value = eval("data."+prop);
|
|
|
|
|
+ // console.log(value)
|
|
|
|
|
+ let value = eval(str+"(data)")
|
|
|
|
|
+ console.log(value);
|
|
|
|
|
+ return value
|
|
|
|
|
+}
|
|
|
// function getlistEquipmentSbook(){
|
|
// function getlistEquipmentSbook(){
|
|
|
// listEquipmentSbook({ ...searchform.value, pageSize: pagedata.value.size, pageNum: pagedata.value.current }).then(res => {
|
|
// listEquipmentSbook({ ...searchform.value, pageSize: pagedata.value.size, pageNum: pagedata.value.current }).then(res => {
|
|
|
// const { rows, total, page, size } = res;
|
|
// const { rows, total, page, size } = res;
|
|
@@ -336,20 +365,19 @@ const updateOrganizational = (data) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-// const getTypeName = (scope) => {
|
|
|
|
|
-// var equipment = toRaw(scope)
|
|
|
|
|
-// if (equipment != null) {
|
|
|
|
|
-// for (var index in typeList.value) {
|
|
|
|
|
-// var obj = toRaw(typeList.value[index]);
|
|
|
|
|
-// console.log(obj.dictValue);
|
|
|
|
|
-// console.log(equipment.equipmentTypeId);
|
|
|
|
|
-// if (obj.dictValue == equipment.equipmentTypeId) {
|
|
|
|
|
-// console.log(obj.dictLabel);
|
|
|
|
|
-// return obj.dictLabel
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+const getTypeName = (scope) => {
|
|
|
|
|
+ console.log(scope)
|
|
|
|
|
+ var equipment = toRaw(scope)
|
|
|
|
|
+ if (equipment != null) {
|
|
|
|
|
+ for (var index in typeList.value) {
|
|
|
|
|
+ var obj = toRaw(typeList.value[index]);
|
|
|
|
|
+ if (obj.dictValue == equipment.equipmentTypeId) {
|
|
|
|
|
+ console.log(obj.dictLabel);
|
|
|
|
|
+ return obj.dictLabel
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
const saveOrgainzational = () => {
|
|
const saveOrgainzational = () => {
|
|
|
for (var index in organizationalList.value) {
|
|
for (var index in organizationalList.value) {
|