|
@@ -23,6 +23,7 @@
|
|
导出数据
|
|
导出数据
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="part-parent-node" style="margin-bottom: 10px;">资产层级:{{parentData.join('-')}}</div>
|
|
<div class="hui-flex-box">
|
|
<div class="hui-flex-box">
|
|
<el-table :data="tableData" row-key="id" border height="100%" @sort-change="sortChange">
|
|
<el-table :data="tableData" row-key="id" border height="100%" @sort-change="sortChange">
|
|
<el-table-column label="序号" width="50">
|
|
<el-table-column label="序号" width="50">
|
|
@@ -31,9 +32,11 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="资产名称" prop="name"></el-table-column>
|
|
<el-table-column label="资产名称" prop="name"></el-table-column>
|
|
- <el-table-column label="设备类型">
|
|
|
|
|
|
+ <el-table-column label="创建日期" sortable>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span>{{scope.row.type === 0?'普通设备':'物联网设备'}}</span>
|
|
|
|
|
|
+ <span>
|
|
|
|
+ {{$dayjs(scope.row.date).format('YYYY-MM-DD')}}
|
|
|
|
+ </span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="资产编码" prop="assetNumber"></el-table-column>
|
|
<el-table-column label="资产编码" prop="assetNumber"></el-table-column>
|
|
@@ -110,6 +113,10 @@
|
|
<el-drawer title="流程详情" :visible.sync="drawer" :size="400" :append-to-body="true">
|
|
<el-drawer title="流程详情" :visible.sync="drawer" :size="400" :append-to-body="true">
|
|
<flow-detail v-if="drawer" @callback="callback" :detailId="detailId"></flow-detail>
|
|
<flow-detail v-if="drawer" @callback="callback" :detailId="detailId"></flow-detail>
|
|
</el-drawer>
|
|
</el-drawer>
|
|
|
|
+ <el-dialog :close-on-click-modal="false" title="导出数据" :visible.sync="importVisible" width="900px"
|
|
|
|
+ :append-to-body="true">
|
|
|
|
+ <import-file v-if="importVisible" @callback="importVisible = false"></import-file>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -122,6 +129,7 @@
|
|
import flowForm from '@/components/flow/flowForm'
|
|
import flowForm from '@/components/flow/flowForm'
|
|
import flowDetail from '@/components/flow/flowDetail'
|
|
import flowDetail from '@/components/flow/flowDetail'
|
|
import levelTree from '@/components/work/property/levelTree'
|
|
import levelTree from '@/components/work/property/levelTree'
|
|
|
|
+ import importFile from '@/components/work/property/importFile'
|
|
import config from '@/config'
|
|
import config from '@/config'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -137,7 +145,9 @@
|
|
drawer: false,
|
|
drawer: false,
|
|
nowData: {},
|
|
nowData: {},
|
|
filterOption: {},
|
|
filterOption: {},
|
|
- insertType: 1
|
|
|
|
|
|
+ insertType: 1,
|
|
|
|
+ parentData: [],
|
|
|
|
+ importVisible: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -162,15 +172,25 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
sortChange(data) {
|
|
sortChange(data) {
|
|
- console.log(data.order);
|
|
|
|
|
|
+ let sort = data.column.label === '状态' ? 'stateSort' : 'dateSort';
|
|
|
|
+ let option = {};
|
|
|
|
+ if (data.order === 'descending') {
|
|
|
|
+ option[sort] = 0;
|
|
|
|
+ } else if (data.order === 'ascending') {
|
|
|
|
+ option[sort] = 1;
|
|
|
|
+ }
|
|
|
|
+ this.filterOption = option;
|
|
|
|
+ this.currPage = 1;
|
|
|
|
+ this.init();
|
|
},
|
|
},
|
|
- filterDevice(data) {
|
|
|
|
- this.filterOption = data;
|
|
|
|
|
|
+ filterDevice(option, parentData) {
|
|
|
|
+ this.parentData = parentData;
|
|
|
|
+ this.filterOption = option;
|
|
this.currPage = 1;
|
|
this.currPage = 1;
|
|
this.init();
|
|
this.init();
|
|
},
|
|
},
|
|
outputFile() {
|
|
outputFile() {
|
|
- window.location.href = `${config.baseURL}/api/operateDevice/export/${this.$store.getters.project.id}/0`;
|
|
|
|
|
|
+ this.importVisible = true;
|
|
},
|
|
},
|
|
downloadFile() {
|
|
downloadFile() {
|
|
window.location.href = config.baseURL + '/api/operateDevice/exportTemplate';
|
|
window.location.href = config.baseURL + '/api/operateDevice/exportTemplate';
|
|
@@ -213,7 +233,8 @@
|
|
flowForm,
|
|
flowForm,
|
|
flowDetail,
|
|
flowDetail,
|
|
batchForm,
|
|
batchForm,
|
|
- levelTree
|
|
|
|
|
|
+ levelTree,
|
|
|
|
+ importFile
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|