瀏覽代碼

Merge branch 'dev2.0' of http://192.168.3.207:8080/data_processing/data_validation into dev2.0

maxiaoshan 3 年之前
父節點
當前提交
1cde2c8068
共有 2 個文件被更改,包括 626 次插入630 次删除
  1. 5 8
      src/front/remark.go
  2. 621 622
      src/web/templates/project/remark_detail.html

+ 5 - 8
src/front/remark.go

@@ -242,8 +242,7 @@ func setPaceMap(info map[string]interface{}) ([]map[string]interface{}, []string
 	if packages, ok := info["package"].(map[string]interface{}); ok && len(packages) > 0 {
 		for k, tmpackage := range packages { //遍历分包
 			if tmppack, ok := tmpackage.(map[string]interface{}); ok {
-				//isNew, _ := tmppack["ck_isnew"].(bool)
-				isNew := false
+				isNew, _ := tmppack["isnew"].(bool)
 				status := "-1"
 				if tmppack["package_son"] != nil {
 					status = "1"
@@ -332,19 +331,18 @@ func setPurchasingMap(info map[string]interface{}) ([]interface{}, []map[string]
 	purchasinglist, _ := util.BiaoZhu["purchasinglist"].([]interface{})
 	var purchasinglists []interface{}
 	//isNewPcl := []bool{} //记录子包是否是新增的
-	isNewAndStatus := []map[string]interface{}{}
+	var isNewAndStatus []map[string]interface{}
 	if tmpcls, ok := info["purchasinglist"].([]interface{}); ok {
 		for _, v := range tmpcls {
 			if pcl, ok := v.(map[string]interface{}); ok {
-				//isNew, _ := pcl["ck_isnew"].(bool)
-				isNew := false
+				isNew, _ := pcl["isnew"].(bool)
 				status := "-1"
 				if pcl["purchasinglist_son"] != nil {
 					status = "1"
 				}
 				//isNewPcl = append(isNewPcl, isNew)
 				isNewAndStatus = append(isNewAndStatus, map[string]interface{}{"isnew": isNew, "status": status})
-				pcls := []interface{}{}
+				var pcls []interface{}
 				for _, ps := range purchasinglist {
 					ps, _ := ps.(map[string]interface{})
 					value := pcl[qu.ObjToString(ps["key"])]
@@ -380,8 +378,7 @@ func setWorderMap(info map[string]interface{}) ([]interface{}, []map[string]inte
 	if tmpwds, ok := info["winnerorder"].([]interface{}); ok {
 		for _, v := range tmpwds {
 			if wd, ok := v.(map[string]interface{}); ok {
-				//isNew, _ := wd["ck_isnew"].(bool)
-				isNew := false
+				isNew, _ := wd["isnew"].(bool)
 				status := "-1"
 				if wd["winnerorder_son"] != nil {
 					status = "1"

+ 621 - 622
src/web/templates/project/remark_detail.html

@@ -406,7 +406,7 @@
     var otherInfo = {{ .T.otherInfo }}          //公告关联信息
 
     let purchasing_status = {{ .T.ck_purchasinglist }}      //标的物标记
-    let purchasing = {{ .T.ck_pclistag }}
+    let purchasing_all_tag = {{ .T.ck_pclistag }}           // 标的物是否全部标记
     let package_status = {{ .T.ck_package }}                //包标记
     let winneroder_status = {{ .T.ck_winnerorder }}         //中标候选人标记
     // 页面数据
@@ -525,11 +525,10 @@
 
     //记录是否点击保存
     var issave = false;
-    var _id = {{ .T.info._id }}
+    var _id = {{ .T.did }}
     var nextid = {{ .T.nextid }}
     //基本信息
     var common = {{ .T.common }}
-    console.log(common)
     var uInput = [];
     for (k in common) {
         var tmp = {}
@@ -607,7 +606,7 @@
         content.show = true
         content.status = worder_new[k]["status"]
         content.uInput = c_uInput
-        content.ck_isnew = worder_new[k]["isnew"] || false
+        content.isnew = worder_new[k]["isnew"] || false
         content.content = []
         c_content[k] = content
     }
@@ -636,7 +635,7 @@
         content.show = true
         content.status = pcl_new[k]["status"]
         content.uInput = c_uInput
-        content.ck_isnew = pcl_new[k]["isnew"] || false
+        content.isnew = pcl_new[k]["isnew"] || false
         content.content = []
         pcl_content[k] = content
     }
@@ -684,7 +683,7 @@
         content.show = true;
         content.status = packs[k]["packstatus"];
         content.uInput = uInputs;
-        content.ck_isnew = pkg_new[k] || false
+        content.isnew = pkg_new[k] || false
         content.num = packskey[k];
         p_content[k] = content;
 
@@ -783,7 +782,7 @@
                 showCheck: true,
                 key: 'purchasinglist',
                 //checkType: {{.T.ck_pclisext}},
-                checkAllTag: {{ .T.ck_pclistag }},
+                checkAllTag: purchasing_all_tag,
                 status: purchasing_status,
                 content: pcl_content
                 }, {
@@ -815,388 +814,387 @@
                   }]
                 }],
             originData: []},
-        watch: {
-          //切换标签时更改正文内容
-          'activeLabel':
-            function () {
-                this.pageHtml = this.getPageInfo.html
-            }},
-          computed: {
-            getPageInfo() {
-              var tempData = {
-                  title: '',
-                  html: this.pageHtml,
-                  href: ''
-              }
-              //匹配原文或者原文附件
-              var originData = pageDataMap[this.activeLabel]
-              if (originData) {
-                  tempData.title = originData.title
-                  tempData.html = originData.html
-                  tempData.href = originData.href
-              } else {//匹配原公告关联信息
-                  var tempS = this.activeLabel.split('-')
-                  var isFile = tempS.length === 2
-                  var otherData = this.otherInfo.filter(v => v.id == tempS[0])
-                  if (otherData.length > 0) {
-                      tempData.title = otherData[0].title
-                      tempData.html = otherData[0].detail
-                      tempData.href = otherData[0].href
-                      if (isFile) {
-                          tempData.title = '附件内容'
-                          tempData.html = otherData[0].filetext
-                          tempData.href = ''
-                      }
-                  }
-              }
-              return tempData
-            }
-          },
-          mounted() {
-              // 缓存原始数据
-              this.originData = JSON.parse(JSON.stringify([].concat(this.editData)))
-          },
-          methods: {
-              // 当前输入框数据与原始数据比较
-              focusFn(uin, oIndex, tIndex, uIndex, two, one) {
-                  if (uin.key === "bidendtime" || uin.key === "bidopentime" || uin.key === "project_startdate" || uin.key === "project_completedate" ||
-                          uin.key === "publishtime" || uin.key === "signaturedate") {
-                      var val = uin.input
-                      if (val !== "") {
-                          var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/;
-                          var regExp = new RegExp(reg);
-                          if (!regExp.test(val)) {
-                              this.$message({
-                                  message: uin.title + ",日期格式错误!正确格式:2006-01-02 15:04:05",
-                                  type: 'warning',
-                                  duration: 2000,
-                                  offset: 300
-                              });
-                              return
-                          }
-                      }
-                  }
-                  var newNode = this.originData[oIndex].content[tIndex]
-                  if (newNode == null) {//新增子模块处理
-                      return
-                  }
-                  var oNode = newNode.uInput[uIndex]
-                  if (oNode == null) {//新增中标人信息处理
-                      return
-                  }
-                  var changeStatus = uin.input === oNode.input//多包中新增的中标信息报错
-                  if (uin.select) {
-                      changeStatus = uin.select === oNode.select
-                  }
-                  uin.status = changeStatus ? 1 : 2
-                  this.setStatus(uin, uin.status, two, one);
-              },
-              openLink(link) {
-                  window.open(link, '_blank')
-              },
-              // 改变基本字段属性
-              changeBaseValue(index, input, status) {
-                  if (this.editData[0].content[0].uInput[index].input !== input) {
-                      this.editData[0].content[0].uInput[index].input = input
-                      this.editData[0].content[0].uInput[index].status = status
-                  }
-              },
-              selectChange(uni, status, two, one) {
-                //状态更新
-                if (uni.status === '-1' || uni.status === '2') {
-                    status = 2
+            watch: {
+                //切换标签时更改正文内容
+                'activeLabel':
+                function () {
+                    this.pageHtml = this.getPageInfo.html
+                }},
+            computed: {
+                getPageInfo() {
+                    var tempData = {
+                        title: '',
+                        html: this.pageHtml,
+                        href: ''
+                    }
+                    //匹配原文或者原文附件
+                    var originData = pageDataMap[this.activeLabel]
+                    if (originData) {
+                        tempData.title = originData.title
+                        tempData.html = originData.html
+                        tempData.href = originData.href
+                    } else {//匹配原公告关联信息
+                        var tempS = this.activeLabel.split('-')
+                        var isFile = tempS.length === 2
+                        var otherData = this.otherInfo.filter(v => v.id == tempS[0])
+                        if (otherData.length > 0) {
+                            tempData.title = otherData[0].title
+                            tempData.html = otherData[0].detail
+                            tempData.href = otherData[0].href
+                            if (isFile) {
+                                tempData.title = '附件内容'
+                                tempData.html = otherData[0].filetext
+                                tempData.href = ''
+                            }
+                        }
+                    }
+                    return tempData
                 }
-                this.setStatus(uni, status, two, one)
-              },
-              openHref() {
-                  if (!issave) {
-                      alert("请先保存数据!")
-                  } else {
-                      if (nextid === "") {
-                          showMsg("数据已经全部标注完")
-                      } else {
-                          window.location.href = "/front/user/remark/detail?pid=" + {{ .T.pid }} + "&did=" + nextid + "&s_sourceinfo=" + {{ .T.s_sourceinfo }}
-                      }
-                  }
-              },
-              // 检查一级是否需要改变状态
-              checkOneStatus: function (config) {
-                  var tempObj = {
-                      obj: config.type ? config.one : config.two
-                  }
-                  if (config.type) {
-                      tempObj.list = config.one.content
-                  } else {
-                      tempObj.list = config.two.uInput
-                  }
-
-                  var statusList = [0, 0, 0, 0, 0]
-                  for (var i in tempObj.list) {
-                      var tempList = tempObj.list[i]
-                      var tempIndex = Number(tempList.status)
-                      if (tempIndex === -1) {
-                          tempIndex = 0
-                      }
-                      statusList[tempIndex] = Number(statusList[tempIndex]) + 1
-                  }
-                  if (statusList[1] > 0) {
-                      tempObj.obj.status = 1
-                  }
-                  if (statusList[4] > 0 || statusList[3] > 0 || statusList[2] > 0) {
-                      tempObj.obj.status = 2
-                  }
-                  if (statusList[4] === tempObj.list.length) {
-                      tempObj.obj.status = 4
-                      if (tempObj.obj.title === "标的信息" || tempObj.obj.title === "多包信息" || tempObj.obj.title === "中标候选人信息") {
-                          tempObj.obj.status = 2
-                      }
-                  }
-                  if (statusList[3] === tempObj.list.length) {
-                      tempObj.obj.status = 2
-                  }
-                  if (statusList[2] === tempObj.list.length) {
-                      tempObj.obj.status = 2
-                  }
-                  if (statusList[0] === tempObj.list.length) {
-                      tempObj.obj.status = -1
-                  }
-                  if (!config.type) {
-                      this.checkOneStatus({
-                          one: config.one,
-                          two: config.two,
-                          type: true
-                      })
-                  }
-              },
-              //切换状态按钮
-              setStatus:function (witch, s, two, one) {
-                  var key = witch.key
-                  //校验日期格式
-                  if (key === "bidendtime" || key === "bidopentime" || key === "project_startdate" || key === "project_completedate" ||
-                          key === "publishtime" || key === "signaturedate") {
-                      var val = witch.input
-                      if (val !== "") {
-                          var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/;
-                          var regExp = new RegExp(reg);
-                          if (!regExp.test(val)) {
-                              this.$message({
-                                  message: witch.title + ",日期格式错误!正确格式:2006-01-02 15:04:05",
-                                  type: 'warning',
-                                  duration: 2000,
-                                  offset: 300
-                              });
-                              //alert(witch.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
-                              return
-                          }
-                      }
-                  }
-                  if (s === '2' && !one && !two && witch.content.length === 0) {
-                      return
-                  }
-                  witch.status = s;
-                  if (two) {
-                      this.checkOneStatus({
-                          one: one,
-                          two: two,
-                          type: false
-                      })
-                  }
-              },
-              //二级删除
-              delNewTwo: function (one, index, two) {
-                  //two.ck_isnew = false //目前点删除按钮页面直接不显示,但是集合索引位置不变,所以加了此代码
-                  //two.show = false
-                  if (two.ck_isnew) {
-                      one.content.splice(index, 1)
-                  } else {
-                      two.show = false
-                      two.status = 4
-                      this.saveDataTwo(two, 4, one)
-                  }
-                  this.checkOneStatus({
-                      one: one,
-                      two: two,
-                      type: true
-                  })
-              },
-              /*add style*/
-              addStyle: function (data) {
-                  return prettyPrint(data).replace(/(checkAllTag|checkType|showCheck|wstatus|status|key|title|input|content|uInput|selectArr|select|show|true)/g, "<mark>$1</mark>")
-              },
-              /*同步修改源码*/
-              changeText: function (boolean) {
-                  try {
-                      var tempText = JSON.parse(this.$refs.text.innerText.replace(/(\n|\s)/g, ''))
-                      if (boolean) {
-                          this.tagvalues = tempText
-                      } else {
-                          this.editData = tempText
-                      }
-                  } catch (err) {
-                      alert('源码修改失败')
-                  }
-              },
-              goText: function (value) {
-                  /*重置Html*/
-                  this.pageHtml = this.getPageInfo.html
-                  if (!value) {
-                      return false
-                  }
-                  var rs = new RegExp('(' + value + ')', 'gi')
-                  //选中input框值文本高亮
-                  if (rs.test(this.pageHtml)) {
-                      this.pageHtml = this.pageHtml.replace(rs, '<mark>$1</mark>')
-                      /*延迟查询dom,防止dom未插入*/
-                      var $this = this
-                      setTimeout(function () {
-                          $this.goMark(value)
-                      }, 150)
-                  } else {
-                      /*重置Html*/
-                      this.pageHtml = this.getPageInfo.html
-                  }
-              },
-              goMark: function (value) {
-                  var mLength = document.querySelectorAll('mark').length
-                  if (this.scrollCache.value === value) {
-                      this.scrollCache.index = (this.scrollCache.index + 1) % mLength
-                  } else {
-                      this.scrollCache.index = 0
-                  }
-                  this.scrollCache.value = value
-                  /*滚动到第一个mark*/
-                  var temp = document.querySelectorAll('mark')[this.scrollCache.index]
-                  $("mark").removeClass('focus')
-                  $(temp).addClass('focus')
-                  document.querySelector('.article').scrollTop = offset(temp).top - window.screen.height / 2
-              },
-              // markTag:function(n){
-              //    $.ajax({
-              //        url:"/markTag",
-              //        method:"post",
-              //        data: {tag:n,_id:_id},
-              //        success:function(res){
-              //            if(res){
-              //                document.getElementById("com-alert-val").innerHtml="标记成功";
-              //                var label1 = document.getElementById("com-alert");
-              //                label1.style.display="block";
-              //                setTimeout(function(){label1.style.display="none";},1000)
-              //            }
-              //        }
-              //    });
-              // },
-              addChild: function (one, oindex) {
-                  var tempNode = {}
-                  switch (one.title) {
-                      case "标的信息": {
-                          tempNode = {
-                              //content: [],
-                              show: true,
-                              ck_isnew: true,
-                              status: 2,
-                              title: "标的物",
-                              uInput: JSON.parse(JSON.stringify(pclfInput))
-                          }
-                          break
-                      }
-                      case "多包信息": {
-                          tempNode = {
-                              //content: [],
-                              show: true,
-                              status: 2,
-                              ck_isnew: true,
-                              title: "子包",
-                              uInput: JSON.parse(JSON.stringify(pfInput))
-                          }
-                          break
-                      }
-                      case "中标候选人信息": {
-                          tempNode = {
-                              //content: [],
-                              show: true,
-                              status: 2,
-                              ck_isnew: true,
-                              title: "候选人",
-                              uInput: JSON.parse(JSON.stringify(wodfInput))
-                          }
-                          break
-                      }
-                  }
-                  // if (one.status >= 2) {
-                  //     one.status = '2'
-                  // }
-                  one.content.push(tempNode)
-                  this.checkOneStatus({
-                      one: one,
-                      type: true
-                  })
-                  this.$nextTick(() => {
-                      var tempN = $(".edit.one").eq(oindex).find(".edit-title")
-                      var goTop = tempN.eq(tempN.length - 1).offset().top
-                      setTimeout(() => {
-                          $(".operation").scrollTop($(".operation").scrollTop() + goTop)
-                      }, 150)
-                  })
-              },
-              // 新增子包中标信息字段
-              addThreeChild:function (two, n, one) {
-                  two.uInput.push({
-                      input: "",
-                      key: 'winner',
-                      status: "2",
-                      title: '标段(包)中标单位'
-                  })
-                  two.uInput.push({
-                      input: "",
-                      key: 'bidamount',
-                      status: "2",
-                      title: '标段(包)中标金额'
-                  })
-                  two.status = 2
-                  this.checkOneStatus({
-                      one: one,
-                      two: two,
-                      type: false
-                  })
             },
-              //保存
-              saveDataTwo:function (two, n, one) {
-                  two.uInput.forEach(function (v) {
-                      var key = v.key
-                      if (key === "bidendtime" || key === "bidopentime" || key === "project_startdate" || key === "project_completedate" ||
-                              key === "publishtime" || key === "signaturedate") {
-                          var val = v.input
-                          if (val !== "") {
+            mounted() {
+                // 缓存原始数据
+                this.originData = JSON.parse(JSON.stringify([].concat(this.editData)))
+            },
+            methods: {
+                // 当前输入框数据与原始数据比较
+                focusFn(uin, oIndex, tIndex, uIndex, two, one) {
+                    if (uin.key === "bidendtime" || uin.key === "bidopentime" || uin.key === "project_startdate" || uin.key === "project_completedate" ||
+                        uin.key === "publishtime" || uin.key === "signaturedate") {
+                        var val = uin.input
+                        if (val !== "") {
                               var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/;
                               var regExp = new RegExp(reg);
                               if (!regExp.test(val)) {
                                   this.$message({
-                                      message: v.title + ",日期格式错误!正确格式:2006-01-02 15:04:05",
+                                      message: uin.title + ",日期格式错误!正确格式:2006-01-02 15:04:05",
                                       type: 'warning',
                                       duration: 2000,
                                       offset: 300
                                   });
-                                  //alert(v.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
                                   return
-                              }
-                          }
-                      }
-                      if (n === "1" && v.status === "-1") {
-                          v.status = n
-                      } else if (n === "-1") {
-                          v.status = n
-                      } else if (n === "2") {
-                          v.status = n
-                      } else if (n === "4") {
-                          v.status = n
-                      }
-                  });
-                  two.status = n
-                  this.checkOneStatus({
-                      one: one,
-                      two: two,
-                      type: false
-                  })
+                            }
+                        }
+                    }
+                    var newNode = this.originData[oIndex].content[tIndex]
+                    if (newNode == null) {//新增子模块处理
+                        return
+                    }
+                    var oNode = newNode.uInput[uIndex]
+                    if (oNode == null) {//新增中标人信息处理
+                        return
+                    }
+                    var changeStatus = uin.input === oNode.input//多包中新增的中标信息报错
+                    if (uin.select) {
+                        changeStatus = uin.select === oNode.select
+                    }
+                    uin.status = changeStatus ? 1 : 2
+                        this.setStatus(uin, uin.status, two, one);
+                    },
+                openLink(link) {
+                        window.open(link, '_blank')
+                    },
+                // 改变基本字段属性
+                changeBaseValue(index, input, status) {
+                    if (this.editData[0].content[0].uInput[index].input !== input) {
+                        this.editData[0].content[0].uInput[index].input = input
+                        this.editData[0].content[0].uInput[index].status = status
+                    }
+                },
+                selectChange(uni, status, two, one) {
+                        //状态更新
+                        if (uni.status === '-1' || uni.status === '2') {
+                            status = 2
+                        }
+                        this.setStatus(uni, status, two, one)
+                    },
+                openHref() {
+                        if (!issave) {
+                            alert("请先保存数据!")
+                        } else {
+                            if (nextid === "") {
+                                showMsg("数据已经全部标注完")
+                            } else {
+                                window.location.href = "/front/user/remark/detail?pid=" + {{ .T.pid }} + "&did=" + nextid + "&s_sourceinfo=" + {{ .T.s_sourceinfo }}
+                            }
+                        }
+                    },
+                // 检查一级是否需要改变状态
+                checkOneStatus: function (config) {
+                    var tempObj = {
+                        obj: config.type ? config.one : config.two
+                    }
+                    if (config.type) {
+                        tempObj.list = config.one.content
+                    } else {
+                        tempObj.list = config.two.uInput
+                    }
+                    var statusList = [0, 0, 0, 0, 0]
+                    for (var i in tempObj.list) {
+                    var tempList = tempObj.list[i]
+                    var tempIndex = Number(tempList.status)
+                    if (tempIndex === -1) {
+                        tempIndex = 0
+                    }
+                        statusList[tempIndex] = Number(statusList[tempIndex]) + 1
+                    }
+                    if (statusList[1] > 0) {
+                        tempObj.obj.status = 1
+                    }
+                    if (statusList[4] > 0 || statusList[3] > 0 || statusList[2] > 0) {
+                        tempObj.obj.status = 2
+                    }
+                    if (statusList[4] === tempObj.list.length) {
+                        tempObj.obj.status = 4
+                    if (tempObj.obj.title === "标的信息" || tempObj.obj.title === "多包信息" || tempObj.obj.title === "中标候选人信息") {
+                        tempObj.obj.status = 2
+                        }
+                    }
+                    if (statusList[3] === tempObj.list.length) {
+                        tempObj.obj.status = 2
+                    }
+                    if (statusList[2] === tempObj.list.length) {
+                        tempObj.obj.status = 2
+                    }
+                    if (statusList[0] === tempObj.list.length) {
+                        tempObj.obj.status = -1
+                    }
+                    if (!config.type) {
+                        this.checkOneStatus({
+                            one: config.one,
+                            two: config.two,
+                            type: true
+                        })
+                    }
+                },
+                //切换状态按钮
+                setStatus:function (witch, s, two, one) {
+                    var key = witch.key
+                    //校验日期格式
+                    if (key === "bidendtime" || key === "bidopentime" || key === "project_startdate" || key === "project_completedate" ||
+                        key === "publishtime" || key === "signaturedate") {
+                        var val = witch.input
+                        if (val !== "") {
+                            var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/;
+                            var regExp = new RegExp(reg);
+                            if (!regExp.test(val)) {
+                                this.$message({
+                                    message: witch.title + ",日期格式错误!正确格式:2006-01-02 15:04:05",
+                                    type: 'warning',
+                                    duration: 2000,
+                                    offset: 300
+                                });
+                                //alert(witch.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
+                                return
+                            }
+                        }
+                    }
+                    if (s === '2' && !one && !two && witch.content.length === 0) {
+                        return
+                    }
+                    witch.status = s;
+                    if (two) {
+                        this.checkOneStatus({
+                            one: one,
+                            two: two,
+                            type: false
+                        })
+                    }
+                },
+                //二级删除
+                delNewTwo: function (one, index, two) {
+                    //two.ck_isnew = false //目前点删除按钮页面直接不显示,但是集合索引位置不变,所以加了此代码
+                    //two.show = false
+                    if (two.isnew) {
+                        one.content.splice(index, 1)
+                    } else {
+                        two.show = false
+                        two.status = 4
+                        this.saveDataTwo(two, 4, one)
+                    }
+                    this.checkOneStatus({
+                        one: one,
+                        two: two,
+                        type: true
+                    })
+                },
+                /*add style*/
+                addStyle: function (data) {
+                    return prettyPrint(data).replace(/(checkAllTag|checkType|showCheck|wstatus|status|key|title|input|content|uInput|selectArr|select|show|true)/g, "<mark>$1</mark>")
+                },
+                /*同步修改源码*/
+                changeText: function (boolean) {
+                    try {
+                        var tempText = JSON.parse(this.$refs.text.innerText.replace(/(\n|\s)/g, ''))
+                        if (boolean) {
+                            this.tagvalues = tempText
+                        } else {
+                            this.editData = tempText
+                        }
+                    } catch (err) {
+                        alert('源码修改失败')
+                    }
+                },
+                goText: function (value) {
+                    /*重置Html*/
+                    this.pageHtml = this.getPageInfo.html
+                    if (!value) {
+                        return false
+                    }
+                    var rs = new RegExp('(' + value + ')', 'gi')
+                    //选中input框值文本高亮
+                    if (rs.test(this.pageHtml)) {
+                        this.pageHtml = this.pageHtml.replace(rs, '<mark>$1</mark>')
+                        /*延迟查询dom,防止dom未插入*/
+                        var $this = this
+                        setTimeout(function () {
+                            $this.goMark(value)
+                        }, 150)
+                    } else {
+                        /*重置Html*/
+                        this.pageHtml = this.getPageInfo.html
+                    }
+                },
+                goMark: function (value) {
+                    var mLength = document.querySelectorAll('mark').length
+                    if (this.scrollCache.value === value) {
+                        this.scrollCache.index = (this.scrollCache.index + 1) % mLength
+                    } else {
+                        this.scrollCache.index = 0
+                    }
+                    this.scrollCache.value = value
+                    /*滚动到第一个mark*/
+                    var temp = document.querySelectorAll('mark')[this.scrollCache.index]
+                    $("mark").removeClass('focus')
+                    $(temp).addClass('focus')
+                    document.querySelector('.article').scrollTop = offset(temp).top - window.screen.height / 2
+                },
+                // markTag:function(n){
+                //    $.ajax({
+                //        url:"/markTag",
+                //        method:"post",
+                //        data: {tag:n,_id:_id},
+                //        success:function(res){
+                //            if(res){
+                //                document.getElementById("com-alert-val").innerHtml="标记成功";
+                //                var label1 = document.getElementById("com-alert");
+                //                label1.style.display="block";
+                //                setTimeout(function(){label1.style.display="none";},1000)
+                //            }
+                //        }
+                //    });
+                // },
+                addChild: function (one, oindex) {
+                    var tempNode = {}
+                    switch (one.title) {
+                        case "标的信息": {
+                            tempNode = {
+                                //content: [],
+                                show: true,
+                                isnew: true,
+                                status: 2,
+                                title: "标的物",
+                                uInput: JSON.parse(JSON.stringify(pclfInput))
+                            }
+                            break
+                        }
+                        case "多包信息": {
+                            tempNode = {
+                                //content: [],
+                                show: true,
+                                status: 2,
+                                isnew: true,
+                                title: "子包",
+                                uInput: JSON.parse(JSON.stringify(pfInput))
+                            }
+                            break
+                        }
+                        case "中标候选人信息": {
+                            tempNode = {
+                                //content: [],
+                                show: true,
+                                status: 2,
+                                isnew: true,
+                                title: "候选人",
+                                uInput: JSON.parse(JSON.stringify(wodfInput))
+                            }
+                            break
+                        }
+                    }
+                    // if (one.status >= 2) {
+                    //     one.status = '2'
+                    // }
+                    one.content.push(tempNode)
+                    this.checkOneStatus({
+                        one: one,
+                        type: true
+                    })
+                    this.$nextTick(() => {
+                        var tempN = $(".edit.one").eq(oindex).find(".edit-title")
+                        var goTop = tempN.eq(tempN.length - 1).offset().top
+                        setTimeout(() => {
+                            $(".operation").scrollTop($(".operation").scrollTop() + goTop)
+                        }, 150)
+                    })
+                },
+                // 新增子包中标信息字段
+                addThreeChild:function (two, n, one) {
+                    two.uInput.push({
+                        input: "",
+                        key: 'winner',
+                        status: "2",
+                        title: '标段(包)中标单位'
+                    })
+                    two.uInput.push({
+                        input: "",
+                        key: 'bidamount',
+                        status: "2",
+                        title: '标段(包)中标金额'
+                    })
+                    two.status = 2
+                    this.checkOneStatus({
+                        one: one,
+                        two: two,
+                        type: false
+                    })
+                },
+                //保存
+                saveDataTwo:function (two, n, one) {
+                    two.uInput.forEach(function (v) {
+                        var key = v.key
+                        if (key === "bidendtime" || key === "bidopentime" || key === "project_startdate" || key === "project_completedate" ||
+                            key === "publishtime" || key === "signaturedate") {
+                            var val = v.input
+                            if (val !== "") {
+                                var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/;
+                                var regExp = new RegExp(reg);
+                                if (!regExp.test(val)) {
+                                    this.$message({
+                                        message: v.title + ",日期格式错误!正确格式:2006-01-02 15:04:05",
+                                        type: 'warning',
+                                        duration: 2000,
+                                        offset: 300
+                                    });
+                                    //alert(v.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
+                                    return
+                                }
+                            }
+                        }
+                        if (n === "1" && v.status === "-1") {
+                            v.status = n
+                        } else if (n === "-1") {
+                            v.status = n
+                        } else if (n === "2") {
+                            v.status = n
+                        } else if (n === "4") {
+                            v.status = n
+                        }
+                    });
+                    two.status = n
+                    this.checkOneStatus({
+                        one: one,
+                        two: two,
+                        type: false
+                    })
                   /**
                    two.content.forEach(function(v) {
                       v.uInput.forEach(function(value) {
@@ -1206,251 +1204,252 @@
                       })
                   })
                    */
-              },
-              saveDataOne:function (one, n) {
-                  //保存后的样式
-                  var _this = this
-                  one.content.forEach(function (v) {
-                      v.uInput.forEach(function (value) {
-                          var key = value.key
-                          if (n === 1) {
-                              if (key === "bidendtime" || key === "bidopentime" || key === "project_startdate" || key === "project_completedate" ||
-                                      key === "publishtime" || key === "signaturedate") {
-                                  var val = value.input
-                                  if (val !== "") {
-                                      var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/;
-                                      var regExp = new RegExp(reg);
-                                      if (!regExp.test(val)) {
-                                          this.$message({
-                                              message: value.title + ",日期格式错误!正确格式:2006-01-02 15:04:05",
-                                              type: 'warning',
-                                              duration: 2000,
-                                              offset: 300
-                                          });
-                                          //alert(value.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
-                                          return
-                                      }
-                                  }
-                              }
-                          }
-                          // 取消全部,通过时判断状态是否处于修改新增等
-                          if (n === "1" && value.status === "-1") {
-                              value.status = n
-                          } else if (n === "-1") {
-                              value.status = n
-                          }
-                      })
+                },
+                saveDataOne:function (one, n) {
+                    //保存后的样式
+                    var _this = this
+                    one.content.forEach(function (v) {
+                        v.uInput.forEach(function (value) {
+                            var key = value.key
+                            if (n === 1) {
+                                if (key === "bidendtime" || key === "bidopentime" || key === "project_startdate" || key === "project_completedate" ||
+                                    key === "publishtime" || key === "signaturedate") {
+                                    var val = value.input
+                                    if (val !== "") {
+                                        var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/;
+                                        var regExp = new RegExp(reg);
+                                        if (!regExp.test(val)) {
+                                            this.$message({
+                                                message: value.title + ",日期格式错误!正确格式:2006-01-02 15:04:05",
+                                                type: 'warning',
+                                                duration: 2000,
+                                                offset: 300
+                                            });
+                                            //alert(value.title+",日期格式错误!正确格式:2006-01-02 15:04:05")
+                                            return
+                                        }
+                                    }
+                                }
+                            }
+                            // 取消全部,通过时判断状态是否处于修改新增等
+                            if (n === "1" && value.status === "-1") {
+                                value.status = n
+                            } else if (n === "-1") {
+                                value.status = n
+                            }
+                        })
 
-                      _this.checkOneStatus({
-                          two: v,
-                          one: one,
-                          type: false
-                      })
-                  });
-              },
-              //验证保存提示
-              open:function (stype) {
-                  this.$confirm('是否保存?', '提示', {
-                      confirmButtonText: '确定',
-                      cancelButtonText: '取消',
-                      type: 'warning'
-                  }).then(() => {
-                      this.upChange(stype)
-                  }).catch(() => {
-                  });
-              },
-              //保存事件
-              upChange: function (stype) {
-                  console.log(this.editData)
-                  var noTagKey = [];
-                  console.log(allCheckFields)
-                  this.editData.filter(function (one) {
-                      if (one.title === "标的信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
-                          if (allCheckFields[one.key] && one.status === -1) {
-                              noTagKey.push(one.title);
-                          }
-                      } else {
-                          one.content.filter(function (v) {
-                              v.uInput.filter(function (u) {
-                                  if (allCheckFields[u.key] && u.status === -1) {
-                                      noTagKey.push(u.title);
-                                  }
-                              })
-                          })
-                      }
-                  })
-                  if (noTagKey.length > 0) {
-                      var fieldText = noTagKey.join(",");
-                      fieldText = fieldText.replace(/\([^\)]*\)/g, "");
-                      this.$alert("未标注字段:" + fieldText);
-                      return
-                  }
-                  var resultStatus = false
-                  if (stype === 1) {//全部字段验证
-                      var checkAllKey = this.editData.filter(function (one) {
-                          var otherOne = one.content.filter(function (v) {
-                              return v.uInput.filter(function (u) {
-                                  return u.status === '-1'
-                              }).length
-                          })
-                          if ((one.title === "标的信息" || one.title === "多包信息" || one.title === "中标候选人信息") && (one.status === "-1")) {
-                              return true
-                          } else {
-                              return otherOne.length
-                          }
-                      })
-                      resultStatus = !Boolean(checkAllKey.length)
-                  } else {//部分字段验证
-                      var otherTag = 0 //标注状态 0:没标 1:标注成功 2:标注失败
-                      var baseTag = 0
-                      this.editData.filter(function (one) {
-                          //多包信息、中标候选人信息在为标注失败的前提下检测标注状态,一个失败不能保存
-                          if (otherTag < 2) {
-                              if (one.title === "标的信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
-                                  if (one.status === "-1") {//没标
-                                      if (otherTag !== 1) {//前一个标注成功不用记录后一个是否未标
-                                          otherTag = 0
-                                      }
-                                  } else {
-                                      if (one.content.length === 0) {//不含子包
-                                          if (one.status === '2') {
-                                              otherTag = 2 //失败
-                                          } else {
-                                              otherTag = 1 //成功
-                                          }
-                                      } else {//含子包
-                                          if (one.title === "标的信息") {
-                                              var otherOne = one.content.filter(function (v) {
-                                                  if (v.status >= 1) {//子信息标注
-                                                      var twoLength = v.uInput.filter(function (u) {
-                                                          return u.status === '-1'
-                                                      })
-                                                      if (twoLength.length > 0) {
-                                                          otherTag = 2
-                                                      }
-                                                      return true //返回此条信息被标注
-                                                  }
-                                              })
-                                              if (otherTag !== 2) {
-                                                  if (otherOne.length > 0) {//
-                                                      otherTag = 1
-                                                  } else {
-                                                      otherTag = 2
-                                                  }
-                                              }
-                                          } else {
-                                              var otherOne = one.content.filter(function (v) {
-                                                  return v.uInput.filter(function (u) {
-                                                      return u.status === '-1'
-                                                  }).length
-                                              })
-                                              if (otherOne.length > 0) {//
-                                                  otherTag = 2
-                                              } else {
-                                                  otherTag = 1
-                                              }
-                                          }
-                                      }
-                                  }
-                              } else {
-                                  var baseOne = one.content.filter(function (v) {
-                                      return v.uInput.filter(function (u) {
-                                          return u.status !== '-1'
-                                      }).length
-                                  })
-                                  if (baseOne.length > 0) {//基本字段
-                                      baseTag = 1
-                                  }
-                              }
-                          }
-                      })
-                      if (otherTag === 0 && baseTag === 1) {
-                          resultStatus = true
-                      } else if (otherTag === 1) {
-                          resultStatus = true
-                      }
-                  }
-                  if (!resultStatus) {
-                      this.$alert("未标注完成");
-                      return
-                  }
-                  var d = JSON.stringify(this.editData);
-                  console.log(d)
-                  var _this = this
-                  $.ajax({
-                      url: "/front/data/mark",
-                      method: "post",
-                      data: {"data": d, "s_infoid": _id, "stype": stype,"s_usertaskid":{{ .T.tid }}},
-                      success: function (res) {
-                          if (res) {
-                              _this.$message({
-                                  message: '保存成功',
-                                  type: 'success',
-                                  duration: 1000,
-                                  offset: 300
-                              });
-                              issave = true//保存成功
-                          }
-                      },
-                      error: function (err) {
-                          alert(err);
-                      }
-                  });
-              },
-              //保存提示
-              // open:function(one, type) {
-              //     this.$confirm('是否保存?', '提示', {
-              //         confirmButtonText: '确定',
-              //         cancelButtonText: '取消',
-              //         type: 'warning'
-              //     }).then(() => {
-              //         if (type) {
-              //             this.saveOneData(one)
-              //         } else {
-              //             this.upChange()
-              //         }
-              //     }).catch(() => {
-              //     });
-              // },
-           //一级保存
-           //    saveOneData: function (one) {
-           //        if (one.title==="标的信息"||one.title==="多包信息"||one.title==="中标候选人信息"){
-           //            if(one.status ===  "-1"){
-           //                this.$alert(one.title+" 未标注完成")
-           //                return
-           //            }else if (one.status !=="-1"){
-           //                var isAlert = one.content.filter(function(v) {
-           //                    return v.uInput.filter(function (u) {
-           //                        return u.status === '-1'
-           //                    }).length
-           //                })
-           //                if (isAlert.length) {
-           //                    this.$alert(one.title+" 未标注完成")
-           //                    return
-           //                }
-           //            }
-           //        }
-           //        onetext = "["+ JSON.stringify(one) +"]";
-           //        $.ajax({
-           //            url:"/center/biaozhu",
-           //            method:"post",
-           //            data: {key:onetext,_id:_id},
-           //            success:function(res){
-           //                if(res){
-           //                    document.getElementById("com-alert-val").innerHtml="保存成功";
-           //                    var label1 = document.getElementById("com-alert");
-           //                    label1.style.display="block";
-           //                    setTimeout(function(){
-           //                            label1.style.display="none";
-           //                        },
-           //                        1000)
-           //                }
-           //            },
-           //            error:function(err){
-           //                alert(err);
-           //            }
-           //        });
-           //    },
+                        _this.checkOneStatus({
+                            two: v,
+                            one: one,
+                            type: false
+                        })
+                    });
+                },
+                //验证保存提示
+                open:function (stype) {
+                    this.$confirm('是否保存?', '提示', {
+                        confirmButtonText: '确定',
+                        cancelButtonText: '取消',
+                        type: 'warning'
+                    }).then(() => {
+                        this.upChange(stype)
+                    }).catch(() => {
+                    });
+                },
+                //保存事件
+                upChange: function (stype) {
+                    console.log(this.editData)
+                    var noTagKey = [];
+                    console.log(allCheckFields)
+                    this.editData.filter(function (one) {
+                        if (one.title === "标的信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
+                            if (allCheckFields[one.key] && one.status === -1) {
+                                noTagKey.push(one.title);
+                            }
+                        } else {
+                            one.content.filter(function (v) {
+                                v.uInput.filter(function (u) {
+                                    if (allCheckFields[u.key] && u.status === -1) {
+                                        noTagKey.push(u.title);
+                                    }
+                                })
+                            })
+                        }
+                    })
+                    if (noTagKey.length > 0) {
+                        var fieldText = noTagKey.join(",");
+                        fieldText = fieldText.replace(/\([^\)]*\)/g, "");
+                        this.$alert("未标注字段:" + fieldText);
+                        return
+                    }
+                    var resultStatus = false
+                    if (stype === 1) {//全部字段验证
+                        var checkAllKey = this.editData.filter(function (one) {
+                            var otherOne = one.content.filter(function (v) {
+                                return v.uInput.filter(function (u) {
+                                    return u.status === '-1'
+                                }).length
+                            })
+                            if ((one.title === "标的信息" || one.title === "多包信息" || one.title === "中标候选人信息") && (one.status === "-1")) {
+                                return true
+                            } else {
+                                return otherOne.length
+                            }
+                        })
+                        resultStatus = !Boolean(checkAllKey.length)
+                    } else {//部分字段验证
+                        var otherTag = 0 //标注状态 0:没标 1:标注成功 2:标注失败
+                        var baseTag = 0
+                        this.editData.filter(function (one) {
+                            //多包信息、中标候选人信息在为标注失败的前提下检测标注状态,一个失败不能保存
+                            if (otherTag < 2) {
+                                if (one.title === "标的信息" || one.title === "多包信息" || one.title === "中标候选人信息") {
+                                    if (one.status === "-1") {//没标
+                                        if (otherTag !== 1) {//前一个标注成功不用记录后一个是否未标
+                                            otherTag = 0
+                                        }
+                                    } else {
+                                        if (one.content.length === 0) {//不含子包
+                                            if (one.status === '2') {
+                                                otherTag = 2 //失败
+                                            } else {
+                                                otherTag = 1 //成功
+                                            }
+                                        } else {//含子包
+                                            if (one.title === "标的信息") {
+                                                var otherOne = one.content.filter(function (v) {
+                                                    if (v.status >= 1) {//子信息标注
+                                                        var twoLength = v.uInput.filter(function (u) {
+                                                            return u.status === '-1'
+                                                        })
+                                                        if (twoLength.length > 0) {
+                                                            otherTag = 2
+                                                        }
+                                                        return true //返回此条信息被标注
+                                                    }
+                                                })
+                                                if (otherTag !== 2) {
+                                                    if (otherOne.length > 0) {//
+                                                        otherTag = 1
+                                                    } else {
+                                                        otherTag = 2
+                                                    }
+                                                }
+                                            } else {
+                                                var otherOne = one.content.filter(function (v) {
+                                                    return v.uInput.filter(function (u) {
+                                                        return u.status === '-1'
+                                                    }).length
+                                                })
+                                                if (otherOne.length > 0) {//
+                                                    otherTag = 2
+                                                } else {
+                                                    otherTag = 1
+                                                }
+                                            }
+                                        }
+                                    }
+                                } else {
+                                    var baseOne = one.content.filter(function (v) {
+                                        return v.uInput.filter(function (u) {
+                                            return u.status !== '-1'
+                                        }).length
+                                    })
+                                    if (baseOne.length > 0) {//基本字段
+                                        baseTag = 1
+                                    }
+                                }
+                            }
+                        })
+                        if (otherTag === 0 && baseTag === 1) {
+                            resultStatus = true
+                        } else if (otherTag === 1) {
+                            resultStatus = true
+                        }
+                    }
+                    if (!resultStatus) {
+                        this.$alert("未标注完成");
+                        return
+                    }
+                    var d = JSON.stringify(this.editData);
+                    console.log(d)
+                    var _this = this
+                    return;
+                    $.ajax({
+                        url: "/front/data/mark",
+                        method: "post",
+                        data: {key: d, _id: _id, stype: stype},
+                        success: function (res) {
+                            if (res) {
+                                _this.$message({
+                                    message: '保存成功',
+                                    type: 'success',
+                                    duration: 1000,
+                                    offset: 300
+                                });
+                                issave = true//保存成功
+                            }
+                        },
+                        error: function (err) {
+                            alert(err);
+                        }
+                    });
+                }
+                //保存提示
+                // open:function(one, type) {
+                //     this.$confirm('是否保存?', '提示', {
+                //         confirmButtonText: '确定',
+                //         cancelButtonText: '取消',
+                //         type: 'warning'
+                //     }).then(() => {
+                //         if (type) {
+                //             this.saveOneData(one)
+                //         } else {
+                //             this.upChange()
+                //         }
+                //     }).catch(() => {
+                //     });
+                // },
+                //一级保存
+                //    saveOneData: function (one) {
+                //        if (one.title==="标的信息"||one.title==="多包信息"||one.title==="中标候选人信息"){
+                //            if(one.status ===  "-1"){
+                //                this.$alert(one.title+" 未标注完成")
+                //                return
+                //            }else if (one.status !=="-1"){
+                //                var isAlert = one.content.filter(function(v) {
+                //                    return v.uInput.filter(function (u) {
+                //                        return u.status === '-1'
+                //                    }).length
+                //                })
+                //                if (isAlert.length) {
+                //                    this.$alert(one.title+" 未标注完成")
+                //                    return
+                //                }
+                //            }
+                //        }
+                //        onetext = "["+ JSON.stringify(one) +"]";
+                //        $.ajax({
+                //            url:"/center/biaozhu",
+                //            method:"post",
+                //            data: {key:onetext,_id:_id},
+                //            success:function(res){
+                //                if(res){
+                //                    document.getElementById("com-alert-val").innerHtml="保存成功";
+                //                    var label1 = document.getElementById("com-alert");
+                //                    label1.style.display="block";
+                //                    setTimeout(function(){
+                //                            label1.style.display="none";
+                //                        },
+                //                        1000)
+                //                }
+                //            },
+                //            error:function(err){
+                //                alert(err);
+                //            }
+                //        });
+                //    },
       }
     })