Просмотр исходного кода

Merge branch 'master' of http://39.104.94.153:3000/yf_zd/second

yf_ymm 5 лет назад
Родитель
Сommit
10ec04e1a9

+ 13 - 1
templates/backstageNet/datacenter/contrast.html

@@ -296,10 +296,22 @@
                     farm = dat[i][j].farm;
                     farm = dat[i][j].farm;
                 }
                 }
                 if (i == 5 - 1) {
                 if (i == 5 - 1) {
+                    var currYear = new Date().getFullYear();
+                    line_option.xAxis.data = [currYear-3+'年',currYear-2+'年',currYear-1+'年',currYear+'年']
                     line_option.series[0] = {
                     line_option.series[0] = {
                         type: 'line',
                         type: 'line',
                         name: farm,
                         name: farm,
                         data: arr,
                         data: arr,
+                        itemStyle: {
+                            normal: {
+                                label: {
+                                    show: true,
+                                    position: 'top',
+        //                             formatter: '{c}'
+                                    formatter: '¥{c}'
+                                },
+                            },
+                        },
                     }
                     }
                     var lineChart = echarts.init(document.getElementById('line-chart'));
                     var lineChart = echarts.init(document.getElementById('line-chart'));
                     lineChart.setOption(line_option, true);
                     lineChart.setOption(line_option, true);
@@ -356,7 +368,7 @@
             xAxis: {
             xAxis: {
                 type: 'category',
                 type: 'category',
                 boundaryGap: false,
                 boundaryGap: false,
-                data: ['2016年', '2017年', '2018年', '2019年']
+                data: []
             },
             },
             yAxis: {
             yAxis: {
                 type: 'value',
                 type: 'value',

+ 110 - 43
templates/backstageNet/datacenter/cropdata.html

@@ -168,17 +168,33 @@
         // 指定图表的配置项和数据
         // 指定图表的配置项和数据
         var line_option = {
         var line_option = {
             title: {
             title: {
-                text: '生长周期(天)',
+                text: '面积收益对比',
                 textStyle: {
                 textStyle: {
                     color: '#029eef'
                     color: '#029eef'
                 }
                 }
             },
             },
 
 
-            tooltip: {
+            tooltip : {
                 trigger: 'axis',
                 trigger: 'axis',
+                formatter: function (params, ticket, callback) {
+                    console.log(params);
+                    var showHtm='<span>'+params[0][1]+'</span>农场<br>';
+                    for(var i=0;i<params.length;i++){
+                        //名称
+                        var text = params[i][0];
+                        //值
+                        var value = params[i].value;
+                        if(text == '面积'){
+                            showHtm += text+':'+ value+'亩<br>'
+                        }else{
+                            showHtm += text+':'+ value+'元<br>'
+                        }
+                    }
+                    return showHtm;
+                },
             },
             },
             legend: {
             legend: {
-                data: ['羊', '牛', '梨', '苹果', '香蕉']
+                data: ['面积','收益']
             },
             },
             grid: {
             grid: {
                 left: '0%',
                 left: '0%',
@@ -193,15 +209,17 @@
                     saveAsImage: { show: true }
                     saveAsImage: { show: true }
                 }
                 }
             },
             },
-            xAxis: {
-                type: 'category',
-                boundaryGap: false,
-                data: ['2016年', '2017年', '2018年', '2019年']
-            },
-            yAxis: {
-                type: 'value',
-                data: []
-            },
+            xAxis: [
+                {
+                    type: 'category',
+                    data: []
+                }
+            ],
+            yAxis: [
+                {
+                    type: 'value'
+                }
+            ],
             dataZoom: {
             dataZoom: {
                 show: false,
                 show: false,
                 // start: 70
                 // start: 70
@@ -211,10 +229,10 @@
             ]
             ]
         };
         };
 
 
-        setTimeout(function () {
-            var lineChart = echarts.init(document.getElementById('line-chart'));
-            lineChart.setOption(line_option, true);
-        })
+        // setTimeout(function () {
+        //     var lineChart = echarts.init(document.getElementById('line-chart'));
+        //     lineChart.setOption(line_option, true);
+        // })
 
 
         // 1基于准备好的dom,初始化echarts实例
         // 1基于准备好的dom,初始化echarts实例
         var pieChart = echarts.init(document.getElementById('pie-chart'));
         var pieChart = echarts.init(document.getElementById('pie-chart'));
@@ -285,22 +303,6 @@
                 }
                 }
             ]
             ]
         };
         };
-        // setTimeout(function () {
-        //     var pieChart = echarts.init(document.getElementById('pie-chart'));
-        //     pieChart.setOption(pie_option, true);
-        //     pieChart.on("click", function (param) {
-        //         console.log(param)
-        //         var lineChart = echarts.init(document.getElementById('line-chart'));
-        //         var price = [];
-        //         for (var i = 0; i < 4; i++) {
-        //             price.push(Math.floor(Math.random() * 100));
-        //             if (i == 3) {
-        //                 line_option.series[0].data = price
-        //                 lineChart.setOption(line_option, true);
-        //             }
-        //         }
-        //     });
-        // })
 
 
         // 1基于准备好的dom,初始化echarts实例
         // 1基于准备好的dom,初始化echarts实例
         var barChart = echarts.init(document.getElementById('bar-chart'));
         var barChart = echarts.init(document.getElementById('bar-chart'));
@@ -364,28 +366,93 @@
             success: function (data) {
             success: function (data) {
                 if (data.dat.length) {
                 if (data.dat.length) {
                     var pieData = [];
                     var pieData = [];
+                    var lineChartName = [];
+                    var lineMoneyData = [];
+                    var lineAreaData = [];
                     for (var i = 0; i < data.dat.length; i++) {
                     for (var i = 0; i < data.dat.length; i++) {
                         var currData = {
                         var currData = {
                             "value": data.dat[i].area,
                             "value": data.dat[i].area,
                             "name": data.dat[i].name
                             "name": data.dat[i].name
                         }
                         }
                         pieData.unshift(currData);
                         pieData.unshift(currData);
+                        lineChartName.unshift(data.dat[i].name);
+                        lineMoneyData.unshift(data.dat[i].money);
+                        lineAreaData.unshift(data.dat[i].area);
                         if (i == data.dat.length - 1) {
                         if (i == data.dat.length - 1) {
                             pie_option.series[0].data = pieData;
                             pie_option.series[0].data = pieData;
                             var pieChart = echarts.init(document.getElementById('pie-chart'));
                             var pieChart = echarts.init(document.getElementById('pie-chart'));
                             pieChart.setOption(pie_option, true);
                             pieChart.setOption(pie_option, true);
-                            pieChart.on("click", function (param) {
-                                console.log(param)
-                                var lineChart = echarts.init(document.getElementById('line-chart'));
-                                var price = [];
-                                for (var i = 0; i < 4; i++) {
-                                    price.push(Math.floor(Math.random() * 100));
-                                    if (i == 3) {
-                                        line_option.series[0].data = price
-                                        lineChart.setOption(line_option, true);
+
+                            line_option.xAxis[0].data = lineChartName;
+                            line_option.series[0] = {
+                                data:lineMoneyData,
+                                type:'bar',
+                                name:'收益',
+                                itemStyle: {
+                                    normal: {
+                                        color: function(params) {
+                                            // build a color map as your need.
+                                            var colorList = [
+                                            '#C1232B','#B5C334','#FCCE10','#E87C25','#27727B',
+                                            '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
+                                            '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'
+                                            ];
+                                            return colorList[params.dataIndex]
+                                        },
+                                        label: {
+                                            show: true,
+                                            position: 'top',
+                //                             formatter: '{c}'
+                                            formatter: '¥{c}'
+                                        },
+                                    },
+                                },
+                            };
+                            line_option.series[1] = {
+                                data:lineAreaData,
+                                type:'bar',
+                                name:'面积',
+                                itemStyle: {
+                                    normal: { //静态的时候显示的默认样式n
+                              //好,这里就是重头戏了,定义一个list,然后根据所以取得不同的值,这样就实现了,
+                                        color: function(params) {
+                                            // build a color map as your need.
+                                            var colorList = [
+                                            '#C1232B','#B5C334','#FCCE10','#E87C25','#27727B',
+                                            '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
+                                            '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'
+                                            ];
+                                            return colorList[params.dataIndex]
+                                        },
+                              //以下为是否显示,显示位置和显示格式的设置了
+                                        label: {
+                                            show: true,
+                                            position: 'top',
+                                            formatter: '{c}亩'
+                                        },
+                                    },
+                                    emphasis:{  //鼠标移入动态的时候显示的默认样式
+                                    //   color:'green'
                                     }
                                     }
-                                }
-                            });
+                                },
+                                barWidth:20,
+                            };
+                            // var linelegend = { data:lineChartName };
+                            // line_option.legend = linelegend;
+                            lineChart.setOption(line_option, true);
+
+                            // pieChart.on("click", function (param) {
+                            //     console.log(param)
+                            //     var lineChart = echarts.init(document.getElementById('line-chart'));
+                            //     var price = [];
+                            //     for (var i = 0; i < 4; i++) {
+                            //         price.push(Math.floor(Math.random() * 100));
+                            //         if (i == 3) {
+                            //             line_option.series[0].data = price
+                            //             lineChart.setOption(line_option, true);
+                            //         }
+                            //     }
+                            // });
 
 
                         }
                         }
                     }
                     }

+ 46 - 32
templates/backstageNet/datacenter/industrydata.html

@@ -137,7 +137,7 @@
                             <tr>
                             <tr>
                                 <td>农场名称</td>
                                 <td>农场名称</td>
                                 <td>农场面积</td>
                                 <td>农场面积</td>
-                                <td>负责人</td>
+                                <!-- <td>负责人</td> -->
                                 <td>农场收益</td>
                                 <td>农场收益</td>
                             </tr>
                             </tr>
                         </thead>
                         </thead>
@@ -262,11 +262,11 @@
                 trigger: 'item',
                 trigger: 'item',
                 formatter: "{a} <br/>{b} : {c} ({d}%)"
                 formatter: "{a} <br/>{b} : {c} ({d}%)"
             },
             },
-            // legend: {
-            //     orient: 'vertical',
-            //     x: 'left',
-            //     data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎']
-            // },
+            legend: {
+                orient : 'vertical',
+                x : 'right',
+                data: []
+            },
             toolbox: {
             toolbox: {
                 show: true,
                 show: true,
                 x: 'right',
                 x: 'right',
@@ -290,35 +290,48 @@
             series: [
             series: [
                 {
                 {
                     name: '收益占比',
                     name: '收益占比',
-                    type: 'pie',
-                    radius: '80%',
-                    center: ['50%', '50%'],
-                    data: [
-                        { value: 335, name: '农场一' },
-                        { value: 310, name: '农场二' },
-                        { value: 234, name: '农场三' },
-                        { value: 135, name: '农场四' },
-                        { value: 548, name: '农场五' }
-                    ],
-                    itemStyle: {
-                        normal: {
-                            label: {            //饼图图形上的文本标签
-                                show: true,
-                                position: 'inner', //标签的位置
-                                textStyle: {
-                                    color: "#fff",
-                                    fontWeight: 300,
-                                    fontSize: 14    //文字的字体大小
-                                },
-                                formatter: '{b}\n({d}%)'
+                    type:'pie',
+                    radius : ['50%', '70%'],
+                    itemStyle : {
+                        normal : {
+                            label : {
+                                show : false
                             },
                             },
-
-                            labelLine: {
-                                show: false   //隐藏标示线
+                            labelLine : {
+                                show : false
+                            }
+                        },
+                        emphasis : {
+                            label : {
+                                show : true,
+                                position : 'center',
+                                textStyle : {
+                                    fontSize : '14',
+                                    fontWeight : 'bold'
+                                }
                             }
                             }
                         }
                         }
                     },
                     },
-                }
+                    data: [],
+                    // itemStyle: {
+                    //     normal: {
+                    //         label: {            //饼图图形上的文本标签
+                    //             show: true,
+                    //             position: 'inner', //标签的位置
+                    //             textStyle: {
+                    //                 color: "#fff",
+                    //                 fontWeight: 300,
+                    //                 fontSize: 14    //文字的字体大小
+                    //             },
+                    //             formatter: '{b}\n({d}%)'
+                    //         },
+
+                    //         labelLine: {
+                    //             show: false   //隐藏标示线
+                    //         }
+                    //     }
+                    // },
+                },
             ]
             ]
         };
         };
         setTimeout(function () {
         setTimeout(function () {
@@ -357,6 +370,7 @@
                                 bar_option.series[0].data = money;
                                 bar_option.series[0].data = money;
                                 var barChart = echarts.init(document.getElementById('bar-chart'));
                                 var barChart = echarts.init(document.getElementById('bar-chart'));
                                 barChart.setOption(bar_option)
                                 barChart.setOption(bar_option)
+                                // pie_option.legend = { data:farm,orient : 'vertical',x : 'right',};
                                 pie_option.series[0].data = pieData;
                                 pie_option.series[0].data = pieData;
                                 var pieChart = echarts.init(document.getElementById('pie-chart'));
                                 var pieChart = echarts.init(document.getElementById('pie-chart'));
                                 pieChart.setOption(pie_option, true);
                                 pieChart.setOption(pie_option, true);
@@ -414,7 +428,7 @@
             for (var i = 0; i < data.length; i++) {
             for (var i = 0; i < data.length; i++) {
                 var manage = data[i].manage ? data[i].manage : '暂无';
                 var manage = data[i].manage ? data[i].manage : '暂无';
                 html += "<tr>";
                 html += "<tr>";
-                html += "<td>" + data[i].farm + "</td><td>" + data[i].area + "</td><td><span class='redClolr'>" + manage + "</span></td><td>" + data[i].money + "</td>";
+                html += "<td>" + data[i].farm + "</td><td>" + data[i].area + "</td><td>" + data[i].money + "</td>";
                 html += "</tr>";
                 html += "</tr>";
                 if (i == data.length - 1) {
                 if (i == data.length - 1) {
                     $(table).html(html);
                     $(table).html(html);

+ 2 - 2
templates/backstageNet/infoManage/pickManageList.html

@@ -14,12 +14,12 @@
         <a href="JavaScript:;" class="passBtn"  onclick="passFun('{{msg.id}}')">通过</a>
         <a href="JavaScript:;" class="passBtn"  onclick="passFun('{{msg.id}}')">通过</a>
         |
         |
         {% else %}
         {% else %}
-            {% if msg.hatType == 1 %}
+            <!-- {% if msg.hatType == 1 %}
             <button type="button" onclick="hatPush('{{msg.id}}',1)" class="layui-btn layui-btn-xs layui-btn-danger hatPush"><i class="layui-icon layui-icon-fire"></i></button>
             <button type="button" onclick="hatPush('{{msg.id}}',1)" class="layui-btn layui-btn-xs layui-btn-danger hatPush"><i class="layui-icon layui-icon-fire"></i></button>
             {% else %}
             {% else %}
             <button type="button" onclick="hatPush('{{msg.id}}',0)" class="layui-btn layui-btn-xs layui-btn-primary rejectBtn"><i class="layui-icon layui-icon-fire"></i></button>
             <button type="button" onclick="hatPush('{{msg.id}}',0)" class="layui-btn layui-btn-xs layui-btn-primary rejectBtn"><i class="layui-icon layui-icon-fire"></i></button>
             {% endif %}
             {% endif %}
-            <span>|</span>
+            <span>|</span> -->
         {% endif %}
         {% endif %}
         <a href="JavaScript:;" class="delBtn" onclick="delFun('{{msg.id}}')">删除</a>
         <a href="JavaScript:;" class="delBtn" onclick="delFun('{{msg.id}}')">删除</a>
         |
         |

+ 132 - 117
templates/backstageNet/limit/expert.html

@@ -133,6 +133,7 @@
             width: 90%;
             width: 90%;
             margin-top: 30px;
             margin-top: 30px;
         }
         }
+
         .uploadImg {
         .uploadImg {
             position: absolute;
             position: absolute;
             margin: 10px 0;
             margin: 10px 0;
@@ -142,6 +143,7 @@
             border: 1px solid #b8b8b8;
             border: 1px solid #b8b8b8;
             cursor: pointer;
             cursor: pointer;
         }
         }
+
         .uploadImgIcon {
         .uploadImgIcon {
             background: url(../../static/imgs/uploadImgIcon.png) no-repeat center;
             background: url(../../static/imgs/uploadImgIcon.png) no-repeat center;
             background-size: 80% 80%;
             background-size: 80% 80%;
@@ -152,6 +154,12 @@
             right: 40px;
             right: 40px;
             top: 55px;
             top: 55px;
         }
         }
+
+        .layui-upload-img {
+            width: 92px;
+            height: 92px;
+            margin: 0 10px 10px 0;
+        }
     </style>
     </style>
 </head>
 </head>
 
 
@@ -176,115 +184,8 @@
         </div>
         </div>
 
 
         <!-- 内容 -->
         <!-- 内容 -->
-        <div class="expertGather">
-            <div class="expertGatherItem">
-                <img src="{% static '/imgs/cornerIcon.png' %}" alt="">
-                <div class="expertInner">
-                    <div class="expertImg">
-                        <img src="{% static '/imgs/Customer.png'%}" alt="">
-                    </div>
-                    <div class="expertTxt">
-                        <h1>吴玉金教授</h1>
-                        <p>简介:</p>
-                        <div class="desc">
-                            吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授</div>
-                        <div class="ctrlBtn">
-                            <a href="tencent://message/?uin=405204799&Site=sc.chinaz.com&Menu=yes">视频电话</a>
-                            <a href="tencent://message/?uin=405204799&Site=sc.chinaz.com&Menu=yes">发信息</a>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <div class="expertGatherItem">
-                <img src="{% static '/imgs/cornerIcon.png' %}" alt="">
-                <div class="expertInner">
-                    <div class="expertImg">
-                        <img src="{% static '/imgs/Customer.png'%}" alt="">
-                    </div>
-                    <div class="expertTxt">
-                        <h1>吴玉金教授</h1>
-                        <p>简介:</p>
-                        <div class="desc">
-                            吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授</div>
-                        <div class="ctrlBtn">
-                            <a href="tencent://message/?uin=405204799&Site=sc.chinaz.com&Menu=yes">视频电话</a>
-                            <a href="tencent://message/?uin=405204799&Site=sc.chinaz.com&Menu=yes">发信息</a>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <div class="expertGatherItem">
-                <img src="{% static '/imgs/cornerIcon.png' %}" alt="">
-                <div class="expertInner">
-                    <div class="expertImg">
-                        <img src="{% static '/imgs/Customer.png'%}" alt="">
-                    </div>
-                    <div class="expertTxt">
-                        <h1>吴玉金教授</h1>
-                        <p>简介:</p>
-                        <div class="desc">
-                            吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授</div>
-                        <div class="ctrlBtn">
-                            <a href="tencent://message/?uin=405204799&Site=sc.chinaz.com&Menu=yes">视频电话</a>
-                            <a href="tencent://message/?uin=405204799&Site=sc.chinaz.com&Menu=yes">发信息</a>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <div class="expertGatherItem">
-                <img src="{% static '/imgs/cornerIcon.png' %}" alt="">
-                <div class="expertInner">
-                    <div class="expertImg">
-                        <img src="{% static '/imgs/Customer.png'%}" alt="">
-                    </div>
-                    <div class="expertTxt">
-                        <h1>吴玉金教授</h1>
-                        <p>简介:</p>
-                        <div class="desc">
-                            吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授</div>
-                        <div class="ctrlBtn">
-                            <a href="tencent://message/?uin=405204799&Site=sc.chinaz.com&Menu=yes">视频电话</a>
-                            <a href="tencent://message/?uin=405204799&Site=sc.chinaz.com&Menu=yes">发信息</a>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <div class="expertGatherItem">
-                <img src="{% static '/imgs/cornerIcon.png' %}" alt="">
-                <div class="expertInner">
-                    <div class="expertImg">
-                        <img src="{% static '/imgs/Customer.png'%}" alt="">
-                    </div>
-                    <div class="expertTxt">
-                        <h1>吴玉金教授</h1>
-                        <p>简介:</p>
-                        <div class="desc">
-                            吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授</div>
-                        <div class="ctrlBtn">
-                            <a href="tencent://message/?uin=405204799&Site=sc.chinaz.com&Menu=yes">视频电话</a>
-                            <a href="tencent://message/?uin=405204799&Site=sc.chinaz.com&Menu=yes">发信息</a>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <div class="expertGatherItem">
-                <img src="{% static '/imgs/cornerIcon.png' %}" alt="">
-                <div class="expertInner">
-                    <div class="expertImg">
-                        <img src="{% static '/imgs/Customer.png'%}" alt="">
-                    </div>
-                    <div class="expertTxt">
-                        <h1>吴玉金教授</h1>
-                        <p>简介:</p>
-                        <div class="desc">
-                            吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授吴玉金教授</div>
-                        <div class="ctrlBtn">
-                            <a href="tencent://message/?uin=405204799&Site=sc.chinaz.com&Menu=yes">视频电话</a>
-                            <a href="tencent://message/?uin=405204799&Site=sc.chinaz.com&Menu=yes">发信息</a>
-                        </div>
-                    </div>
-                </div>
-            </div>
+        <div class="expertGather" id="expertGather">
+
         </div>
         </div>
 
 
         <!-- 筛选框 -->
         <!-- 筛选框 -->
@@ -303,17 +204,17 @@
                     <div class="layui-form-item">
                     <div class="layui-form-item">
                         <label class="layui-form-label">联系QQ:</label>
                         <label class="layui-form-label">联系QQ:</label>
                         <div class="layui-input-inline">
                         <div class="layui-input-inline">
-                            <input type="text" name="curr_var" required lay-verify="required" placeholder="请输入联系的QQ号"
+                            <input type="text" name="relation" required lay-verify="required" placeholder="请输入联系的QQ号"
                                 autocomplete="off" class="layui-input">
                                 autocomplete="off" class="layui-input">
                         </div>
                         </div>
                     </div>
                     </div>
 
 
                     <div class="layui-form-item">
                     <div class="layui-form-item">
                         <label class="layui-form-label">专家照片:</label>
                         <label class="layui-form-label">专家照片:</label>
-                        <div class="layui-input-inline" style="margin-top: 0; margin-bottom: 65px;">
+                        <div class="layui-input-inline">
                             <button type="button" class="uploadImg uploadImgIcon" id="pickImg"></button>
                             <button type="button" class="uploadImg uploadImgIcon" id="pickImg"></button>
                             <!-- 隐藏的input -->
                             <!-- 隐藏的input -->
-                            <input type="hidden" id="img_url" name="img_url" value="" />
+                            <input type="hidden" id="img_url" name="pic" value="" />
                             <div class="layui-upload-list">
                             <div class="layui-upload-list">
                                 <img class="layui-upload-img" id="demo1">
                                 <img class="layui-upload-img" id="demo1">
                                 <p id="demoText"></p>
                                 <p id="demoText"></p>
@@ -323,8 +224,8 @@
 
 
                     <div class="layui-form-item layui-form-text">
                     <div class="layui-form-item layui-form-text">
                         <label class="layui-form-label">专家介绍:</label>
                         <label class="layui-form-label">专家介绍:</label>
-                        <div class="layui-input-inline">
-                            <textarea name="content" id="editor1" lay-verify="required" placeholder="请输入介绍"
+                        <div class="layui-input-block">
+                            <textarea name="desc" id="desc" lay-verify="required" placeholder="请输入介绍"
                                 class="layui-textarea"></textarea>
                                 class="layui-textarea"></textarea>
                         </div>
                         </div>
                     </div>
                     </div>
@@ -351,6 +252,117 @@
 
 
 </body>
 </body>
 <script>
 <script>
+    var laypage, form, upload;
+    layui.use(['laypage', 'form', 'upload'], function () {
+        laypage = layui.laypage;
+        form = layui.form;
+        upload = layui.upload;
+        var uploadInst = upload.render({
+            elem: '#pickImg'
+            , url: 'expert_img'
+            , field: 'upload'
+            , accept: 'images' //只允许上传图片
+            // , acceptMime: 'image/*' //只筛选图片
+            // ,exts: 'jpg|jpeg' 
+            , size: 1024 * 2 //限定大小
+            , xhr: function () { } //上传视频进度条
+            , before: function (obj) {
+                $('.uploadImg').removeClass('uploadImgIcon')
+                //预读本地文件示例,不支持ie8
+                obj.preview(function (index, file, result) {
+                    $('#demo1').attr('src', result); //图片链接(base64)
+                });
+            }
+            , done: function (res) {
+                //如果上传失败
+                if (res.code == 0) {
+                    //上传成功
+                    document.getElementById("img_url").value = res.data.src;
+                } else {
+                    return layer.msg('上传失败');
+                }
+
+
+            }
+            , error: function () {
+                //演示失败状态,并实现重传
+                var demoText = $('#demoText');
+                demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
+                demoText.find('.demo-reload').on('click', function () {
+                    uploadInst.upload();
+                });
+            }
+        });
+
+        //监听提交
+        form.on('submit(formDemo)', function (data) {
+            window.id = data.field.id
+            var img_url = $('#img_url').val();
+            if (!img_url) {
+                layer.msg("请上传专家照片", { icon: 5 });
+                return false;
+            }
+            $.ajax({
+                url: 'expert_info',
+                data: $("#formDiv").serialize(),
+                type: 'post',
+                success: function (data) {
+                    if (data) {
+
+                        clearForm()
+                    } else {
+
+                    }
+                },
+                error: function (type) {
+
+                }
+            })
+            return false;
+
+        });
+        getData('expert_info', 1)
+        function getData(url, page) {
+            $.ajax({
+                url: url,
+                type: 'get',
+                data: {
+                    page: page
+                },
+                dataType: 'html',
+                success: function (data) {
+                    $('#expertGather').html(data);
+                    laypage.render({
+                        elem: 'page' //注意,这里的 test1 是 ID,不用加 # 号
+                        // , count: 30
+                        , count: $('#totalPage').val()
+                        , theme: '#2ca9f9'
+                        , layout: ['prev', 'page', 'next', 'skip']
+                        , jump: function (obj, first) {
+                            if (!first) {
+                                $.ajax({
+                                    url: url,
+                                    type: 'get',
+                                    data: { page: obj.curr },
+                                    dataType: 'html',
+                                    success: function (data) {
+                                        $('#expertGather').html(data);
+                                    },
+                                    error: function (type) {
+                                        console.log(type)
+                                    }
+                                })
+                            }
+                        }
+                    });
+                },
+                error: function (type) {
+                    // console.log(type)
+                }
+            })
+        }
+    })
+
     function selectModelFun() {
     function selectModelFun() {
         layui.use(['layer'], function () {
         layui.use(['layer'], function () {
             layer = layui.layer;
             layer = layui.layer;
@@ -362,18 +374,21 @@
                 cancel: function () {
                 cancel: function () {
                     // 右上角关闭事件的逻辑
                     // 右上角关闭事件的逻辑
                     clearForm()
                     clearForm()
-                    sessionStorage.removeItem('seelectID')
                 }
                 }
             })
             })
         })
         })
     }
     }
 
 
     function clearForm() {
     function clearForm() {
+        form.val('newsFormDiv', {
+            "title": "",
+            "writer": "",
+            "intro": ""
+        });
         $('#img_url').val('');
         $('#img_url').val('');
         $('.uploadImg').addClass('uploadImgIcon');
         $('.uploadImg').addClass('uploadImgIcon');
         $('#demo1').removeAttr('src'); //图片链接(base64)
         $('#demo1').removeAttr('src'); //图片链接(base64)
-        layer.closeAll(); //疯狂模式,关闭所有层
-        location.reload()
+        layer.closeAll();
     }
     }
 </script>
 </script>
 
 

+ 22 - 0
templates/backstageNet/limit/expertList.html

@@ -0,0 +1,22 @@
+{% if expert|length %} {% for msg in expert %}
+<div class="expertGatherItem">
+    <img src="{% static '/imgs/cornerIcon.png' %}" alt="">
+    <div class="expertInner">
+        <div class="expertImg">
+            <img src="http://192.168.1.9:8000{{msg.pic}}" alt="">
+        </div>
+        <div class="expertTxt">
+            <h1>{{msg.name}}</h1>
+            <p>简介:</p>
+            <div class="desc">
+                {{msg.desc}}</div>
+            <div class="ctrlBtn">
+                <a href="tencent://message/?uin={{msg.relation}}&Site=sc.chinaz.com&Menu=yes">视频电话</a>
+            </div>
+        </div>
+    </div>
+</div>
+{% endfor %} {% else %}
+<div style="text-align:center;line-height: 200px;">暂无数据</div>
+{% endif %}
+<input type="hidden" value="{{nums}}" id="totalPage">

+ 2 - 305
templates/backstageNet/limit/limit.html

@@ -155,315 +155,12 @@
     <script src="{% static '/lib/js/jquery-2.1.4.min.js'%}"></script>
     <script src="{% static '/lib/js/jquery-2.1.4.min.js'%}"></script>
     <script src="{% static '/lib/layui/layui.js'%}"></script>
     <script src="{% static '/lib/layui/layui.js'%}"></script>
     <script src="{% static '/js/backstageNet/common.js'%}"></script>
     <script src="{% static '/js/backstageNet/common.js'%}"></script>
+    <script src="{% static '/js/backstageNet/limit/limit.js'%}"></script>
     <script>
     <script>
         layui.use(['element'], function () {
         layui.use(['element'], function () {
             var element = layui.element;
             var element = layui.element;
         })
         })
-        var navList = [
-            {
-                "id": 1,
-                "title": "首页",
-                "icon": "&#xe626;",
-                "url": "map",
-                "children": []
-            },
-            {
-                "id": 2,
-                "title": "设备分配",
-                "icon": "&#xe609;",
-                "url": "equipallot",
-                "disabled": "true",
-                "children": []
-            },
-            {
-                "id": 3,
-                "title": "信息发布",
-                "icon": "&#xe765;",
-                "url": "",
-                "children": [
-                    {
-                        "id": 3.1,
-                        "title": "新闻资讯",
-                        "url": "news_pub",
-                    },
-                    {
-                        "id": 3.2,
-                        "title": "视频资讯",
-                        "url": "video_pub",
-                    },
-                    {
-                        "id": 3.2,
-                        "title": "产品展厅",
-                        "url": "equip_pub",
-                    },
-                    {
-                        "id": 3.3,
-                        "title": "四季采摘",
-                        "url": "garden_pub",
-                    },
-                    {
-                        "id": 3.4,
-                        "title": "民宿导览",
-                        "url": "dorm_pub",
-                    },
-                    {
-                        "id": 3.5,
-                        "title": "旅游景点",
-                        "url": "sightsee_pub",
-                    },
-                ]
-            },
-            {
-                "id": 4,
-                "title": "我的发布",
-                "icon": "&#xe609;",
-                "url": "my_pub",
-                "disabled": "true",
-                "children": []
-            },
-            {
-                "id": 5,
-                "title": "视频监控",
-                "icon": "&#xe610;",
-                "url": "jkview",
-                "children": []
-            },
-            {
-                "id": 6,
-                "title": "传感及控制",
-                "icon": "&#xe654;",
-                "url": "",
-                "children": [
-                    {
-                        "id": 6.1,
-                        "title": "控制模块",
-                        "url": "qxzcontrol",
-                    },
-                    {
-                        "id": 6.2,
-                        "title": "趋势分析",
-                        "url": "qxzchart",
-                    },
-                    {
-                        "id": 6.3,
-                        "title": "数据统计",
-                        "url": "qxz_status",
-                    }
-                ]
-            },
-            {
-                "id": 7,
-                "title": "预警中心",
-                "icon": "&#xe634;",
-                "url": "",
-                "children": [
-                    {
-                        "id": 7.1,
-                        "title": "阈值设置",
-                        "url": "qxz_warning_view",
-                    },
-                    {
-                        "id": 7.2,
-                        "title": "生产方式设置",
-                        "url": "productionset",
-                    },
-                    {
-                        "id": 7.3,
-                        "title": "预警记录",
-                        "url": "qxz_warning_list",
-                    },
-                ]
-            },
-            {
-                "id": 8,
-                "title": "开心农场",
-                "icon": "&#xe603;",
-                "url": "",
-                "children": [
-                    {
-                        "id": 8.1,
-                        "title": "我的农场",
-                        "url": "person_farm_edit",
-                    },
-                    {
-                        "id": 8.2,
-                        "title": "农场管理",
-                        "url": "garden_manage_view",
-                    },
-                    {
-                        "id": 8.3,
-                        "title": "人员管理",
-                        "url": "garden_user_view",
-                    },
-                    {
-                        "id": 8.4,
-                        "title": "库存管理",
-                        "url": "repertory_view",  //物料管理    
-                    },
-                    {
-                        "id": 8.5,
-                        "title": "种植管理",
-                        "url": "cropcount",
-                    },
-                    {
-                        "id": 8.6,
-                        "title": "入库管理",
-                        "url": "pick",
-                    },
-                    {
-                        "id": 8.7,
-                        "title": "销售管理",
-                        "url": "sell_view",
-                    }
-                ]
-            },
-            {
-                "id": 9,
-                "title": "数据中心",
-                "icon": "&#xe603;",
-                "url": "",
-                "children": [
-                    {
-                        "id": 9.1,
-                        "title": "产业数据",
-                        "url": "industrydata",
-                    },
-                    {
-                        "id": 9.2,
-                        "title": "类型分析",
-                        "url": "type",
-                    },
-                    {
-                        "id": 9.3,
-                        "title": "对比分析",
-                        "url": "contrast",
-                    },
-                ]
-            },
-            {
-                "id": 10,
-                "title": "通知公告",
-                "icon": "&#xe765;",
-                "url": "",
-                "disabled": "true",
-                "children": [
-                    {
-                        "id": 10.1,
-                        "title": "发布公告",
-                        "url": "policy_pub",
-                        "disabled": "true",
-                    },
-                    {
-                        "id": 10.2,
-                        "title": "查看公告",
-                        "url": "policy_list_view",
-                        "disabled": "true",
-                    },
-                ]
-            },
-            {
-                "id": 11,
-                "title": "信息审核",
-                "icon": "&#xe765;",
-                "url": "",
-                "disabled": "true",
-                "children": [
-                    {
-                        "id": 11.1,
-                        "title": "新闻资讯",
-                        "url": "news_check",
-                        "disabled": "true",
-                    },
-
-                    {
-                        "id": 11.2,
-                        "title": "视频资讯",
-                        "url": "video_check",
-                        "disabled": "true",
-                    },
-                    {
-                        "id": 11.3,
-                        "title": "产品展厅",
-                        "url": "equip_check",
-                        "disabled": "true",
-                    },
-                    {
-                        "id": 11.4,
-                        "title": "四季采摘",
-                        "url": "garden_check",
-                        "disabled": "true",
-                    },
-                    {
-                        "id": 11.5,
-                        "title": "民宿导览",
-                        "url": "dorm_check",
-                        "disabled": "true",
-                    },
-                    {
-                        "id": 11.6,
-                        "title": "旅游景点",
-                        "url": "sightsee_check",
-                        "disabled": "true",
-                    },
-                    {
-                        "id": 11.7,
-                        "title": "个人农场",
-                        "url": "farm_check",
-                        "disabled": "true",
-                    },
-                ]
-            },
-            {
-                "id": 12,
-                "title": "权限",
-                "icon": "&#xe765;",
-                "url": "limit_view",
-                "disabled": "true",
-                "children": []
-            },
-            {
-                "id": 13,
-                "title": "系统设置",
-                "icon": "&#xe765;",
-                "url": "",
-                "disabled": "true",
-                "children": [
-                    {
-                        "id": 13.1,
-                        "title": "用户管理",
-                        "url": "person_view",
-                        "disabled": "true",
-                    },
-                    {
-                        "id": 13.2,
-                        "title": "修改密码",
-                        "url": "policy_list_view",
-                        "disabled": "true",
-                    }
-                ]
-            },
-			{
-                "id": 14,
-                "title": "专家诊断",
-                "icon": "&#xe765;",
-                "url": "",
-                "disabled": "true",
-                "children": [
-                    {
-                        "id": 14.1,
-                        "title": "在线专家",
-                        "url": "expert",
-                        "disabled": "true",
-                    },
-                    {
-                        "id": 14.2,
-                        "title": "知识库",
-                        "url": "learning_depot",
-                        "disabled": "true",
-                    }
-                ]
-            },
-        ]
+        
 
 
         $.ajax({
         $.ajax({
             url: 'limit',
             url: 'limit',

+ 11 - 11
templates/static/js/limit/limit.js

@@ -128,11 +128,11 @@ var navList = [
                 "title": "农场管理",
                 "title": "农场管理",
                 "url": "garden_manage_view",
                 "url": "garden_manage_view",
             },
             },
-            {
-                "id": 8.3,
-                "title": "人员管理",
-                "url": "garden_user_view",
-            },
+            // {
+            //     "id": 8.3,
+            //     "title": "人员管理",
+            //     "url": "garden_user_view",
+            // },
             {
             {
                 "id": 8.4,
                 "id": 8.4,
                 "title": "库存管理",
                 "title": "库存管理",
@@ -293,12 +293,12 @@ var navList = [
                 "url": "expert",
                 "url": "expert",
                 "disabled": "true",
                 "disabled": "true",
             },
             },
-            {
-                "id": 14.2,
-                "title": "知识库",
-                "url": "learn_depot",
-                "disabled": "true",
-            }
+            // {
+            //     "id": 14.2,
+            //     "title": "知识库",
+            //     "url": "learn_depot",
+            //     "disabled": "true",
+            // }
         ]
         ]
     },
     },
 ]
 ]