Browse Source

adm:feat > 修改模型上传列表展示问题

shaun-sheep 4 years ago
parent
commit
9684462184

+ 1 - 1
src/api/scan/request.js

@@ -1850,7 +1850,7 @@ export function queryShaftType(success) {
 
 //根据对象删除设备所在竖井关系,只针对一个对象
 export function eqinshUnlink(param, success) {
-  let url = `${baseUrl}${dataCenter}/eq-in-sh/unlink`;
+  let url = `${baseUrl}${rel}/eq-in-sh/unlink`;
   http.postJson(url, param, success)
 }
 

+ 49 - 27
src/components/ledger/cenote/dialog/addCenoteDialog.vue

@@ -11,18 +11,21 @@
       </el-col>
     </el-row>
     <div class="table-box">
-      <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
-        @selection-change="handleSelectionChange">
-        <el-table-column  type="selection" width="55"></el-table-column>
+      <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle"
+                ref="multipleTable"
+                @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"></el-table-column>
         <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.ShaftLocalName||scope.row.ShaftName||''}}
+              {{ scope.row.localName || scope.row.name || '' }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="ShaftLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="StructureInfo.ShaftFuncType" :label="`${inSpaceType}类`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip
+                         min-width="100"></el-table-column>
+        <el-table-column prop="structureInfo.shaftFuncType" :label="`${inSpaceType}类`" show-overflow-tooltip
+                         min-width="100"></el-table-column>
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
             <el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
@@ -30,9 +33,11 @@
         </el-table-column>
       </el-table>
       <!-- 分页 -->
-      <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
-        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
-        :total="page.total"></el-pagination>
+      <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange"
+                     @current-change="handleCurrentChange"
+                     :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize"
+                     layout="total, sizes, prev, pager, next, jumper"
+                     :total="page.total"></el-pagination>
     </div>
     <span slot="footer" class="dialog-footer">
       <el-button size="small" @click="dialogVisible = false">取 消</el-button>
@@ -43,8 +48,11 @@
 
 <script>
 import { unshaftThroughShaft, queryShaftType, linkShaft } from "@/api/scan/request";
+import { getDataDictionary } from "@/api/dict"
+
 import cenoteType from "@/components/ledger/lib/cenoteType";
 import { mapGetters } from "vuex";
+
 export default {
   components: {
     cenoteType
@@ -80,11 +88,22 @@ export default {
     type: String, //选中的tab页
     params: Object //查看的竖井关系信息
   },
-  created() { 
-    queryShaftType(res => {
-      res.Content.forEach(item => {
-        this.shaftType[item.Code] = item.Name
+  created() {
+    // 查询 竖井所有类型
+    // queryShaftType(res => {
+    let param = {
+      "pageNumber": 1,
+      "pageSize": 50,
+      "filters": "code = 'shaftFuncType'",
+      "type": "shaft"
+    }
+    getDataDictionary(param, res => {
+      res.content.forEach(item => {
+        item.dataSource && item.dataSource.forEach(i => {
+          this.shaftType[i.code] = i.name
+        })
       })
+      this.getTableData()
     })
   },
   methods: {
@@ -103,24 +122,24 @@ export default {
     getTableData() {
       let params = {
         data: {
-          Filters: this.cenoteType? `ProjectId='${this.projectId}';structureInfo.ShaftFuncType='${this.cenoteType}'`: `ProjectId='${this.projectId}'`,
-          Orders: "createTime desc, ShaftID asc",
-          PageNumber: this.page.pageNumber,
-          PageSize: this.page.pageSize,
+          filters: this.cenoteType ? `projectId='${this.projectId}';structureInfo.shaftFuncType='${this.cenoteType}'` : `projectId='${this.projectId}'`,
+          orders: "createTime desc, id asc",
+          pageNumber: this.page.pageNumber,
+          pageSize: this.page.pageSize,
         },
         shaftId: this.params.ShaftID
       }
-      if(this.keycode!=''){
-        params.data.Filters += `;ShaftName contain '${this.keycode}' or ShaftLocalName contain '${this.keycode}' or ShaftLocalID contain '${this.keycode}'`
+      if (this.keycode != '') {
+        params.data.filters += `;name contain '${this.keycode}' or localName contain '${this.keycode}' or localId contain '${this.keycode}'`
       }
       unshaftThroughShaft(params, res => {
-        this.tableData = res.Content
+        this.tableData = res.content
         this.tableData.forEach(item => {
-          if(item.StructureInfo && item.StructureInfo.ShaftFuncType){
-            item.StructureInfo.ShaftFuncType = this.shaftType[item.StructureInfo.ShaftFuncType]
+          if (item.structureInfo && item.structureInfo.shaftFuncType) {
+            item.structureInfo.shaftFuncType = this.shaftType[item.structureInfo.shaftFuncType]
           }
         })
-        this.page.total = res.Total
+        this.page.total = res.total
       })
     },
     //选中项修改
@@ -128,7 +147,7 @@ export default {
       this.selections = val;
     },
     savaRelation() {
-      if(this.selections.length){
+      if (this.selections.length) {
         let params = {
           ShaftId: this.params.ShaftID,
           ShaftOtherIdList: this.selections.map(item => {
@@ -140,7 +159,7 @@ export default {
           this.$message.success('关联成功!')
           this.$emit('refresh')
         })
-      }else {
+      } else {
         this.$message('请选择要关联的设备')
       }
     },
@@ -165,15 +184,18 @@ export default {
 #addEqDialog {
   .filters {
     margin-bottom: 10px;
+
     /deep/ .el-input__inner {
       vertical-align: baseline;
     }
   }
+
   .table-box {
     height: 370px;
-    .fr{
+
+    .fr {
       margin-top: 10px;
     }
   }
 }
-</style>
+</style>

+ 30 - 13
src/components/ledger/cenote/table/cenoteTable.vue

@@ -1,32 +1,35 @@
 <template>
   <div id="eqInSp">
     <el-row>
-      <el-button type="primary" @click="add">添加{{inSpaceType}}</el-button>
+      <el-button type="primary" @click="add">添加{{ inSpaceType }}</el-button>
       <el-tooltip class="item" effect="dark" content="可前往“全部关系总览”中计算连通的其它竖井" placement="right">
         <el-button>按空间计算</el-button>
       </el-tooltip>
     </el-row>
     <div class="table-box">
-      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading"
+                :header-cell-style="headerStyle">
         <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.ShaftLocalName||scope.row.ShaftName||''}}
+              {{ scope.row.ShaftLocalName || scope.row.ShaftName || '' }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="ShaftLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="ShaftLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip
+                         min-width="100"></el-table-column>
         <el-table-column :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.StructureInfo.ShaftFuncType}}
+              {{ scope.row.StructureInfo.ShaftFuncType }}
             </div>
           </template>
         </el-table-column>
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
             <el-tooltip class="item" effect="dark" content="删除关系" placement="left">
-              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain
+                         icon="el-icon-delete"></el-button>
             </el-tooltip>
           </template>
         </el-table-column>
@@ -46,7 +49,9 @@
 <script>
 import { queryCenoteTableData, queryShaftType, shthroughshUnlink } from "@/api/scan/request";
 import { mapGetters } from "vuex";
+import { getDataDictionary } from "@/api/dict"
 import addCenoteDialog from "@/components/ledger/cenote/dialog/addCenoteDialog"
+
 export default {
   components: {
     addCenoteDialog
@@ -72,9 +77,19 @@ export default {
     type: String
   },
   created() {
-    queryShaftType(res => {
-      res.Content.forEach(item => {
-        this.shaftType[item.Code] = item.Name
+    // 查询 竖井所有类型
+    // queryShaftType(res => {
+    let param = {
+      "pageNumber": 1,
+      "pageSize": 50,
+      "filters": "code = 'shaftFuncType'",
+      "type": "shaft"
+    }
+    getDataDictionary(param, res => {
+      res.content.forEach(item => {
+        item.dataSource && item.dataSource.forEach(i => {
+          this.shaftType[i.code] = i.name
+        })
       })
       this.getTableData()
     })
@@ -83,17 +98,18 @@ export default {
     // 获取列表数据
     getTableData() {
       let params = {
-        Filters: `id='${this.params.ShaftID}'`,
-        Cascade: [
+        filters: `id='${this.params.ShaftID}'`,
+        cascade: [
           {
-            Name: 'shaftThroughList'
+            name: 'shaftThroughList'
           }
         ]
       }
       queryCenoteTableData(params, res => {
+        debugger
         this.tableData = res.content[0].shaftThroughList || []
         this.tableData.forEach(item => {
-          if(item.structureInfo && item.structureInfo.ShaftFuncType){
+          if (item.structureInfo && item.structureInfo.ShaftFuncType) {
             item.structureInfo.shaftFuncType = this.shaftType[item.structureInfo.shaftFuncType]
           }
         })
@@ -147,6 +163,7 @@ export default {
 <style lang="less" scoped>
 #eqInSp {
   height: 100%;
+
   .table-box {
     margin-top: 10px;
     height: calc(100% - 50px);

+ 13 - 8
src/components/ledger/cenote/table/deviceTable.vue

@@ -1,31 +1,34 @@
 <template>
   <div id="eqInSp">
     <el-row>
-      <el-button type="primary" @click="add">添加{{inSpaceType}}</el-button>
+      <el-button type="primary" @click="add">添加{{ inSpaceType }}</el-button>
       <el-tooltip class="item" effect="dark" content="可前往“全部关系总览”中计算竖井内设备" placement="right">
         <el-button>按空间计算</el-button>
       </el-tooltip>
     </el-row>
     <div class="table-box">
-      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading"
+                :header-cell-style="headerStyle">
         <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.EquipLocalName||scope.row.EquipName||''}}
+              {{ scope.row.localName || scope.row.name || '' }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip
+                         min-width="100"></el-table-column>
         <el-table-column :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.EquipCategory.EquipName}}
+              {{ scope.row.equipCategory.name }}
             </div>
           </template>
         </el-table-column>
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
-            <el-button title="删除关系" size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
+            <el-button title="删除关系" size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain
+                       icon="el-icon-delete"></el-button>
           </template>
         </el-table-column>
         <template slot="empty">
@@ -45,6 +48,7 @@
 import { queryCenoteTableData, eqinshUnlink } from "@/api/scan/request";
 import { mapGetters } from "vuex";
 import addEquipDialog from "@/components/ledger/cenote/dialog/addEquipDialog"
+
 export default {
   components: {
     addEquipDialog
@@ -95,8 +99,8 @@ export default {
         type: 'warning'
       }).then(() => {
         let params = {
-          EquipId: row.EquipID,
-          ShaftId: this.params.ShaftID
+          equipId: row.id,
+          shaftId: this.params.ShaftID
         }
         this.deleteEqInSh(params);
       }).catch(() => {
@@ -135,6 +139,7 @@ export default {
 <style lang="less" scoped>
 #eqInSp {
   height: 100%;
+
   .table-box {
     margin-top: 10px;
     height: calc(100% - 50px);

+ 16 - 16
src/components/model/file/floorTable.vue

@@ -1,44 +1,44 @@
 <template>
   <div class="filterTable-container">
     <el-table ref="filterTable" :data="tableData" style="width: 100%" height="100%" :header-cell-style="{background:'#d9d9d9',color:'#2b2b2b'}">
-      <el-table-column prop="floorName" label="模型文件" width="180">
+      <el-table-column prop="FloorName" label="模型文件" width="180">
         <template slot-scope="scope">
-          <i v-if="scope.row.status == 4" class="iconfont icon-yun--tianchong" style="color:#67C23A;cursor:pointer;fontSize:18px;" title="模型校验完成..."
+          <i v-if="scope.row.Status == 4" class="iconfont icon-yun--tianchong" style="color:#67C23A;cursor:pointer;fontSize:18px;" title="模型校验完成..."
             @click="toPathControl(scope.row)"></i>
-          <i v-else-if="scope.row.status == 31" class="iconfont icon-yun--tianchong1" style="color:#F56C6C;cursor:pointer;fontSize:18px;"
+          <i v-else-if="scope.row.Status == 31" class="iconfont icon-yun--tianchong1" style="color:#F56C6C;cursor:pointer;fontSize:18px;"
             title="同步到数据中心出问题..." @click="toPathControl(scope.row)"></i>
-          <i v-else-if="scope.row.status == 21" class="iconfont icon-yun--tianchong1" style="color:#F56C6C;cursor:pointer;fontSize:18px;"
+          <i v-else-if="scope.row.Status == 21" class="iconfont icon-yun--tianchong1" style="color:#F56C6C;cursor:pointer;fontSize:18px;"
             title="模型数据导出出问题..." @click="toPathControl(scope.row)"></i>
           <i v-else class="iconfont icon-yun--tianchong2" style="color:#E6A23C;cursor:pointer;fontSize:18px;" title="模型校验进行中..."
             @click="toPathControl(scope.row)"></i>
-          <span style="margin-left: 10px">{{ scope.row.floorName }}</span>
+          <span style="margin-left: 10px">{{ scope.row.FloorName }}</span>
         </template>
       </el-table-column>
-      <el-table-column prop="note" label="备注" width="240"></el-table-column>
+      <el-table-column prop="Note" label="备注" width="240"></el-table-column>
       <el-table-column label="版本号">
         <template slot-scope="scope">
-          <span style="margin-right: 5px">{{ scope.row.version }}</span>
-          <i v-show="scope.row.version && scope.row.status == 4" class="iconfont icon-warn" style="cursor:pointer;position:relative;top:1px;" title="查看版本更新信息" @click="handleClickVersion(scope.row)"></i>
+          <span style="margin-right: 5px">{{ scope.row.Version }}</span>
+          <i v-show="scope.row.Version && scope.row.Status == 4" class="iconfont icon-warn" style="cursor:pointer;position:relative;top:1px;" title="查看版本更新信息" @click="handleClickVersion(scope.row)"></i>
         </template>
       </el-table-column>
-      <el-table-column prop="revitVersion" label="revit版本"></el-table-column>
-      <el-table-column prop="acceptTime" label="上传时间" width="200"></el-table-column>
-      <el-table-column prop="userName" label="上传人"></el-table-column>
+      <el-table-column prop="RevitVersion" label="revit版本"></el-table-column>
+      <el-table-column prop="AcceptTime" label="上传时间" width="200"></el-table-column>
+      <el-table-column prop="UserName" label="上传人"></el-table-column>
       <el-table-column prop="address" align="center" label="操作" width="240">
         <template slot-scope="scope">
-          <div class="operate" v-show="scope.row.status == 4">
+          <div class="operate" v-show="scope.row.Status == 4">
             <el-button title="下载模型" type="primary" size="mini" class="iconfont icon-download" @click="downloadModel(scope.row)"></el-button>
             <el-button title="替换模型" type="primary" size="mini" class="iconfont icon-replace" @click="repliaceModel(scope.row)"></el-button>
             <el-button title="查看版本日志" type="primary" size="mini" class="iconfont icon-Log" @click="queryModelLog(scope.row)"></el-button>
             <el-button title="下载BIMID模型" type="primary" size="mini" class="el-icon-download" @click="downloadModelBIMID(scope.row)"></el-button>
           </div>
-          <div :class="['upLoad-loading']" v-show="scope.row.status != 4">
+          <div :class="['upLoad-loading']" v-show="scope.row.Status != 4">
             <div class="progress">
-              <el-progress :text-inside="false" :stroke-width="20" :percentage="100" :color="scope.row.status?'#909399':'#67C23A'"></el-progress>
+              <el-progress :text-inside="false" :stroke-width="20" :percentage="100" :color="scope.row.Status?'#909399':'#67C23A'"></el-progress>
             </div>
             <div class="progress-right">
-              <span v-if="!scope.row.status">上传中...</span>
-              <span v-else-if="scope.row.status == 1">等待检查...</span>
+              <span v-if="!scope.row.Status">上传中...</span>
+              <span v-else-if="scope.row.Status == 1">等待检查...</span>
               <span v-else>模型检查中...</span>
 
               <!-- <span v-show="!scope.row.Status">上传中...</span>