瀏覽代碼

修改bug

zhangh 3 年之前
父節點
當前提交
d44fe6654a
共有 4 個文件被更改,包括 30 次插入132 次删除
  1. 1 1
      public/index.html
  2. 3 2
      src/components/WbsTree/ManualSorting.vue
  3. 6 116
      src/views/manager/projectinfo/tree.vue
  4. 20 13
      src/views/manager/wbsinfo/edit.vue

+ 1 - 1
public/index.html

@@ -110,7 +110,7 @@
 <script src="<%= BASE_URL %>cdn/element-ui/2.15.6/index.js" charset="utf-8"></script>
 <script src="<%= BASE_URL %>cdn/avue/2.9.5/avue.min.js" charset="utf-8"></script>
 <script src="<%= BASE_URL %>cdn/nutflow/wf-design-base/index.umd.min.js" charset="utf-8"></script>
-<script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.11&key=7ab53b28352e55dc5754699add0ad862&plugin=AMap.PlaceSearch'></script>
+<script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.11&key=dfd9c521e218fb29772123a488e68c80&plugin=AMap.PlaceSearch'></script>
 <script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
 </body>
 

+ 3 - 2
src/components/WbsTree/ManualSorting.vue

@@ -10,11 +10,12 @@
       style="width:100%;font-size:16px;height:30px;padding:3px 0px;border-top: 1px solid  #E8E8E8;"
     >
       <div>
-
         <span
           class="marleft10"
           style="color:black;"
         >{{item.deptName}}</span>
+        <span>{{key+1}}</span>
+        <span class="marleft20">{{item.tableName}}</span>
       </div>
       <div class="flexItemsC marright20">
         <i
@@ -60,4 +61,4 @@ export default {
   width: 100%;
   height: 100%;
 }
-</style>
+</style>

+ 6 - 116
src/views/manager/projectinfo/tree.vue

@@ -252,7 +252,7 @@
                 <el-button
                   size="mini"
                   @click="handleEdit(scope.$index, scope.row)"
-                >编辑</el-button>
+                >预览</el-button>
                 <el-button
                   size="mini"
                   type="danger"
@@ -943,13 +943,13 @@
     </el-dialog>
 
     <el-dialog
-      :title="(curEleTable.tableName?curEleTable.tableName:'')+'  元素编辑'"
+      :title="(curEleTable.tableName?curEleTable.tableName:'')+''"
       :visible.sync="editEleVisible"
       width="80%"
       append-to-body
       :close-on-click-modal="false"
     >
-      <p class="font-c-warning">编辑元素信息(请谨慎操作)</p>
+      <!-- <p class="font-c-warning">编辑元素信息(请谨慎操作)</p> -->
       <el-table
         :data="editEleList"
         border
@@ -966,13 +966,6 @@
           prop="eName"
           label="字段信息"
         >
-          <template slot-scope="scope">
-            <el-input
-              v-model="scope.row.eName"
-              size="small"
-              placeholder="请输入内容"
-            ></el-input>
-          </template>
         </el-table-column>
         <el-table-column
           align="center"
@@ -980,20 +973,6 @@
           label="数据类型"
           width="120"
         >
-          <template slot-scope="scope">
-            <el-select
-              v-model="scope.row.eType"
-              size="small"
-              placeholder="请选择"
-            >
-              <el-option
-                v-for="item in dataTypeList"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.dictKey"
-              ></el-option>
-            </el-select>
-          </template>
         </el-table-column>
         <el-table-column
           align="center"
@@ -1001,107 +980,18 @@
           label="长度"
           width="120"
         >
-          <template slot-scope="scope">
-            <el-input
-              v-model="scope.row.eLength"
-              size="small"
-              placeholder="请输入内容"
-              :disabled="scope.row.eType == 4"
-            ></el-input>
-          </template>
         </el-table-column>
         <el-table-column
           align="center"
           prop="eAllowDeviation"
           label="允许偏差值"
         >
-          <template slot-scope="scope">
-            <div class="flex">
-              <el-select
-                v-model="scope.row.allow"
-                size="small"
-                placeholder="请选择"
-                style="width:120px"
-              >
-                <el-option
-                  :key="1"
-                  label="≥"
-                  value="≥"
-                ></el-option>
-                <el-option
-                  :key="2"
-                  label="≤"
-                  value="≤"
-                ></el-option>
-                <el-option
-                  :key="3"
-                  label="±"
-                  value="±"
-                ></el-option>
-                <el-option
-                  :key="4"
-                  label="【】"
-                  value="【】"
-                ></el-option>
-              </el-select>
-              <el-input
-                v-model="scope.row.deviation"
-                size="small"
-                placeholder="请输入内容"
-              ></el-input>
-            </div>
-          </template>
         </el-table-column>
         <el-table-column
           align="center"
           prop="eInspectionMethod"
           label="检查方法和频率"
         >
-          <template slot-scope="scope">
-            <el-input
-              v-model="scope.row.eInspectionMethod"
-              size="small"
-              placeholder="请输入内容"
-            ></el-input>
-          </template>
-        </el-table-column>
-        <el-table-column
-          align="center"
-          label="操作"
-          width="120"
-        >
-          <template slot="header">
-            <el-button
-              @click="addEleRow(editEleList)"
-              type="text"
-              icon="el-icon-circle-plus-outline"
-              class="text-icon"
-            ></el-button>
-          </template>
-          <template slot-scope="scope">
-            <el-button
-              v-if="scope.row.id"
-              icon="el-icon-remove-outline"
-              type="text"
-              @click="delEleRowHandle(scope.$index,editEleList)"
-              class="text-icon text-icon-danger"
-            ></el-button>
-            <div
-              class="flex"
-              v-else
-            >
-              <el-button
-                @click="saveNewEle(scope.row)"
-                type="mini"
-              >保存</el-button>
-              <el-button
-                icon="el-icon-remove-outline"
-                type="text"
-                @click="delEleRowHandle(scope.$index,editEleList)"
-                class="text-icon text-icon-danger"
-              ></el-button>
-            </div>
-          </template>
         </el-table-column>
       </el-table>
       <span
@@ -1109,10 +999,10 @@
         class="dialog-footer"
       >
         <el-button @click="editEleVisible = false">取 消</el-button>
-        <el-button
+        <!-- <el-button
           type="primary"
           @click="saveEles"
-        >确 定</el-button>
+        >确 定</el-button> -->
       </span>
     </el-dialog>
 
@@ -2297,7 +2187,7 @@ export default {
       this.namelists = [...this.namelist]
     },
     async setParameterName () {//设置参数名称中添加节点参数按钮
-      // wbsId: this.jiedianId 
+      // wbsId: this.jiedianId
       this.namelists.unshift({ name: '', remark: '', k: '', type: 0, })
     },
     async nodeInfoSave () {//节点参数弹框保存按钮

+ 20 - 13
src/views/manager/wbsinfo/edit.vue

@@ -19,7 +19,6 @@
                 v-show="!filterText"
                 class="filter-tree"
                 lazy
-                :data="treeData"
                 :load="loadNode"
                 @node-click="getNodeDetail"
                 :props="defaultProps"
@@ -1493,7 +1492,7 @@ export default {
       curEleTable: {},
       editEleVisible: false,
       editEleList: [],
-      eleReg: /(-|>|<|≥|≤|±|【】)?([^-≥≤±【】]*)/,
+      eleReg: /(-|>|<|≥|≤|±|【】)?([^≥≤±【】]*)/,
 
       editEleFormulaVisible: false,
       formulaInput: '',
@@ -1542,6 +1541,7 @@ export default {
     paixuMD (data) {
       this.sortTag = true
       this.sortTag2 = true
+      this.curTreeData = data;
       this.findWbsTreeSameLevel(data.parentId)
     },
     bianhua () {
@@ -1559,7 +1559,7 @@ export default {
       if (res.code == 200) {
         this.sortTag = false
         this.sortTag2 = false
-        this.getLazytree()
+        this.updateTreeNewNode();
       }
     },
     async findWbsTreeSameLevel (parentId) {//查询当前节点的同级节点
@@ -1830,12 +1830,13 @@ export default {
     },
 
     updateTreeNewNode () {
-      getLazytree(this.id, this.nodeDetail.parentId).then((res) => {
-        let node = this.$refs.tree.getNode(this.nodeDetail.parentId);
+      let detail = (this.nodeDetail.parentId?this.nodeDetail:this.curTreeData);
+      getLazytree(this.id, detail.parentId).then((res) => {
+        let node = this.$refs.tree.getNode(detail.parentId);
         node.isLeaf = false;
         node.isLeafByUser = false;
         //console.log(node)
-        this.$refs.tree.updateKeyChildren(this.nodeDetail.parentId, res.data.data)
+        this.$refs.tree.updateKeyChildren(detail.parentId, res.data.data)
       })
     },
 
@@ -1858,8 +1859,8 @@ export default {
       selectFormElements(this.curEleTable.id).then((res) => {
         res.data.data.forEach((element) => {
           this.eleReg.exec(element.eAllowDeviation);
-          // console.log(RegExp.$1)
-          // console.log(RegExp.$2)
+           //console.log(RegExp.$1)
+           //console.log(RegExp.$2)
           element.allow = RegExp.$1 ? RegExp.$1 : '';
           element.deviation = RegExp.$2 ? RegExp.$2 : '';
         })
@@ -2103,11 +2104,17 @@ export default {
           element.eType = Number(element.elementType);
           element.eAllowDeviation = element.elementAllowDeviation;
           element.eInspectionMethod = element.elementInspectionMethod;
-          this.eleReg.exec(element.eAllowDeviation);
-          // console.log(RegExp.$1)
-          // console.log(RegExp.$2)
-          element.allow = RegExp.$1 ? RegExp.$1 : '';
-          element.deviation = RegExp.$2 ? RegExp.$2 : '';
+          if(element.eAllowDeviation.indexOf(',')>0){
+            element.allow = '【】';
+            element.deviation = element.eAllowDeviation;
+          }else{
+            this.eleReg.exec(element.eAllowDeviation);
+            // console.log(RegExp.$1)
+            // console.log(RegExp.$2)
+            element.allow = RegExp.$1 ? RegExp.$1 : '';
+            element.deviation = RegExp.$2 ? RegExp.$2 : '';
+          }
+
         })
         this.eleForm.elementList = res.data.data;
         this.importVisible = false;