Browse Source

修改问题(点位标签)

chuwu 5 years ago
parent
commit
f7876a6d68

+ 7 - 6
src/components/config_point/data_origin.vue

@@ -50,18 +50,19 @@
         mounted() {},
         methods: {
             changeData() {
-                this.echartsData = [{
-                        name: "未使用:" + this.renderData.Notused,
-                        value: this.renderData.Notused
+                this.echartsData = [
+                    {
+                        name: "已关联:" + this.renderData.Related ,
+                        value: this.renderData.Related
                     },
                     {
                         name: "未关联:" + this.renderData.Notrelated,
                         value: this.renderData.Notrelated
                     },
                     {
-                        name: "已关联:" + this.renderData.Related ,
-                        value: this.renderData.Related
-                    }
+                        name: "未使用:" + this.renderData.Notused,
+                        value: this.renderData.Notused
+                    },
                 ]
             }
         },

+ 2 - 1
src/components/config_point/examine_main.vue

@@ -13,7 +13,7 @@
                     <handsontable-component ref="handsontable"></handsontable-component>
                 </div>
                 <div class="center">
-                    <el-button @click="saveData">保存修改</el-button>
+                    <el-button @click="saveData">保存</el-button>
                 </div>
             </div>
             <div v-else class="center">
@@ -96,6 +96,7 @@
                     type: this.protocolType
                 },res => {
                     console.log(res)
+                    this.$message.success("保存成功!")
                     this.typeCheck()
                 })
             },

+ 5 - 2
src/components/config_point/ip_input.vue

@@ -1,11 +1,11 @@
 <template>
     <ul class="ipAdress">
         <template v-for="(item,index) in ipAdress">
-            <li class="saga-border" :key="index">
+            <li class="saga-border bg-write" :key="index">
                 <input type="text" @input="checkIpVal(item,index)" @keyup="turnIpPOS(item,index,$event)" v-model="item.value" ref="ipInput" @blur="setDefaultVal(item)">
             </li>
             <span v-if="!!value && index == 3" :key="index">:</span>
-            <li v-if="!!value && index == 3" class="saga-border" :key="index">
+            <li v-if="!!value && index == 3" class="saga-border bg-write" :key="index">
                 <input type="text" @input="checkIpVal(value[0],4)" @keyup="turnIpPOS(value[0],4,$event)" v-model="value[0].value" ref="ipInput" @blur="setDefaultVal(value)">
             </li>
         </template>
@@ -165,6 +165,9 @@
         text-align: center;
         background: transparent;
     }
+    .bg-write{
+        background-color: #fff;
+    }
     .ipAdress li div {
         position: absolute;
         bottom: 2px;

+ 34 - 23
src/components/config_point/step3_point/3_identify.vue

@@ -1,29 +1,31 @@
 <template>
     <div class="identify-steps3">
-        <el-collapse v-model="activeName" @change="handleChange" accordion>
-            <el-collapse-item v-for="(item,index) in renderData" :key="index" :name="index+1">
-                <template slot="title">
-                    {{item.Group}}
-                </template>
-                <div class="collapse-item">
-                    <div style="display: flex;justify-content: space-between; height: 40px; line-height: 40px;padding:0 5px;box-sizing:border-box;">
-                        <p>
-                            <el-input  v-model="fillData" placeholder="批量填充空白的设备标识" style="width: 180px; margin-right: 10px;"></el-input>
-                            <el-button @click="fillClick">填充</el-button>
-                        </p>
-                        <p style="display: flex">
-                            <span style="margin-right: 10px; color: #909399;" >AI建议的设备标识</span>
-                            <span class='ai-eq' :title="item.EquipmentMark" @click="aiHandle(item.EquipmentMark)">{{item.EquipmentMark || '--'}}</span>
-                        </p>
+        <div class="collapse-view">
+            <el-collapse v-model="activeName" @change="handleChange" accordion>
+                <el-collapse-item v-for="(item,index) in renderData" :key="index" :name="index+1">
+                    <template slot="title">
+                        {{item.Group}}
+                    </template>
+                    <div class="collapse-item">
+                        <div style="display: flex;justify-content: space-between; height: 40px; line-height: 40px;padding:0 5px;box-sizing:border-box;">
+                            <p>
+                                <el-input  v-model="fillData" placeholder="批量填充空白的设备标识" style="width: 180px; margin-right: 10px;"></el-input>
+                                <el-button @click="fillClick">填充</el-button>
+                            </p>
+                            <p style="display: flex">
+                                <span style="margin-right: 10px; color: #909399;" >AI建议的设备标识</span>
+                                <span class='ai-eq' :title="item.EquipmentMark" @click="aiHandle(item.EquipmentMark)">{{item.EquipmentMark || '--'}}</span>
+                            </p>
+                        </div>
+                        <div style="flex: 1">                    
+                            <handsontable-component ref="handsontable"></handsontable-component>
+                        </div>
                     </div>
-                    <div style="flex: 1">                    
-                        <handsontable-component ref="handsontable"></handsontable-component>
-                    </div>
-                </div>
-            </el-collapse-item>
-        </el-collapse>
+                </el-collapse-item>
+            </el-collapse>
+        </div>
         <div class="center">
-            <el-button type="primary" @click="save">保存</el-button>
+            <el-button @click="save">保存</el-button>
         </div>
     </div>
 </template>
@@ -326,7 +328,16 @@
 <style lang="scss">
     .identify-steps3 {
         height: 100%;
-        overflow-y: auto;
+        display: flex;
+        flex-direction: column;
+        .collapse-view{
+            flex: 1;
+            overflow-y: auto;
+        }
+        .center{
+            height: 35px;
+            line-height: 35px;
+        }
         .el-collapse-item__header.is-active {
             border-bottom-color: #ccc;
         }

+ 1 - 1
src/components/config_point/step3_point/3_temps.vue

@@ -33,7 +33,7 @@
                 </div>
                 <div class="point-despoint">
                     <p>数据字典值说明</p>
-                    <p class="content-view">{{unitObj.unit || '--'}}</p>
+                    <p class="content-view">{{delDataSource(unitObj.dataSource)}}</p>
                 </div>
             </div>
             <el-form class="form" :rules="rules" ref="form2" :model="form2" label-width="140px">

+ 1 - 0
src/components/config_point/step3_point/steps3_main.vue

@@ -124,6 +124,7 @@
                             Filters: {
                                 KeyEquipmentParameter: param.EquipmentParameter,
                                 KeyEquipmentType: param.EquipmentType,
+                                DataSourceId: this.datasourceId,
                                 Used: true
                                 // KeyEquipmentParameter: '温度',
                                 // KeyEquipmentType: '冷机'

+ 6 - 6
src/components/echarts/doughnut.vue

@@ -41,7 +41,7 @@
                         formatter: "{b}: ({d}%)"
                     },
                     legend: {
-                        show: this.type != 'left' ? true : false,
+                        show: false,
                         orient: 'vertical',
                         right: 10,
                         top: 30,
@@ -54,7 +54,7 @@
                         name: '',
                         type: 'pie',
                         radius: ['40%', '60%'],
-                        center: this.type != 'left' ? ['90px','70px'] : ['150px', '150px'],
+                        // center: this.type != 'left' ? ['90px','70px'] : ['150px', '150px'],
                         itemStyle: {
                             normal: {
                                 label: {
@@ -86,15 +86,15 @@
                         },
                         data: this.renderData
                     }],
-                    color: ['#9DA2D6', '#FBACA1', '#FFE37F']
+                    color: ['#67C23A', 'rgb(225, 243, 216)','rgb(244, 244, 245)']
                 }
                 // if(this.type == 'type'){
                     options.graphic = {
                         type: 'text',
-                        left: this.type != 'left' ? '70px' : '125px',
-                        top: this.type != 'left' ? '65px' : '145px',
+                        left: 'center',
+                        top: 'center',
                         style: {
-                            text: `总数:${this.sum|| ''}`,
+                            text: `总数${this.sum|| ''}`,
                             textAlign: 'center',
                             fill: '#000',
                             width: 30,

+ 1 - 1
src/utils/point_edit/handson_header.js

@@ -43,7 +43,7 @@ const headers = {
             FirstTag: ""
         },
         {
-            InfoPointName: "*翻转规则",
+            InfoPointName: "翻转规则",
             InfoPointCode: "RevertRule",
             InputMode: "B1",
             Visible: true,

+ 6 - 0
src/views/point/config_point/steps/step1.vue

@@ -202,6 +202,12 @@
                 if (!delData.length) {
                     return false
                 }
+                if(!!delData){
+                    console.log(delData,'delData')
+                    if(!delData[0].Id){
+                        return false
+                    }
+                }
                 this.$confirm('你确定要删除点位吗?').then(_ => {
                     deletePoint(param, res => {
                         this.$message.success("删除成功")

+ 6 - 1
src/views/point/config_point/steps/step3.vue

@@ -5,7 +5,7 @@
             <el-button @click="dialogShow(2)">根据关键内容批量对应数据字典</el-button>
             <el-checkbox style="float:right;" @change="changeChecked" v-model="checked">只显示未标准化得的原始点位</el-checkbox>
         </div>
-        <div id="handsontableSteps1" v-if="pages.total">
+        <div id="handsontableSteps1" v-loading="isLoading" v-if="pages.total">
             <handsontable-component @mouseDown="clickEdit" ref="handsontable"></handsontable-component>
         </div>
         <div v-else class="center">
@@ -60,6 +60,7 @@
                     total: 0,
                     currentPage: 0
                 },
+                isLoading: false,//loading
             }
         },
         computed: {
@@ -83,6 +84,7 @@
             //页面关闭
             close() {
                 this.isDialogShow = false
+                this.getData()
             },
             //只显示为标准化的点位标识
             changeChecked() {
@@ -147,6 +149,7 @@
             },
             closeEdit() {
                 this.isEditDialogShow = false;
+                THIS.getData()
             },
             //初始化表格实例
             getData() {
@@ -159,6 +162,7 @@
                         "PageSize": this.pages.size,
                     }
                 }
+                this.isLoading = true
                 queryPointRela(param, res => {
                     let content = res.Content.map(item => {
                         if (item.RelationList.length) {
@@ -184,6 +188,7 @@
                             this.hot = this.$refs.handsontable.init(settings)
                         })
                     }
+                    this.isLoading = false
                     console.log(this.hot)
                 })
             },