Browse Source

1,修复联调数据总览数量和边类型的对应关系。
2,启动数据计算,级联操作,接口联调测试完毕。
3,添加项目数据转换路由,项目数据转换布局及编辑的相关交互。
4,扫楼作业-现场任务管理-时间轴(未找到)展示,倒序,显示图片视频等。
5,为边类型添加说明,格式与图类型一致。
6,更新iconfont图标库

shaun-sheep 5 years ago
parent
commit
5c547e54b5

+ 56 - 18
src/api/relation/api.js

@@ -1,25 +1,63 @@
 import httpUtil from "../scan/httpUtil";
 
-export default {
-    //查询总览
-    graphic: function (param,success) {
-        let url = '/api/datacenter/graphic/page-query'
-        httpUtil.postJson(url, param, success)
-    },
+
+//查询总览
+export function graphic(param, success) {
+    let url = '/api/datacenter/graphic/page-query'
+    httpUtil.postJson(url, param, success)
+}
+
 // 查询总览数量
-    graphicNumber: function (param, success) {
-        let url = '/api/datacenter/graphic/query-count'
-        httpUtil.postJson(url, param, success)
+export function graphicNumber(param, success) {
+    let url = '/api/datacenter/graphic/query-count'
+    httpUtil.postJson(url, param, success)
+
+}
 
-    },
 // 下载报告
-    reportDownloads: function (param, success) {
-        let url = '/api/datacenter/graphic/report-downloads'
-        httpUtil.getJson(url, param, success)
-    },
+export function reportDownload(param, success) {
+    let url = '/api/datacenter/graphic/report-downloads'
+    httpUtil.getJson(url, param, success)
+}
+
 // 下载模板
-    templateDownloads: function (param, success) {
-        let url = '/api/datacenter/graphic/template-downloads'
-        httpUtil.getJson(url, param, success)
-    }
+export function templateDownloads(param, success) {
+    let url = '/api/datacenter/graphic/template-downloads'
+    httpUtil.getJson(url, param, success)
+}
+
+
+//    建筑下的业务空间
+export function buildSpace(param, success) {
+    let url = '/api/datacenter/calc_building/space'
+    httpUtil.postJson(url, param, success)
+}
+
+
+// 管网系统设备分块 1
+export function calcSpecial(param, success) {
+    let url = ` /api/datacenter/calc_special/sys-block?Domain=${param.Domain}&SystemName=${param.SystemName}`
+    httpUtil.postJson(url, param, success)
+}
+
+
+//    获取源末端 2
+export function blockQuery(param, success) {
+    let url = '/api/datacenter/graphic/connected-block-query'
+    httpUtil.postJson(url, param, success)
 }
+
+
+// 覆盖源末端 3
+export function blockSource(param, success) {
+    let url = '/api/datacenter/graphic/replace-connected-block-source'
+    httpUtil.postJson(url, param, success)
+}
+
+//    管网系统确定流向 4
+export function sysDirection(param, success) {
+    let buildId = param.BuildingId ? `BuildingId=${param.BuildingId}&` : ''
+    let url = `/api/datacenter/calc_special/sys-direction?BlockId=${param.BlockId}&${buildId}Domain=${param.Domain}&SystemName=${param.SystemName}&isSource=${param.isSource}`
+    httpUtil.postJson(url, param, success)
+}
+

File diff suppressed because it is too large
+ 62 - 6
src/assets/style/iconfont/iconfont.css


BIN
src/assets/style/iconfont/iconfont.eot


File diff suppressed because it is too large
+ 42 - 0
src/assets/style/iconfont/iconfont.svg


BIN
src/assets/style/iconfont/iconfont.ttf


BIN
src/assets/style/iconfont/iconfont.woff


+ 71 - 28
src/components/data_admin/buildTask/detail/deviceDetail.vue

@@ -31,7 +31,7 @@
                     </el-form-item>
                 </el-form>
             </div>
-            <div class="implement-detail detail-item" v-if="detail.TaskState == '未找到'">
+            <div class="implement-detail detail-item" v-if="detail.TaskState === '未找到'">
                 <el-form :model="detail" label-width="150px">
                     <el-form-item label="执行任务人:">{{ detail.WorkerName || '--' }}</el-form-item>
                     <el-form-item label="执行时间:">{{ detail.ProcessTime || '--' }}</el-form-item>
@@ -51,8 +51,8 @@
                     <el-form-item label="全景图:" v-show="panoramaList && panoramaList.length">
                         <div class="img-item" @click="dialogVisible = true" v-for="item in panoramaList"
                              :key="item.Key">
-                            <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`"
-                                 style="width:100%;" :alt="item.Name">
+                            4 <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`"
+                                   style="width:100%;" :alt="item.Name">
                         </div>
                     </el-form-item>
                     <el-form-item label="资产照片:" v-show="imgList && imgList.length">
@@ -78,27 +78,32 @@
                     <el-form-item label="备注信息:">{{ detail.Note || '--' }}</el-form-item>
                 </el-form>
             </div>
-            <div class="operation-detail detail-item">
+            <div class="operation-detail detail-item" v-if="detail.TaskState === '未找到'">
                 <el-form>
                     <el-form-item label="操作信息:"></el-form-item>
                     <div class="block">
                         <el-timeline>
-                            <el-timeline-item timestamp="2018/4/12" placement="top">
+                            <el-timeline-item
+                                placement="top"
+                                v-for="(item,index) in arr"
+                                :key="index"
+                                :timestamp="item.timestamp"
+                            >
                                 <el-card>
-                                    <h4>更新 Github 模板</h4>
-                                    <p>王小虎 提交于 2018/4/12 20:46</p>
-                                </el-card>
-                            </el-timeline-item>
-                            <el-timeline-item timestamp="2018/4/3" placement="top">
-                                <el-card>
-                                    <h4>更新 Github 模板</h4>
-                                    <p>王小虎 提交于 2018/4/3 20:46</p>
-                                </el-card>
-                            </el-timeline-item>
-                            <el-timeline-item timestamp="2018/4/2" placement="top">
-                                <el-card>
-                                    <h4>更新 Github 模板</h4>
-                                    <p>王小虎 提交于 2018/4/2 20:46</p>
+                                    <small>{{item.content}}</small>
+                                    <p>{{item.title}}</p>
+                                    <img
+                                        v-for="isImg in item.imgs"
+                                        :key="isImg.Key"
+                                        :src="`/image-service/common/image_get?systemId=dataPlatform&key=${isImg.Key}`">
+
+                                    <video controls style="width:100%;" v-for="v in videoList" :key="index"
+                                           :title="v.Name">
+                                        <source
+                                            :src="`/image-service/common/image_get?systemId=dataPlatform&key=${v.Key}`"
+                                            type="video/mp4">
+                                        您的浏览器不支持 HTML5 video ,暂无法播放。
+                                    </video>
                                 </el-card>
                             </el-timeline-item>
                         </el-timeline>
@@ -116,16 +121,53 @@
     import {mapGetters} from "vuex"
 
     export default {
-        components: {
-
-  },
+        components: {},
         created() {
-            console.log(this.detail)
-            // ConfirmTime 确认信息时间
-            //    PositivePhotoTime	string 正面照片时间
-            //    QrCodeTime	打印二维码时间
-            //     RegionPhotoTime	string 局部照片时间
-            //     SidePhotoTime	string 侧面照片时间
+            let {ConfirmTime, PositivePhotoTime, QrCodeTime, NameplateTime, SidePhotoTime, VideoTime, EquipProblemTime, EquipProblem, TaskPicList} = this.detail;
+            let arr = []
+            QrCodeTime && arr.push({
+                timestamp: QrCodeTime,
+                time: new Date(QrCodeTime).getTime(),
+                content: '黏贴二维码',
+                imgs: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('带二维码的设备近景照片'))
+            })
+            PositivePhotoTime && arr.push({
+                timestamp: PositivePhotoTime,
+                time: new Date(PositivePhotoTime).getTime(),
+                content: '拍摄正面照片',
+                imgs: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('设备正面照片'))
+            })
+            NameplateTime && arr.push({
+                timestamp: NameplateTime,
+                time: new Date(NameplateTime).getTime(),
+                content: '拍摄铭牌照片',
+                imgs: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('铭牌照片'))
+            })
+            SidePhotoTime && arr.push({
+                timestamp: SidePhotoTime,
+                time: new Date(SidePhotoTime).getTime(),
+                content: '拍摄侧面照片',
+                imgs: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('设备左侧照片' || '设备右侧照片'))
+            })
+            VideoTime && arr.push({
+                timestamp: VideoTime,
+                time: new Date(VideoTime).getTime(),
+                content: '拍摄30s视频',
+                videoList: TaskPicList.length && TaskPicList.filter(i => i.Name.includes('视频资料'))
+            })
+            EquipProblemTime && arr.push({
+                timestamp: EquipProblemTime,
+                time: new Date(EquipProblemTime).getTime(),
+                content: '记录设备问题',
+                title: EquipProblem
+            })
+            ConfirmTime && arr.push({
+                timestamp: ConfirmTime,
+                time: new Date(ConfirmTime).getTime(),
+                content: '确认信息',
+                title: '已确认的设备信息'
+            })
+            this.arr = arr.map(i => ({...i})).sort((a, b) => a.time - b.time)
         },
         computed: {
             ...mapGetters("layout", ["projectId"]),
@@ -198,6 +240,7 @@
             return {
                 dialogVisible: false,//全景图弹出框
                 nowUrl: '',//当前正在显示的图
+                arr: [],
             };
         },
         methods: {},

+ 32 - 11
src/components/relation/overview/CardList.vue

@@ -12,7 +12,7 @@
             >
                 <p class="relation-text">
                     {{child.GraphTypeName}}
-                    <span class="pic-code">图编码{{child.GraphTypeCode}}</span>
+                    <span class="pic-code">图类型编码{{child.GraphTypeCode}}</span>
                     <el-tooltip
                         :content="child.Note"
                         placement="top">
@@ -38,7 +38,7 @@
                             <!--<div class="mask"></div>-->
                             <p class="relation-title">
                                 {{relation.RelationTypeName}}
-                                <span class="asc">{{relation.RelationTypeCode}}</span>
+                                <span class="asc">边类型编码:{{relation.RelationTypeCode}}</span>
                                 <el-tooltip
                                     :content="relation.Note"
                                     placement="top"
@@ -68,6 +68,8 @@
                                 </el-col>
                             </article>
                             <p class="last-computed">
+                                <span v-show="relation.ComputationalState === 3 || relation.ComputationalState === 4">关系计算中...</span>
+                                <span v-show="relation.ComputationalState === 5">计算失败</span>
                                 <span v-show="relation.ComputingTime">最后一次计算时间 {{relation.ComputingTime}}</span>
                                 <el-tooltip
                                     content="启动计算"
@@ -75,10 +77,10 @@
                                 >
                                     <el-badge
                                         class="item float-right"
-                                        is-dot
+                                        :is-dot="relation.ComputationalState === 2"
                                     >
                                         <el-button
-                                            @click="computed"
+                                            @click="computed(relation)"
                                             circle
                                             type="primary"
                                             plain
@@ -130,8 +132,12 @@
         </div>
         <RelationMaintain
             :values="values"
+            :source="source"
             ref="maintain"
+            :isComputed="isComputed"
+            :TableVisibleMoreLoading="TableVisibleMoreLoading"
             @template="templateDown"
+            @openComputed="openComputed"
         />
     </div>
 
@@ -143,7 +149,9 @@
     export default {
         name: "cardList",
         props: {
-            content: Array
+            content: Array,
+            source: Array,
+            TableVisibleMoreLoading: Boolean
         },
         data() {
             return {
@@ -157,8 +165,8 @@
                     download: '下载模板(含数据)',
                     done: '完成',
                     underDesign: '高级配置页面正在设计中。。。',
-                    autoComputed: '根据现有数据自动计算xxx',
-                    existComputed: '根据现有数据自动计算xxx',
+                    autoComputed: '根据现有数据自动计算',
+                    existComputed: '根据现有数据自动计算',
                     existTitle: '计算方向使用的源端和末端如下:',
                     originEquipment: '源端设备类:',
                     endEquipment: '末端设备类:',
@@ -174,17 +182,27 @@
                     allUpdateSuccess: 'xxxx全部更新成功',
                     portionUpdateSuccess: ' xxxx关系部分更新成功',
                     downloadFile: ' 下载报告文件'
-                }
+                },
+                isComputed: {}, // 当前要计算的对象
             }
         },
         computed: {},
+
         methods: {
             explain() {
                 // alert('explain click')
             },
-            computed() {
-                // this.$refs.maintain.dialogTableVisible = true
-                this.$refs.maintain.dialogTableVisibleMore = true
+            computed(relation) {
+                this.isComputed = relation // 当前要计算的对象
+                this.$emit('calcSpecial', relation)
+                if (relation.IsSource) { //提示引导
+                    this.values.autoComputed = `根据现有数据自动计算 <${relation.RelationTypeName}>`
+                    this.$refs.maintain.dialogTableVisible = true
+                } else {
+                    this.values.existComputed = `根据现有数据自动计算 <${relation.RelationTypeName}>`
+                    this.$refs.maintain.dialogTableVisibleMore = true
+
+                }
             },
             equipment() {
                 this.$refs.maintain.dialogEquipment = true
@@ -207,6 +225,9 @@
             },
             templateDown() { //下载模板
                 this.$emit('template')
+            },
+            openComputed(result) {
+                this.$emit('openComputed', result)
             }
         },
         components: {RelationMaintain}

+ 149 - 62
src/components/relation/overview/Modal/RelationMaintain.vue

@@ -13,8 +13,8 @@
                 <el-button @click="dialogTableVisible = false">{{values.cancel}}</el-button>
                 <el-button
                     type="primary"
-                    @click="dialogTableVisible = false"
-                >{{values.confirm}}
+                    @click="promptly"
+                >{{values.promptly}}
                 </el-button>
             </footer>
         </el-dialog>
@@ -23,39 +23,50 @@
             :title="values.title"
             :visible.sync="dialogTableVisibleMore"
         >
-            <p class="font-big">{{values.existComputed}}</p>
-            <p class="exist-title">{{values.existTitle}}</p>
-            <el-row :span="24">
-                <el-col :span="8">
-                    <span class="demonstration">{{values.originEquipment}}</span>
-                    <el-cascader
-                        :options="options"
-                        :props="props"
-                        collapse-tags
-                        clearable
-                    />
-                </el-col>
-                <el-col :span="8">
-                    <span class="demonstration">{{values.endEquipment}}</span>
-                    <el-cascader
-                        :options="options"
-                        :props="props"
-                        collapse-tags
-                        clearable
-                    />
-                </el-col>
-            </el-row>
-            <footer
-                slot="footer"
-                class="dialog-footer "
+            <div
+                v-loading="TableVisibleMoreLoading"
+                style="overflow:hidden"
             >
-                <el-button @click="dialogTableVisibleMore = false">{{values.cancel}}</el-button>
-                <el-button
-                    type="primary"
-                    @click="dialogTableVisibleMore = false"
-                >{{values.promptly}}
-                </el-button>
-            </footer>
+                <p class="font-big">{{values.existComputed}}</p>
+                <p class="exist-title">{{values.existTitle}}</p>
+                <el-row :span="24">
+                    <el-col :span="8">
+                        <span class="demonstration">{{values.originEquipment}}</span>
+                        <el-cascader
+                            :options="newOptions"
+                            :key="isResouceShow"
+                            v-model="ops"
+                            :props="props"
+                            @change="sourceOptions"
+                            collapse-tags
+                            clearable
+                        />
+                    </el-col>
+                    <el-col :span="8">
+                        <span class="demonstration">{{values.endEquipment}}</span>
+<!--                                                    v-model="filterOps"
+-->
+                        <el-cascader
+                            :options="disOptions"
+                            :props="props"
+                            collapse-tags
+                            clearable
+                        />
+                    </el-col>
+                </el-row>
+                <footer
+                    slot="footer"
+                    class="dialog-footer "
+                    style="float: right"
+                >
+                    <el-button @click="dialogTableVisibleMore = false">{{values.cancel}}</el-button>
+                    <el-button
+                        type="primary"
+                        @click="computedUpdate"
+                    >{{values.promptly}}
+                    </el-button>
+                </footer>
+            </div>
         </el-dialog>
         <!--设定设备对象源/末端-->
         <el-dialog
@@ -177,10 +188,12 @@
 
     export default {
         name: "RelationMaintain",
-        props:['values'],
+        props: ['values', 'isComputed', 'source', 'TableVisibleMoreLoading'],
         created() {
-        },
 
+        },
+        mounted() {
+        },
         data() {
             return {
                 dialogTableVisible: false,
@@ -191,31 +204,13 @@
                 dialogProcess: false,
                 originEquipment: [],
                 endEquipment: [],
-                props:{multiple:true}, // 级联
-                options: [{
-                    value: 1,
-                    label: '东南',
-                    children: [{
-                        value: 2,
-                        label: '上海',
-                    }, {
-                        value: 7,
-                        label: '江苏',
-                    }, {
-                        value: 12,
-                        label: '浙江',
-                    }]
-                }, {
-                    value: 17,
-                    label: '西北',
-                    children: [{
-                        value: 18,
-                        label: '陕西',
-                    }, {
-                        value: 21,
-                        label: '新疆维吾尔族自治区',
-                    }]
-                }],
+                props: {
+                    multiple: true,
+                    label: 'FamilyName',
+                    value: 'lId',
+                    children: 'Items',
+
+                }, // 级联
                 activities: [{
                     content: '数据文件处理中..',
                     size: 'large',
@@ -228,15 +223,61 @@
                     icon: 'el-icon-check',
                     size: 'large',
                     type: 'primary',
-                }]
+                }],
+                vals: [],
+                val: [],
+                idArr: [],//存储所有选择的id
+                secondary: [],//单独存储二级数据
+                list: [],//获取后台数据,重新组合,添加唯一标识和源端标识
+                isResouceShow: 0,
+                result: [],//最终传给后台的数据
+                ops: [],//第一个选择器model
+                filterOps: [],//为清空第二个选择器
             }
         },
         computed:{
             fileHeaders() {
                 return  {'Content-Type': 'multipart/form-data'}
+            },
+            newOptions() {
+                ++this.isResouceShow
+                let allList = []
+                this.deepCopy(this.source).forEach(item => allList.push(...item.Items))
+                this.list = allList.map((item, index) => {
+                    item = {
+                        ...item,
+                        lId: index
+                    }
+                    item.Items.map(i => {
+                        i.lId = i.Id + i.BlockId //添加唯一标识
+                        i.Source = true //判断源末端
+                        return i
+                    })
+                    return item
+                })
+                this.ops = this.list
+                return this.list
+            },
+            //    末端数据添加disabled
+            disOptions() {
+                let arr = this.deepCopy(this.list).map(item => {
+                    item.Items.map(i => {
+                        if (this.idArr.includes(i.lId)) {
+                            i.disabled = true
+                        }
+                        return i
+                    })
+                    return item
+                })
+                this.filterOps = arr
+                return arr
             }
+
         },
         methods: {
+            deepCopy(obj) {
+                return JSON.parse(JSON.stringify(obj))
+            },
             progress(event, file, fileList) {
                 // console.log(event.file, fileList)
             },
@@ -261,6 +302,52 @@
             },
             templateDownload() {
                 this.$emit('template')
+            },
+            promptly() {
+                console.log(this.isComputed, 'child isComputed')
+                this.dialogTableVisible = false
+            },
+            sourceOptions(val) {
+                //把所有id组装到一个数组
+                this.idArr = val.map(item => item[1])
+                //提取后台二级数据
+                this.secondary = []
+                this.deepCopy(this.list).forEach(item => this.secondary.push(...item.Items))
+                //最终过滤
+                let filterList = this.secondary.filter(item => this.idArr.includes(item.lId))
+                //    组合成接口需要的数据格式
+                let result = []
+                filterList.forEach(item => {
+                    let {BlockId, BuildingId, Domain, Id, MepSystemType, ProjectId, Source, SourceId, Type, Statistics} = item
+                    result.push({
+                        BlockId,
+                        BuildingId,
+                        Domain,
+                        // Id,
+                        MepSystemType,
+                        ProjectId,
+                        Source,
+                        SourceId,
+                        SourceType: Type,
+                        Statistics
+                    })
+                })
+                this.result = result
+
+            },
+            computedUpdate() {
+                if (!this.result.length) {
+                    this.$message({
+                        showClose: true,
+                        message: '请选择源端设备类',
+                        type: 'warning'
+                    });
+                    return false
+                } else {
+                    this.$emit('openComputed', this.result)
+                    this.dialogTableVisibleMore = false
+
+                }
             }
         }
     }

+ 11 - 0
src/data/menus.js

@@ -287,6 +287,17 @@ export default [
 			permission: 'system:role:query'
 		}]
 	},
+	// 项目数据转换
+	{
+		path: '/relation/data',
+		name: '项目数据转换',
+		icon: 'icon-view',
+		opts: [{
+			name: '查看',
+			basic: true,
+			permission: 'system:role:query'
+		}]
+	},
 	/******************** 通用字典 ***************************/
 	// {
 	// 	path: '/dictionaries',

+ 6 - 2
src/router/system.js

@@ -79,6 +79,8 @@ import relatedSpace from '@/views/ledger/cenotelist/relatedSpace'
 /**  关系维护并计算 */
 import maintain from '@/views/relation/maintain'
 import overView from '@/views/relation/overview'
+import data from '@/views/relation/data'
+import datatable from '@/views/relation/datatable'
 
 /**  厂家库 */
 import supplier from '@/views/manufactor/supplier'
@@ -468,8 +470,10 @@ export default [{
         component: LayoutMain,
         children: [
             { path: 'maintain', name: 'maintain', component: maintain, meta: { keepAlive: false, breadcrumbs: [{ label: '关系维护' }] } },
-            { path: 'overview', name: 'overView', component: overView, meta: { keepAlive: false, breadcrumbs: [{ label: '关系维护计算' },{ label: '全部关系总览' }] } }
-        ]
+            { path: 'overview', name: 'overView', component: overView, meta: { keepAlive: false, breadcrumbs: [{ label: '关系维护计算' },{ label: '全部关系总览' }] } },
+            { path: 'data', name: 'data', component: data, meta: { keepAlive: false, breadcrumbs: [{ label: '项目数据转换',path:'/relation/data' },{ label: '项目数据转换',path:'/relation/data' }] } },
+            { path: 'datatable', name: 'datatable', component: datatable}
+            ]
     },
     /******************** 通用字典 ***************************/
     //厂家库

+ 130 - 0
src/views/relation/data/index.vue

@@ -0,0 +1,130 @@
+<template>
+  <div class="container">
+    <div class="banner">
+      <section class="table-text">
+        <span>共有项目化字典类型:60</span>
+        <span>需从物理世界补全“继承”规则的:x</span>
+        <el-button type="primary">重新转换</el-button>
+        <span
+            class="iconfont icon-guizeyingyong"
+            @click="dataTable"
+        ></span>
+        <span>需补充转换规则的:31</span>
+      </section>
+    </div>
+    <el-row :gutter="24">
+      <el-col :span="12">
+        <p class="border-left-8">标准数字化交付数据(数据中心)→(物理世界)项目实际数据</p>
+        <el-table
+            :data="tableData"
+            stripe
+            style="width: 100%"
+            :header-cell-style="{background:'#d9d9d9',color:'#606266'}"
+        >
+          <el-table-column
+              prop="date"
+              label="标准字典类型"
+          />
+          <el-table-column
+              prop="name"
+              label="不能项目化的实例数量"
+              width="200"
+          />
+        </el-table>
+      </el-col>
+      <el-col :span="12" style="padding-left: 0">
+        <p class="border-left-8">项目实际数据(物理世界)→(数据中心)标准数字化交付数据</p>
+        <el-table
+            :data="tableData"
+            stripe
+            style="width: 100%"
+            :header-cell-style="{background:'#d9d9d9',color:'#606266'}"
+        >
+          <el-table-column
+              prop="date"
+              label="项目化字典类型"
+          />
+          <el-table-column
+              prop="name"
+              label="不能标准化的实例数量"
+              width="200"
+          />
+        </el-table>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "index",
+    data() {
+      return {
+        tableData: [{
+          date: '2016-05-02',
+          name: '王小虎',
+        }, {
+          date: '2016-05-04',
+          name: '王小虎',
+        }, {
+          date: '2016-05-01',
+          name: '王小虎',
+        }, {
+          date: '2016-05-03',
+          name: '王小虎',
+        }]
+      }
+    },
+    methods: {
+      dataTable() {
+        this.$router.push({
+          path: "datatable",
+          // query: {
+          //   id: 1,
+          //   qq: 2
+          // }
+        })
+      }
+    }
+  }
+</script>
+
+<style scoped lang="less">
+  .container {
+    overflow-x: hidden;
+    .border-left-8 {
+      border-left: 8px solid black;
+      margin: 10px 0;
+      font-weight: 600;
+      text-indent: 10px;
+    }
+
+    .banner {
+      border: 1px solid #dfe6ec;
+      background: #fff;
+
+      .table-text {
+        height: 30px;
+        line-height: 30px;
+        margin: 8px;
+        font-weight: 600;
+        cursor: default;
+
+        span:nth-child(2) {
+          margin-left: 40px;
+        }
+
+        span:nth-child(4), span:nth-child(5), button {
+          float: right;
+          margin-left: 20px;
+        }
+
+        span:nth-child(4) {
+          font-size: 25px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+
+</style>

+ 268 - 0
src/views/relation/datatable/index.vue

@@ -0,0 +1,268 @@
+<template>
+  <div class="data-table">
+    <div style="margin-top: 20px">
+      <el-button
+          style="padding: 10px"
+          icon="el-icon-back"
+          @click="back"
+      />
+      <label>维护对象类型:</label>
+      <el-select
+          v-model="value"
+          clearable
+          placeholder="请选择"
+          @change="changOptions"
+
+      >
+        <el-option
+            v-for="(item,index) in options"
+            :key=index
+            :label="item.label"
+            :value="item.value"
+        />
+      </el-select>
+    </div>
+    <el-table
+        :data="tableData"
+        style="width: 100%;margin-top: 30px"
+    >
+      <el-table-column
+          label="L1(专业)"
+          align="center"
+      >
+        <el-table-column
+            prop="province"
+            label="编码"
+            width="120"
+            align="center"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="city"
+            label="名称"
+            width="120"
+            align="center"
+        >
+        </el-table-column>
+      </el-table-column>
+      <el-table-column
+          label="L2(系统)"
+          align="center"
+      >
+        <el-table-column
+            prop="date"
+            label="编码"
+            width="120"
+            align="center"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="name"
+            label="名称"
+            width="120"
+            align="center"
+        >
+        </el-table-column>
+      </el-table-column>
+      <el-table-column
+          label="L3(设备)"
+          align="center"
+      >
+        <el-table-column
+            prop="address"
+            label="编码"
+            width="120"
+            align="center"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="zip"
+            label="名称"
+            width="120"
+            align="center"
+        >
+        </el-table-column>
+      </el-table-column>
+      <el-table-column
+          label="L4(部件)"
+      >
+        <el-table-column
+            prop="province"
+            label="编码"
+            width="120"
+            align="center"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="city"
+            label="名称"
+            width="120"
+            align="center"
+        >
+        </el-table-column>
+      </el-table-column>
+      <el-table-column
+          label="继承标准设备类"
+          align="center"
+      >
+        <el-table-column
+            prop="date"
+            label="编码"
+            width="120"
+            align="center"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="name"
+            label="名称"
+            width="120"
+            align="center"
+        >
+        </el-table-column>
+
+      </el-table-column>
+      <el-table-column
+          label="手动维护转换规则"
+          align="center"
+      >
+        <el-table-column
+            label="数据中心转物理世界"
+            align="center"
+        >
+          <template slot-scope="scope">
+            <el-input
+                v-model="scope.row.txt"
+                @change="dataAndGlobal(scope.$index,scope.row)"
+            ></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column
+            label="物理世界转数据中心"
+            align="center"
+        >
+          <template slot-scope="scope">
+            <el-input></el-input>
+          </template>
+        </el-table-column>
+
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+
+  export default {
+    name: "index",
+    data() {
+      return {
+        options: [{
+          value: '选项1',
+          label: '黄金糕'
+        }, {
+          value: '选项2',
+          label: '双皮奶'
+        }, {
+          value: '选项3',
+          label: '蚵仔煎'
+        }, {
+          value: '选项4',
+          label: '龙须面'
+        }, {
+          value: '选项5',
+          label: '北京烤鸭'
+        }],
+        value: '',
+        tableData: [{
+          date: '2016-05-03',
+          name: '王小虎',
+          province: '上海',
+          city: '普陀区',
+          address: '上海市普陀区金沙江路 1518 弄',
+          zip: 200333,
+          txt:''
+        }, {
+          date: '2016-05-02',
+          name: '王小虎',
+          province: '上海',
+          city: '普陀区',
+          address: '上海市普陀区金沙江路 1518 弄',
+          zip: 200333,
+          txt:'123'
+        }, {
+          date: '2016-05-04',
+          name: '王小虎',
+          province: '上海',
+          city: '普陀区',
+          address: '上海市普陀区金沙江路 1518 弄',
+          zip: 200333,
+          txt:'eee'
+        }, {
+          date: '2016-05-01',
+          name: '王小虎',
+          province: '上海',
+          city: '普陀区',
+          address: '上海市普陀区金沙江路 1518 弄',
+          zip: 200333,
+          txt:'123'
+        }, {
+          date: '2016-05-08',
+          name: '王小虎',
+          province: '上海',
+          city: '普陀区',
+          address: '上海市普陀区金沙江路 1518 弄',
+          zip: 200333,
+           txt:'12w3'
+        }, {
+          date: '2016-05-06',
+          name: '王小虎',
+          province: '上海',
+          city: '普陀区',
+          address: '上海市普陀区金沙江路 1518 弄',
+          zip: 200333,
+          txt:'1232e3'
+        }, {
+          date: '2016-05-07',
+          name: '王小虎',
+          province: '上海',
+          city: '普陀区',
+          address: '上海市普陀区金沙江路 1518 弄',
+          zip: 200333,
+          txt:'12344'
+        }],
+        dataValue:''
+      }
+    },
+    created() {
+      this.$store.dispatch('setBreadcrumb', [{
+        label: '项目数据转换',
+        path: '/relation/data'
+      }, {
+        label: '项目数据转换',
+        path: '/relation/data'
+      }, {
+        label: '手动维护转换规则'
+      }])
+    },
+    methods: {
+      back() {
+        this.$router.go(-1)
+      },
+      changOptions(val) {
+        console.log(val)
+      },
+      dataAndGlobal(index, val) {
+        console.log(index, val)
+      }
+    },
+
+  }
+</script>
+
+<style scoped lang="less">
+  .data-table {
+    label {
+      margin-left: 20px;
+    }
+  }
+</style>

+ 107 - 47
src/views/relation/overview/index.vue

@@ -1,15 +1,29 @@
 <template>
-    <div style="overflow-x: hidden">
+    <div
+        style="overflow-x: hidden"
+        v-loading="loading"
+    >
         <cardList
             :content="content"
+            :source="source"
+            :TableVisibleMoreLoading="TableVisibleMoreLoading"
             @template="templateDown"
+            @calcSpecial="calcSpecial"
+            @openComputed="openComputed"
         />
     </div>
 </template>
 
 <script>
     import CardList from "@/components/relation/Overview/CardList"
-    import api from "../../../api/relation/api";
+    import {
+        blockQuery,
+        blockSource,
+        calcSpecial,
+        graphic,
+        graphicNumber,
+        sysDirection
+    } from "../../../api/relation/api";
     import {mapGetters} from 'vuex'
 
     export default {
@@ -91,53 +105,14 @@
                     //     ]
                     // }
                 ],
+                loading: false,
+                source: [],//源端数据
+                currentRelationTypeName: '',//当前点击图片的RelationTypeName
+                TableVisibleMoreLoading: false,
             }
         },
         created() {
-            let data = {
-                "Cascade": [{
-                    "Cascade": [{
-                        "Filters": `projectId = '${this.projectId}'`,
-                        "Name": "relationTypeProjectList"
-                    }],
-                    "Filters": " not parentId isnull",
-                    "Name": "childGraphicTypeList"
-                }],
-                "Filters": " parentId isnull ",
-                "PageNumber": 1,
-                "PageSize": 1000
-            }
-            let dataNumber = {
-                projectId: this.projectId
-            }
-            api.graphicNumber(dataNumber, resCount => {
-                this.countNumber = resCount.Content
-            })
-            api.graphic(data, res => {
-                this.content = res.Content.map(item => {
-                    // 二级从属关系
-                    (item.ChildGraphicTypeList != null) && item.ChildGraphicTypeList.forEach(child => {
-
-                        this.countNumber.forEach(number => {
-                            if (number.GraphTypeName === child.GraphTypeName) { //二级名字
-                                number.RelationTypeProjectList.forEach(counts => {
-                                    //对应子集
-                                    (child.RelationTypeProjectList != null) && child.RelationTypeProjectList.forEach(relation => {
-                                        if (relation.Id === counts.Id) {
-                                            relation.count = counts.Count
-                                        }
-                                    })
-                                })
-                            }
-                        })
-                    })
-                    return item
-                })
-                this.content = res.Content
-                console.log(this.content)
-                // this.transform(this.content, this.countNumber)
-
-            })
+            this.init()
 
         },
         computed: {
@@ -147,6 +122,36 @@
         },
         components: {CardList},
         methods: {
+            init() {
+                this.loading = true
+                let data = {
+                    "Cascade": [{
+                        "Cascade": [{
+                            "Filters": `projectId = '${this.projectId}'`,
+                            "Name": "relationTypeProjectList"
+                        }],
+                        "Filters": " not parentId isnull",
+                        "Name": "childGraphicTypeList"
+                    }],
+                    "Filters": " parentId isnull ",
+                    "PageNumber": 1,
+                    "PageSize": 1000
+                }
+                let dataNumber = {
+                    projectId: this.projectId
+                }
+                graphic(data, res => {
+
+                    graphicNumber(dataNumber, resCount => {
+                        this.countNumber = resCount.Content
+                        this.loading = false
+                        this.transform(res.Content, this.countNumber)
+                        this.content = res.Content
+                    })
+                })
+
+
+            },
             transform(list1, list2) {
                 let countInfo = {} // { GraphTypeName: { Id: count } }
                 list2.forEach(item => {
@@ -156,7 +161,6 @@
                         countInfo[item.GraphTypeName][r.Id] = r.Count
                     })
                 })
-
                 let changeList = []
                 list1.forEach(item => {
                     // 这里保存的是引用
@@ -169,9 +173,65 @@
                         r.count = countInfo[name][r.Id]
                     })
                 })
+
+
             },
             templateDown() { //下载模板
+            },
+            calcSpecial(relation) {
+                this.TableVisibleMoreLoading = true//可能会很慢,加loading
+                this.currentRelationTypeName = relation.RelationTypeName
+                let param = {
+                    BuildingId: '',
+                    Domain: 'DomainPiping',
+                    ProjectId: this.projectId,
+                    SystemName: relation.RelationTypeName
+                }
+                calcSpecial(param, res => {
+                    let data = {
+                        projectId: this.projectId,
+                    }
+                    blockQuery(data, res => {
+                        //    获取源端数据
+                        this.TableVisibleMoreLoading = false
+                        this.source = res.Content
+                    })
+                })
+            },
+
+            openComputed(result) {
+                let param = {
+                    // BuildingId: '',
+                    Domain: 'DomainPiping',
+                    MepSystemType: '冷冻水供水管',
+                    ProjectId: this.projectId,
+                    SourceList: result
+                }
+                blockSource(param, res => { //覆盖源端数据
+                    //确定流向
+                    result.forEach(i => {
+                        let {BlockId, BuildingId, Domain, Source} = i
+                        this.DataSorting(
+                            BlockId,
+                            BuildingId,
+                            Domain,
+                            Source,
+                        )
+                    })
+                })
+            },
+            DataSorting(BlockId, BuildingId, Domain, isSource) {
+                let param = {
+                    BlockId,
+                    Domain,
+                    isSource,
+                    BuildingId,
+                    SystemName: this.currentRelationTypeName
+                }
+                sysDirection(param, res => {
+                })
             }
+
         }
     }
 </script>