Browse Source

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

maxiaoshan 3 years ago
parent
commit
c2ff95e271

+ 15 - 5
src/front/remark.go

@@ -14,6 +14,7 @@ import (
 
 func (f *Front) RemarkList() {
 	qu.Catch()
+	pid := qu.ObjToString(f.GetString("pid"))
 	tid := qu.ObjToString(f.GetString("tid"))
 	sourceinfo := qu.ObjToString(f.GetString("s_sourceinfo"))
 	if f.Method() == "POST" {
@@ -41,6 +42,7 @@ func (f *Front) RemarkList() {
 		})
 
 	} else {
+		f.T["pid"] = pid
 		f.T["tid"] = tid
 		f.T["s_sourceinfo"] = sourceinfo
 		_ = f.Render("project/remark_list.html", &f.T)
@@ -48,10 +50,19 @@ func (f *Front) RemarkList() {
 }
 
 func (f *Front) RemarkDetail() {
-	id := f.GetString("gid")
+	pid := f.GetString("pid")
+	project, _ := util.Mgo.FindById(util.PROJECTCOLLNAME, pid, `{"v_fields": 1}`)
+	if len(*project) > 0 {
+		field := make(map[string]bool)
+		vf := (*project)["v_fields"].(map[string]interface{})
+		for k := range vf {
+			field[k] = true
+		}
+		f.T["fields"] = field
+	}
+	did := f.GetString("did")
 	coll := f.GetString("s_sourceinfo")
-	qu.Debug("------------", id, coll)
-	rep := getDetail(id, coll)          //获取本条公告的信息
+	rep := getDetail(did, coll)         //获取本条公告的信息
 	f.T["otherInfo"] = rep["otherInfo"] //展示关联公告信息
 	f.T["moreInfo"] = rep["moreInfo"]   //更多关联公告信息
 	f.T["info"] = rep["info"]
@@ -73,8 +84,7 @@ func (f *Front) RemarkDetail() {
 	f.T["worder_new"] = rep["worder_new"]
 	f.T["pcl_new"] = rep["pcl_new"]
 	f.T["pkg_new"] = rep["pkg_new"]
-	f.T["nextid"] = GetNextDataId(id, coll) //下一条id
-	f.T["fields"] = map[string]bool{"projectname": true}
+	f.T["nextid"] = GetNextDataId(did, coll) //下一条id
 	_ = f.Render("project/remark_detail.html", &f.T)
 }
 

+ 7 - 6
src/web/templates/project/remark_detail.html

@@ -1,9 +1,9 @@
 <!DOCTYPE html>
 <html lang="en">
-{{include "com/inc.html"}}
 <head>
     <meta charset="UTF-8">
     <title>标注中心</title>
+    <script src="/bower_components/jquery/dist/jquery.min.js"></script>
     <link href="/dist/css/normalize.min.css" rel="stylesheet">
     <link href="/dist/css/animate.min.css" rel="stylesheet">
     <link rel="stylesheet" href="/dist/css/zz.css">
@@ -524,6 +524,7 @@
     var nextid = {{ .T.nextid }}
     //基本信息
     var common = {{ .T.common }}
+    console.log(common)
     var uInput = [];
     for (k in common) {
         var tmp = {}
@@ -779,15 +780,15 @@
               key: 'purchasinglist',
               //checkType: {{.T.ck_pclisext}},
               content: pcl_content,
-              // checkAllTag: {{ .T.ck_pclistag }},
-              // status: {{ .T.ck_purchasinglist }},
+              checkAllTag: {{ .T.ck_pclistag }},
+              status: {{ .T.ck_purchasinglist }},
               }, {
               title: '多包信息',
               show:false,
               showCheck: true,
               key: 'package',
               // checkType: {{.T.ck_pkgisext}},
-              // status:{{ .T.ck_package }},
+              status:{{ .T.ck_package }},
               content: p_content
               }, {
               title: '中标候选人信息',
@@ -795,7 +796,7 @@
               showCheck: true,
               key: 'winnerorder',
               // checkType: {{.T.ck_wodrisext}},
-              // status:{{ .T.ck_winnerorder }},
+              status:{{ .T.ck_winnerorder }},
               content: c_content
               }, {
               title: '其余信息',
@@ -1387,7 +1388,7 @@
                   console.log(d)
                   var _this = this
                   $.ajax({
-                      url: "/center/biaozhu",
+                      url: "/front/data/mark",
                       method: "post",
                       data: {key: d, _id: _id, stype: stype},
                       success: function (res) {

+ 3 - 2
src/web/templates/project/remark_list.html

@@ -47,6 +47,7 @@
     menuActive("/front/user/task/list");
 
     let tid = {{ .T.tid }}
+    let pid = {{ .T.pid }}
     let sourceinfo = {{ .T.s_sourceinfo }}
 
     $(function () {
@@ -93,9 +94,9 @@
                 {"data": "v_baseinfo.title", render: function (val, index, row) {
                         let tmp;
                         if (row["re_data"] === 1) {
-                            tmp = '<a style="display: inline-block;cursor:pointer;font-size:16px;color: green" target="_blank" href="/front/user/remark/detail/?gid=' + row._id + '&s_sourceinfo='+sourceinfo+'">' + val + '</a>'
+                            tmp = '<a style="display: inline-block;cursor:pointer;font-size:16px;color: green" target="_blank" href="/front/user/remark/detail/?pid='+pid+'&did=' + row._id + '&s_sourceinfo='+sourceinfo+'">' + val + '</a>'
                         } else {
-                            tmp = '<a style="display: inline-block;cursor:pointer;font-size:16px;color: #428bca" target="_blank" href="/front/user/remark/detail/?gid=' + row._id + '&s_sourceinfo='+sourceinfo+'">' + val + '</a>'
+                            tmp = '<a style="display: inline-block;cursor:pointer;font-size:16px;color: #428bca" target="_blank" href="/front/user/remark/detail/?pid='+pid+'&did=' + row._id + '&s_sourceinfo='+sourceinfo+'">' + val + '</a>'
                         }
                         return tmp
                     }}

+ 1 - 1
src/web/templates/project/task_user_list.html

@@ -112,7 +112,7 @@
                 {
                     "data": "_id", width: "11%", render: function (val, a, row, pos) {
                         tmp = '<div>' +
-                            '<a class="btn btn-sm btn-primary" href="/front/user/remark/list?tid=' + val + '&s_sourceinfo='+row.s_sourceinfo+'">标注</a>&nbsp;&nbsp;' +
+                            '<a class="btn btn-sm btn-primary" href="/front/user/remark/list?pid='+row.s_projectid+'&tid=' + val + '&s_sourceinfo='+row.s_sourceinfo+'">标注</a>&nbsp;&nbsp;' +
                             '</div>';
                         return tmp
                     }