浏览代码

修改数据源

FinalYu 2 年之前
父节点
当前提交
25cc876962

+ 11 - 6
chuanyi_client2/src/components/LeftMenu/index.vue

@@ -422,16 +422,21 @@ export default {
       }
       this.$refs['datasourceForm'].validate(valid => {
         if (valid) {
-          this.connDialogVisible = true
-          if (this.checkDataSourceParam(2, false)) {
+          if (this.chooseConnServer && !this.checkDataSourceParam(3, true)) {
+            return
+          }
+          if (!this.chooseConnServer && this.checkDataSourceParam(2, false)) {
             return
           }
+          this.connDialogVisible = true
           if (this.chooseConnServer) {
             this.$nextTick(() => {
-              this.connForm = JSON.parse(JSON.stringify(this.chooseConnServer))
-              this.connForm.connType = {
-                'type' : this.chooseConnServer.dataSourceTypeKey,
-                'id': this.chooseConnServer.typeId
+              if (!this.connForm || this.connForm.id != this.chooseConnServer.id) {
+                this.connForm = JSON.parse(JSON.stringify(this.chooseConnServer))
+                this.connForm.connType = {
+                  'type' : this.chooseConnServer.dataSourceTypeKey,
+                  'id': this.chooseConnServer.typeId
+                }
               }
               this.driverList = []
               this.driverList.push({

+ 1 - 1
chuanyi_client2/src/views/group_item/index.vue

@@ -377,7 +377,7 @@ export default {
     },
     /** 删除数据项 */
     delItems(ids) {
-      if (ids.length === this.itemDataList.length) {
+      if (ids.length === this.itemDataListF.length) {
         this.$message({
           message: '至少保留一项数据项信息!',
           type: 'warning'

+ 1 - 1
chuanyi_client2/src/views/run_config/index.vue

@@ -1498,7 +1498,7 @@ export default {
       excelData.map((item) => {
         if (item) {
           item.map((ll) => {
-            if (ll) {
+            if (ll && ll.ct.t && ll.ct.t === 'd') {
               ll.m = ll.m,
                   ll.v = ll.m,
                   ll.ct = {