Преглед изворни кода

Merge remote-tracking branch 'origin/zdsz3.0' into zdsz3.0

wangtong пре 1 година
родитељ
комит
8e55d82f51

+ 10 - 0
src/api/zdsz/enginnotInstalled.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 查询工程材质列表
+export function getenginNotInstalled(query) {
+  return request({
+    url: '/zdsz/enginNotInstalled/list',
+    method: 'get',
+    params: query
+  })
+}

+ 2 - 1
src/main.js

@@ -18,7 +18,7 @@ import './assets/icons' // icon
 import './permission' // permission control
 import { getDicts } from "@/api/system/dict/data";
 import { getConfigKey, updateConfigByKey } from "@/api/system/config";
-import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
+import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree,addDateRangeAvue } from "@/utils/ruoyi";
 // 分页组件
 import Pagination from "@/components/Pagination";
 // 自定义表格工具组件
@@ -47,6 +47,7 @@ Vue.prototype.updateConfigByKey = updateConfigByKey
 Vue.prototype.parseTime = parseTime
 Vue.prototype.resetForm = resetForm
 Vue.prototype.addDateRange = addDateRange
+Vue.prototype.addDateRangeAvue = addDateRangeAvue
 Vue.prototype.selectDictLabel = selectDictLabel
 Vue.prototype.selectDictLabels = selectDictLabels
 Vue.prototype.download = download

+ 1 - 1
src/utils/request.js

@@ -19,7 +19,7 @@ const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
   baseURL: process.env.VUE_APP_BASE_API,
   // 超时
-  timeout: 20000
+  timeout: 360000
 })
 
 // request拦截器

+ 21 - 0
src/utils/ruoyi.js

@@ -68,6 +68,27 @@ export function addDateRange(params, dateRange, propName) {
   return search;
 }
 
+// 添加日期范围avue用
+export function addDateRangeAvue(params, key, propName) {
+  let search = params;
+  search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
+  let dateRange = [];
+  if(params.hasOwnProperty(key)){
+    const date = search[key];
+    dateRange.push(date[0])
+    dateRange.push(date[1])
+    delete params[key];
+  }
+  if (typeof (propName) === 'undefined') {
+    search.params['beginTime'] = dateRange[0];
+    search.params['endTime'] = dateRange[1];
+  } else {
+    search.params['begin' + propName] = dateRange[0];
+    search.params['end' + propName] = dateRange[1];
+  }
+  return search;
+}
+
 // 回显数据字典
 export function selectDictLabel(datas, value) {
   if (value === undefined) {

+ 22 - 9
src/views/zdsz/enginee/material/echarts_statistics/index.vue

@@ -61,14 +61,24 @@ export default {
     },
     getsumStatus(district, index) {
       getsumStatus(district).then(res => {
-        console.log(this.dictLabelList[index], res)
-        let data = [{
-          value: parseInt(res.data.weishigong), name: '未施工'
-        }, {
-          value: parseInt(res.data.shigongzhong), name: '施工中'
-        }, {
-          value: parseInt(res.data.jungong), name: '竣工'
-        }]
+        let data;
+        if(res.data != null ){
+          data = [{
+            value: parseInt(res.data.weishigong), name: '未施工'
+          }, {
+            value: parseInt(res.data.shigongzhong), name: '施工中'
+          }, {
+            value: parseInt(res.data.jungong), name: '竣工'
+          }]
+        }else{
+          data = [{
+            value: 0, name: '未施工'
+          }, {
+            value: 0, name: '施工中'
+          }, {
+            value: 0, name: '竣工'
+          }]
+        }
         let color = ['#FFC881', '#5DB3FF', '#80D9AE'];
         let option = {
           title: {
@@ -76,7 +86,6 @@ export default {
             textStyle: {
               color: 'rgb(0 0 0)',
               fontSize: 18,
-              // fontWeight: 'normal',
             },
             x: 'center',
             y: '85%',
@@ -90,6 +99,10 @@ export default {
               name: '',
               type: 'pie',
               radius: '50%',
+              label: {
+                show: true,
+                formatter: '{b}:{c}',
+              },
               data: data,
               emphasis: {
                 itemStyle: {

+ 44 - 3
src/views/zdsz/enginee/material/material_statistics/index.vue

@@ -151,7 +151,6 @@
             <el-table
                 class="materialStatisticsTable"
                 :data="tableData"
-                show-summary
                 style="width: 100%">
               <el-table-column
                 prop="areaName"
@@ -192,7 +191,7 @@
             </el-table>
 
         </div>
-
+      <div id="zhuzhuangtu" style="width: 100%;height: 75vh"></div>
     </div>
 </template>
 
@@ -209,6 +208,7 @@ import {
 } from '@/api/zdsz/overhead'
 import {getUnits} from "@/api/zdsz/unit";
 import {getDicts} from "@/api/system/dict/data";
+import * as echarts from "echarts";
 export default {
 
     name:'MaterialStatistics',
@@ -348,11 +348,52 @@ export default {
           this.currentEnginTypeChangeOptions = res.data
         })
       },
+      getLongestCollectionLength(jsonObj) {
+        let longestLength = 0;
+        for (let key in jsonObj) {
+          if (Array.isArray(jsonObj[key])) {
+            longestLength = Math.max(longestLength, jsonObj[key].length);
+          }
+        }
+        return longestLength;
+      },
       getList()
       {
 
         materialStatistics(this.queryParams).then(res=>{
-          this.tableData=res.data
+          this.tableData=res.data;
+          let seriesData = [];
+          for (let item in res.data) {
+            seriesData.push({
+              name: res.data[item].realityQuality+'-'+res.data[item].realitySpecifications,
+              type: 'bar',
+              stack: res.data[item].realityQuality,
+              label:{
+                show:true,
+                formatter:'{a} {c}米'
+              },
+              data: [res.data[item].realitySize]
+            },);
+          }
+          let option = {
+            xAxis: [
+              {
+                type: 'category',
+                data: ['A'],
+                show:false,
+              }
+            ],
+            yAxis: [
+              {
+                type: 'value'
+              }
+            ],
+            series: seriesData
+        };
+
+          var myChart = echarts.init(document.getElementById('zhuzhuangtu'));
+          myChart.clear()
+          myChart.setOption(option);
         })
       },
       getAreaCompletionInformationList()

+ 5 - 3
src/views/zdsz/enginee/material/progres_visual/index.vue

@@ -299,10 +299,11 @@ export default {
           color: '#5ad3fe'
         },
         {
-          label: '未施工',
+          label: '未安装',
           color: '#fec880'
         },
       ],
+      areaName:'',
       currentType: null,
       currentCommunity: null,
       areaList: [],
@@ -375,9 +376,9 @@ export default {
             "value": res.data[i].dictValue,
           })
         }
-        console.log(dict)
+        let title = '施工记录  '+this.areaName + "-" + e.unitName + "-" +e.roomName;
         setTimeout(() => {
-          this.$refs.ConstructionDetails.open(dict,this.currentEnginType,null,'民用','施工记录',this.currentEnginClassification)
+          this.$refs.ConstructionDetails.open(dict,this.currentEnginType,null,'民用',title,this.currentEnginClassification)
         })
       })
       this.status = 'read-only'
@@ -437,6 +438,7 @@ export default {
       if (areaId === undefined || areaId == null || areaId === '')
         return
       getBuildingList({areaId: areaId}).then(res => this.buildingList = res.data)
+      this.areaName = this.areaList.find(item => item.id === areaId).name;
     },
     getUnitList1(buildingId) {
       if (buildingId === undefined || buildingId == null || buildingId === '')

+ 15 - 13
src/views/zdsz/engineeringCivil/index.vue

@@ -3,10 +3,11 @@
     <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="行政区" prop="district">
         <el-select v-model="queryParams1.district" placeholder="请选择行政区" clearable
-                   @change="queryParams1.areaId = undefined;getAreaList(queryParams1.district)"
-                   @clear="queryParams1.areaId = undefined;areaList=[];
+                   @change="queryParams1.areaId = undefined;areaList=[];
                    queryParams1.buildingId = undefined;buildingList=[];
-                   queryParams1.unitId = undefined;unitList=[]">
+                   queryParams1.unitId = undefined;unitList=[];
+                   queryParams1.houseId = undefined;houseList=[];
+                   getAreaList(queryParams1.district)">
           <el-option
             v-for="dict in dict.type.district"
             :key="dict.value"
@@ -17,9 +18,10 @@
       </el-form-item>
       <el-form-item label="小区名称" prop="areaId">
         <el-select v-model="queryParams1.areaId" filterable clearable placeholder="请选择小区"
-                   @change="queryParams1.buildingId = undefined;getBuildingList1(queryParams1.areaId)"
-                   @clear="queryParams1.buildingId = undefined;buildingList=[];
-                   queryParams1.unitId = undefined;unitList=[]">
+                   @change="queryParams1.buildingId = undefined;buildingList=[];
+                   queryParams1.unitId = undefined;unitList=[];
+                   queryParams1.houseId = undefined;houseList=[];
+                   getBuildingList1(queryParams1.areaId)">
           <el-option
             v-for="item in areaList"
             :key="item.id"
@@ -30,9 +32,9 @@
       </el-form-item>
       <el-form-item label="楼宇名称" prop="buildingId">
         <el-select v-model="queryParams1.buildingId" filterable clearable placeholder="请选择楼宇"
-                   @change="queryParams1.unitId = undefined;getUnitList1(queryParams1.buildingId)"
-                   @clear="queryParams1.unitId = undefined;unitList=[]"
-        >
+                   @change="queryParams1.unitId = undefined;unitList=[];
+                   queryParams1.houseId = undefined;houseList=[];
+                   getUnitList1(queryParams1.buildingId)">
           <el-option
             v-for="item in buildingList"
             :key="item.id"
@@ -43,8 +45,7 @@
       </el-form-item>
       <el-form-item label="单元" prop="unitId">
         <el-select v-model="queryParams1.unitId" placeholder="请选择单元" filterable clearable
-                   @change="queryParams1.houseId = undefined;getHouseList1(queryParams1.unitId)"
-                   @clear="queryParams1.houseId = undefined;houseList=[]"
+                   @change="queryParams1.houseId = undefined;houseList=[];getHouseList1(queryParams1.unitId)"
         >
           <el-option
             v-for="obj in unitList"
@@ -265,8 +266,9 @@
               placement="top-start"
               trigger="hover"
               :content="item.Type">
-              <span slot="reference" v-if="item.state == '1'||item.state == '2'" style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #30B08F;"></span>
-              <span slot="reference" v-if="item.state == '0'" style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #C03639;"></span>
+              <span slot="reference" v-if="(item.state == '1'||item.state == '2')" style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #30B08F;"></span>
+              <span slot="reference" v-if="item.state == '0' && item.Type != '开栓'" style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #C03639;"></span>
+              <span slot="reference" v-if="item.state == '0' && item.Type == '开栓'" style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: yellow;"></span>
             </el-popover>
           </div>
         </template>

+ 336 - 0
src/views/zdsz/enginnotInstalled/index.vue

@@ -0,0 +1,336 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="行政区" prop="district">
+        <el-select v-model="queryParams.district" placeholder="请选择行政区" clearable
+                   @change="queryParams.areaId = undefined;areaList=[];
+                   queryParams.buildingId = undefined;buildingList=[];
+                   queryParams.unitId = undefined;unitList=[];
+                   queryParams.houseId = undefined;houseList=[];
+                   getAreaList(queryParams.district)">
+          <el-option
+            v-for="dict in dict.type.district"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="小区名称" prop="areaId">
+        <el-select v-model="queryParams.areaId" filterable clearable placeholder="请选择小区"
+                   @change="queryParams.buildingId = undefined;buildingList=[];
+                   queryParams.unitId = undefined;unitList=[];
+                   queryParams.houseId = undefined;houseList=[];
+                   getBuildingList1(queryParams.areaId)">
+          <el-option
+            v-for="item in areaList"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="楼宇名称" prop="buildingId">
+        <el-select v-model="queryParams.buildingId" filterable clearable placeholder="请选择楼宇"
+                   @change="queryParams.unitId = undefined;unitList=[];
+                   queryParams.houseId = undefined;houseList=[];
+                   getUnitList1(queryParams.buildingId)">
+          <el-option
+            v-for="item in buildingList"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="单元" prop="unitId">
+        <el-select v-model="queryParams.unitId" placeholder="请选择单元" filterable clearable
+                   @change="queryParams.houseId = undefined;houseList=[];getHouseList1(queryParams.unitId)"
+        >
+          <el-option
+            v-for="obj in unitList"
+            :key="obj.id"
+            :label="obj.name"
+            :value="obj.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="房间" prop="houseId">
+        <el-select v-model="queryParams.houseId" placeholder="请选择房间" filterable clearable>
+          <el-option
+            v-for="obj in houseList"
+            :key="obj.id"
+            :label="obj.name"
+            :value="obj.id"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="未安装类型" >
+        <el-select v-model="queryParams.type" placeholder="请选择未安装类型" clearable>
+          <el-option
+            v-for="dict in dict.type.not_installed_type"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <el-row :gutter="10" class="mb8">
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+    <el-table v-loading="loading" :data="enginNotInstalledList">
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="主键" align="center" prop="id" v-if="false"/>
+      <el-table-column label="行政区" align="center" prop="district">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.district" :value="scope.row.district"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="小区名称" align="center" prop="areaName"/>
+      <el-table-column label="楼宇名称" align="center" prop="buildingName"/>
+      <el-table-column label="单元名称" align="center" prop="unitName"/>
+      <el-table-column label="房间名称" align="center" prop="houseName"/>
+      <el-table-column label="未安装类型" align="center" prop="type">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.not_installed_type" :value="scope.row.type"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remark"/>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+  </div>
+</template>
+<!--engineeringPipeJacking-->
+<script>
+  import {
+    getenginNotInstalled,
+  } from "@/api/zdsz/enginnotInstalled";
+  import {getAreaList} from "@/api/zdsz/area";
+  import {getBuildingList} from "@/api/zdsz/building";
+  import {getUnits} from "@/api/zdsz/unit";
+  import {getHouses} from "@/api/zdsz/house";
+
+  export default {
+    name: "EnginnotInstalled",
+    dicts: ['not_installed_type', 'district'],
+    data() {
+      return {
+        // 按钮loading
+        buttonLoading: false,
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 查询参数
+        queryParams: {
+          district: undefined,
+          areaId: undefined,
+          buildingId: undefined,
+          unitId: undefined,
+          houseId: undefined,
+          type: undefined,
+        },
+        enginNotInstalledList:[],
+        // 表单参数
+        form: {},
+        value: [],
+        // 表单校验
+        areaList: [],
+        buildingList: [],
+        unitList: [],
+        houseList: []
+      };
+    },
+    created() {
+      this.getList();
+    },
+    methods: {
+      getAreaList(district) {
+        if (district === undefined || district == null || district === '')
+          return
+        getAreaList({district: district}).then(res => this.areaList = res.data)
+      },
+      getBuildingList1(areaId) {
+        if (areaId === undefined || areaId == null || areaId === '')
+          return
+        getBuildingList({areaId: areaId}).then(res => this.buildingList = res.data)
+      },
+      getUnitList1(buildingId) {
+        if (buildingId === undefined || buildingId == null || buildingId === '')
+          return
+        getUnits(buildingId).then(res => this.unitList = res.data)
+      },
+      getHouseList1(unitId) {
+        if (unitId === undefined || unitId == null || unitId === '')
+          return
+        getHouses(unitId).then(res => this.houseList = res.data)
+      },
+      /** 查询民用工程列表 */
+      getList() {
+        this.loading = true;
+        getenginNotInstalled(this.queryParams).then(response => {
+          this.enginNotInstalledList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.queryParams={
+          pageNum: 1,
+          pageSize: 10,
+          district: undefined,
+          areaId: undefined,
+          buildingId: undefined,
+          unitId: undefined,
+          houseId: undefined,
+          type: undefined
+        }
+        this.areaList = []
+        this.buildingList = []
+        this.unitList = []
+        this.currentEnginTypeChangeOptions1 = []
+        this.handleQuery();
+      }
+
+    }
+  };
+</script>
+<style lang="scss" scoped>
+
+  ::v-deep .addDialog {
+    width: 60%;
+    // height: 85%;
+    max-height: 85%;
+    overflow: hidden;
+    overflow-y: scroll;
+  }
+
+  ::v-deep .appendElDialog {
+    overflow: hidden;
+    overflow-y: scroll;
+    width: 70%;
+    height: 80%;
+
+
+    .el-dialog__body {
+      height: 85%;
+    }
+
+    .el-form-item {
+      margin-bottom: 22px;
+      width: 44%;
+      display: inline-block;
+    }
+
+    .el-form-item:nth-child(2n+2) {
+      margin-left: 5%;
+    }
+
+    .el-form-item:not(:nth-child(1):nth-child(2)) {
+      margin-top: 0.5%;
+    }
+
+    .remark_input {
+      .el-textarea__inner {
+        width: 238%;
+        height: 190px;
+      }
+    }
+  }
+
+  ::v-deep .appendElNodeDialog {
+    // width: 70%;
+    height: 80%;
+
+
+    .el-dialog__body {
+      height: 85%;
+    }
+
+    .el-form-item {
+      margin-bottom: 22px;
+      width: 44%;
+      display: inline-block;
+    }
+
+    .el-form-item:nth-child(2n+2) {
+      margin-left: 5%;
+    }
+
+    .el-form-item:not(:nth-child(1):nth-child(2)) {
+      margin-top: 0.5%;
+    }
+  }
+
+  ::v-deep .checkingAll {
+    .el-dialog {
+      width: 40%;
+      height: 70%;
+    }
+
+    .el-dialog__body {
+      padding-left: 28%;
+    }
+
+    .el-form div:not(:nth-child(1)) {
+      margin-top: 1%;
+    }
+
+    .el-textarea__inner {
+      width: 360px;
+      height: 115px;
+    }
+  }
+  .my-autocomplete {
+    li {
+      line-height: normal;
+      padding: 7px;
+
+      .name {
+        text-overflow: ellipsis;
+        overflow: hidden;
+      }
+      .addr {
+        font-size: 12px;
+        color: #b4b4b4;
+      }
+
+      .highlighted .addr {
+        color: #ddd;
+      }
+    }
+  }
+</style>