FinalYu пре 1 година
родитељ
комит
e8f27051d6

+ 1 - 0
chuanyi_client2/src/components/CustomDialog/DataSourceItem.vue

@@ -436,6 +436,7 @@ export default {
     handleItemNodeClick(data, n, target) {
       let node = this.$refs.itemTree.getNode(n)
       if (node) {
+        this.isSelectAllItemData = false
         node.loaded = false
         node.expand()
       }

+ 9 - 3
chuanyi_client2/src/components/HeaderMain/index.vue

@@ -647,6 +647,7 @@ export default {
       },
       // 驱动数据返回类型:0 通用 1 WINCC
       hasLeavesFlag: 0,
+      checkGroupStatusTipsCount: 0,
       groupIntervalTag: null
     }
   },
@@ -709,6 +710,7 @@ export default {
     // this.getReadMode()
 
     let _this = this
+    this.checkGroupStatusTipsCount = 0;
     if (this.groupIntervalTag) clearInterval(this.groupIntervalTag)
     this.groupIntervalTag = setInterval(() => {
       _this.refreshGroupData()
@@ -979,6 +981,7 @@ export default {
       }
       if (node.data.id == -1) {
         getAllItemGroup(null).then(res => {
+          this.checkGroupStatusTipsCount = 0;
           if (!res.data) {
             resolve([])
             return
@@ -990,8 +993,10 @@ export default {
           sessionStorage.setItem('GROUP_LIST', JSON.stringify(arr))
           resolve(arr)
         }).catch((e) => {
+          this.checkGroupStatusTipsCount ++;
+          if (this.checkGroupStatusTipsCount <= 3)
+            showAlertWin(this, null, e)
           resolve([])
-          showAlertWin(this, null, e)
         })
       } else {
         // getItemGroupById(node.data.id).then(res => {
@@ -1361,6 +1366,7 @@ export default {
           'eventValue': temp.eventValue,
           'dataModelId': temp.dataModelId,
           'label': temp.itemName,
+          'value': temp.itemReadName,
           'nodeIdentifier': temp.nodeIdentifier,
           'nodeIndex': temp.nodeIndex,
           'dataType': temp.dataType,
@@ -1585,8 +1591,8 @@ export default {
           t.value = t.itemReadName
           t.checked = false
         })
-        this.chooseItemDataListByTree = this.tempItemList
       }
+      this.chooseItemDataListByTree = this.tempItemList
       const loading = showLoading(this, '加载中,请稍候···')
       getNextAllItem(id, null).then(res => {
         loading.close()
@@ -1617,7 +1623,6 @@ export default {
         }
         // 区分驱动返回数据类型
         this.hasLeavesFlag = 1
-
         this.itemDataListByTree = items
         this.itemDataListByTreeF = JSON.parse(JSON.stringify(this.itemDataListByTree))
         this.dataItemDialogTitle = '选择数据项'
@@ -1631,6 +1636,7 @@ export default {
     handleItemNodeClick(data, n, target) {
       let node = this.$refs.itemTree.getNode(n)
       if (node) {
+        this.isSelectAllItemData = false
         node.loaded = false
         node.expand()
       }

+ 1 - 2
chuanyi_client2/src/components/HeaderPersonal/index.vue

@@ -286,8 +286,7 @@ export default {
       getConfigPrintInfo().then(res => {
         console.log(res)
       }).catch((e) => {
-        loading.close()
-        showAlertWin(this, null, e)
+        showAlertWin(this, null, '请检查打印服务是否正常启动')
       })
     },
     checkApplicationUpdate() {

+ 10 - 2
chuanyi_client2/src/components/PVirtualCheck/index.vue

@@ -2,6 +2,7 @@
   <div class="p-check-virtual-list">
     <virtual-list
         class="check-virtual-list"
+        :key="key"
         :keeps="40"
         data-key="value"
         :data-sources="dataSources"
@@ -24,6 +25,7 @@ export default {
   },
   data() {
     return {
+      key: 0,
       dataComponent: ListItem,
       // 传入组件的额外参数
       extraProps: {
@@ -47,9 +49,15 @@ export default {
   watch: {},
   methods: {
     checkedAll(flag) {
-      this.dataSources.forEach((t) => {
-        t.checked = flag;
+      // this.dataSources.forEach((t) => {
+      //   t.checked = flag;
+      // })
+      this.key ++
+      this.dataSources.map(item => {
+        this.$set(item, 'checked', flag)
+        return item
       })
+      this.$forceUpdate()
       this.$emit("check-change", this.dataSources);
     },
   },

+ 1 - 0
chuanyi_client2/src/components/PVirtualCheck/listItem.vue

@@ -39,6 +39,7 @@ export default {
           this.source.value,
           val
       );
+      this.$forceUpdate()
     },
     // 选择改变
     checkChange() {

+ 2 - 0
chuanyi_client2/src/views/home/index.vue

@@ -48,11 +48,13 @@
         <el-table-column label="操作" align="center" width="200">
           <template slot-scope="scope">
             <el-button type="text"
+                       v-if="uid == scope.row.userId"
                        size="small"
                        icon="el-icon-edit"
                        @click="updateChartItem(scope.row)">修改
             </el-button>
             <el-button type="text"
+                       v-if="uid == scope.row.userId"
                        size="small"
                        icon="el-icon-delete"
                        style="color: red;"