Ver código fonte

Merge branch 'master' of http://git.jieweizhineng.com/adslunk/office_automation

qiuzijian 1 ano atrás
pai
commit
e1b0727cb0

BIN
images/custom/bg.png


+ 5 - 0
webmain/flow/input/inputjs/mode_meeting.js

@@ -10,6 +10,11 @@ function initbodys(){
         changetotal();
     });
 
+    c.onselectdata['meeting_room']=function(d) {
+        form('room_id').value=d.value;
+        console.log(d.value);
+    }
+
 }
 
 

+ 4 - 1
webmain/flow/input/inputjs/mode_meeting_key.js

@@ -1,4 +1,7 @@
 //流程模块【meeting_key.党委会议】下录入页面自定义js页面,初始函数
 function initbodys(){
-	
+	c.onselectdata['meeting_room']=function(d) {
+        form('room_id').value=d.value;
+        console.log(d.value);
+    }
 }

+ 1 - 1
webmain/flow/page/input_meeting.html

@@ -30,7 +30,7 @@
     </tr>
     <tr>
         <td height="34" width="15%" align="right" class="ys1">*^meeting_room^</td>
-        <td width="35%" class="ys2">{meeting_room}</td>
+        <td width="35%" class="ys2">{meeting_room}{room_id}{meet_state}</td>
         <td height="34" align="right" class="ys1"></td>
         <td class="ys2"></td>
     </tr>

+ 1 - 1
webmain/flow/page/input_meeting_key.html

@@ -14,7 +14,7 @@
         <td height="34" width="15%" align="right" class="ys1">*^compere^</td>
         <td width="35%" class="ys2">{compere}</td>
         <td height="34" align="right" class="ys1">*^meeting_room^</td>
-        <td class="ys2">{meeting_room}</td>
+        <td class="ys2">{meeting_room}{room_id}{meet_state}</td>
     </tr>
     <tr>
         <td height="34" align="right" class="ys1">*^attendees^</td>

Diferenças do arquivo suprimidas por serem muito extensas
+ 40 - 1
webmain/flow/page/view_meeting_key_0.html


+ 17 - 16
webmain/model/flow/meeting_keyModel.php

@@ -16,22 +16,22 @@ class flow_meeting_keyClassModel extends flowModel
     protected function flowsubmit($na, $sm) {
         if ($na != '编辑') {
             // 提交时初始化为0
-            m('meeting_topics')->update(["topic_state"=>0], 'mid='.$this->id);
-            m('meeting_key')->update(["meet_state"=>1], 'id='.$this->id);
-        }
-        $meet = m('meeting')->getone("id={$this->id}",'start_time');
-
-        if (isset($meet['start_time']) && strtotime($meet['start_time']) > time()) {
-            $topic = m('meeting_topics')->getone("mid={$this->id}",'id, topic_state', 'sort');
-            if (isset($topic['id']) && $topic['topic_state'] < 2) {
-                m('meeting')->firstMeetingTopicStart($this->id);
-            }
-        } else {
-            $topic = m('meeting_topics')->getone("mid={$this->id}",'id, topic_state', 'sort');
-            if (isset($topic['id']) && $topic['topic_state'] < 2) {
-                m('meeting')->update(["meet_state"=>1], "id=".$topic['id']);
-            }
+//            m('meeting_topics')->update(["topic_state"=>0], 'mid='.$this->id);
+//            m('meeting_key')->update(["meet_state"=>1], 'id='.$this->id);
         }
+//        $meet = m('meeting')->getone("id={$this->id}",'start_time');
+//
+//        if (isset($meet['start_time']) && strtotime($meet['start_time']) > time()) {
+//            $topic = m('meeting_topics')->getone("mid={$this->id}",'id, topic_state', 'sort');
+//            if (isset($topic['id']) && $topic['topic_state'] < 2) {
+//                m('meeting')->firstMeetingTopicStart($this->id);
+//            }
+//        } else {
+//            $topic = m('meeting_topics')->getone("mid={$this->id}",'id, topic_state', 'sort');
+//            if (isset($topic['id']) && $topic['topic_state'] < 2) {
+//                m('meeting')->update(["meet_state"=>1], "id=".$topic['id']);
+//            }
+//        }
     }
 
 
@@ -58,8 +58,9 @@ class flow_meeting_keyClassModel extends flowModel
             }
         }
         // 会议开始时的处理
-        if ($stime <= $time && $nzt != 2) {
+        if ($stime <= $time && $etime > $time) {
             $nzt = 1;
+            // 会议开始,议题自动调整开始第一项
             $topic = m('meeting_topics')->getone("mid={$this->id}",'id, topic_state', 'sort');
             if (isset($topic['id']) && $topic['topic_state'] < 2) {
                 m('meeting')->firstMeetingTopicStart($this->id);

+ 24 - 5
webmain/model/meetingModel.php

@@ -7,7 +7,7 @@ class meetingClassModel extends Model
 
     public function initModel()
     {
-        $this->hyarra = array('正常', '会议中', '结束', '取消');
+        $this->hyarra = array('等待中', '会议中', '结束', '取消');
         $this->ytarra = array('等待', '待进行', '进行中', '已结束');
         $this->hyarrb = array('green', 'blue', '#ff6600', '#888888');
     }
@@ -23,17 +23,17 @@ class meetingClassModel extends Model
         if ($meetType == 1) {
             $sql        =  /** @lang text */
                 'select id, meeting_room, start_time, end_time, title
-                   from xinhu_meeting  where id <> '.$id.' and meet_state in (0, 1)
+                   from [Q]meeting  where id <> '.$id.' and meet_state in (0, 1)
                  union all
                  select id, meeting_room, start_time, end_time, title
-                   from xinhu_meeting_key where meet_state in (0, 1)';
+                   from [Q]meeting_key where meet_state in (0, 1)';
         } else {
             $sql        =  /** @lang text */
                 'select id, meeting_room, start_time, end_time, title
-                   from xinhu_meeting  where meet_state in (0, 1)
+                   from [Q]meeting  where meet_state in (0, 1)
                  union all
                  select id, meeting_room, start_time, end_time, title 
-                   from xinhu_meeting_key where id <> '.$id.' and meet_state in (0, 1)';
+                   from [Q]meeting_key where id <> '.$id.' and meet_state in (0, 1)';
         }
         m('log')->addlog("验证", $sql);
 
@@ -75,4 +75,23 @@ class meetingClassModel extends Model
             return null;
         }
     }
+
+
+    // 会议状态
+    public function meetingState($stime, $etime, $type=1) {
+        // type == 1 获取状态码, type==2获取状态名
+        $code = [0, 1, 2];
+        $info = m('meeting')->hyarra;
+
+        if ($stime > date("Y-m-d H:i:s")) {
+            // 开始时间比当前时间大——未开始
+            return $type == 1 ? $code[0] : $info[0];
+        } else if ($etime < date("Y-m-d H:i:s")) {
+            // 当前时间 比 结束时间比——已结束
+            return $type == 1 ? $code[2] : $info[2];
+        } else {
+            // 在时间段内——会议中
+            return $type == 1 ? $code[1] : $info[1];
+        }
+    }
 }

+ 0 - 32
webmain/model/meeting_keyModel.php

@@ -3,36 +3,4 @@
 class meeting_keyClassModel extends Model
 {
 
-    /**
-     *	判断会议室是否重复申请了
-     */
-    public function isapplymsg($startdt, $enddt, $hyname, $id=0)
-    {
-        $msg 		= '';
-        $sql        = `select id, meeting_room, start_time, end_time from xinhu_meeting  where id <> {$id} and meet_state in (0, 1)
-                       union ALL
-                       select id, meeting_room, start_time, end_time from xinhu_meeting_key where id <> {$id} and meet_state in (0, 1)`;
-        $rows 		= $this->db->getall($sql);
-
-        foreach($rows as $k=>$rs){
-            if($rs['meeting_room'] != $hyname)continue;
-            $sdt = $rs['start_time'];
-            $edt = $rs['end_time'];
-            if(
-                ($sdt<=$startdt && $edt>$startdt)
-                || ($sdt<$enddt && $edt>=$enddt)
-                || ($sdt>$startdt && $edt<$enddt)
-                || ($sdt==$startdt && $edt==$enddt)
-            )$msg = '该会议室的时间段已被申请过了,主题“'.$rs['title'].'”';
-        }
-        return $msg;
-    }
-
-    public function firstMeetingTopicStart($meeting_id) {
-
-        $topic = m('meeting_topics')->getone("mid={$meeting_id}", "id", 'sort');
-        if (isset($topic['id'])) {
-            m('meeting_topics')->update(['topic_state'=>'2'], 'id='.$topic['id']);
-        }
-    }
 }

+ 56 - 0
webmain/task/openapi/openRepairFaultAction.php

@@ -0,0 +1,56 @@
+<?php
+
+/**
+ *    会议相关
+ *    请求地址如:http://oa.test/api.php?m=openRepairFault&a=test&openkey=fee5efd3a93ca5c6a85b679cde60faa2
+ *    请求地址如:http://oa.test/api.php?m=openRepairFault&a=test&openkey=d9302364e2a2d9fdcab2707a46fbab5a
+ */
+class openRepairFaultClassAction extends openapiAction
+{
+
+    public function testAction() {
+        $str = $this->postdata;
+        return json_encode($str);
+    }
+
+    public function getListAction()
+    {
+        return m("repair_fault")->getall("1=1", "*");
+    }
+
+    public function addAction()
+    {
+        $arr 	 = $this->postdata;
+        if(empty($arr))return returnerror('not data');
+
+        $arr 	 = json_decode($this->postdata, true);
+        if (empty($arr['site']) || empty($arr['reporter']) || empty($arr['mobile'])) {
+            return returnerror('参数缺失');
+        }
+
+        $ipAddr = $_SERVER['REMOTE_ADDR'];
+
+        $haveData = m("repair_fault")->getall("site='{$arr['site']}' and reporter='{$arr['reporter']}' and mobile = '{$arr['mobile']}' and ip_addr = '{$ipAddr}'");
+        if (!empty($haveData)) {
+            return returnerror('请勿重复添加');
+        }
+
+        $arr['pic'] = implode(',', $arr['pic']);
+        $arr['comid'] = 1;
+        $arr['uid'] = 1;
+        $arr['optid'] = 1;
+        $arr['optname'] = "管理员";
+        $arr['optdt'] = date("Y-m-d H:i:s", time());
+        $arr['ip_addr']=$ipAddr;
+
+        // 插入数据
+        m("repair_fault")->insert($arr);
+
+        // 更新图片信息
+        m('file')->update(["mknum"=>"repair_fault", "optid"=>1, "optname"=>"管理员"], "id in ({$arr['pic']})");
+
+        $this->showreturn([],"success");
+
+    }
+
+}

+ 282 - 11
webmain/task/openapi/openmeetAction.php

@@ -42,6 +42,7 @@ class openmeetClassAction extends openapiAction
 
         $meetData = $this->db->getall($sqlStr);
 
+        // 没有会议
         if (count($meetData) == 0) {
             $this->showreturn(
                 [
@@ -61,10 +62,11 @@ class openmeetClassAction extends openapiAction
 
         $data = [];
 
+        // 有会议循环处理一下
         for ($i = 0; $i < count($meetData); $i++) {
             $meeting = $meetData[$i];
             $data['meeting_list'][$i] = [
-                "meeting_name"=>$meeting['title'],
+                "meeting_name"=>str_replace("\n", "",$meeting['title']),
                 "meeting_time"=>date("H:i", strtotime($meeting['start_time'])).' ~ '.date("H:i", strtotime($meeting['end_time'])),
                 "meeting_moderator"=>$meeting['compere'],
                 "meeting_state"=>$meeting['meet_state'] == 1 ? 1 : 0,
@@ -94,28 +96,29 @@ class openmeetClassAction extends openapiAction
 
         $nowMeetingSql = /** @lang text */
             "select * from (
-            SELECT 1 as type, id, title, start_time, end_time, null as compere, meet_state, meeting_room, attendees
+            SELECT 1 as type, id, title, start_time, end_time, null as compere, meet_state, meeting_room, attendees, null as attends
                FROM `[Q]meeting` 
               where status = 1 
                 and start_time < now() 
                 and end_time > now() 
                 and meeting_room = '".$rawData['room_name']."'
              union all
-             SELECT 2 as type, id, title, start_time, end_time, compere, meet_state, meeting_room, null as attendees
+             SELECT 2 as type, id, title, start_time, end_time, compere, meet_state, meeting_room, attendees, attends
                FROM `[Q]meeting_key` 
               where start_time < now() and end_time > now() and meeting_room = '".$rawData['room_name']."'
               ) as t order by start_time";
         $nowMeetingData = $this->db->getall($nowMeetingSql);
 
-
+        // 有数据,且未结束
         if (count($nowMeetingData) > 0 && $nowMeetingData[0]['meet_state'] != 2) {
             $nowMeet = $nowMeetingData[0];
-
+            $attInfo = $nowMeet['type'] == 2 ? "出席:".$nowMeet['attendees']."<br />列席:".$nowMeet['attends'] : "";
             $data['basic_information'] = [
                 "meeting_room_name" => $nowMeet['meeting_room'],
-                "meeting_name" => $nowMeet['title'],
+                "meeting_name" => str_replace("\n", "",$nowMeet['title']),
                 "meeting_time" => date("H:i", strtotime($nowMeet['start_time'])).' ~ '.date("H:i", strtotime($nowMeet['end_time'])),
                 "meeting_moderator" => $nowMeet['compere'],
+                "meeting_attendees"=>$attInfo
             ];
             $data['meetingTopic'] = [];
             $data['participants'] = [];
@@ -124,20 +127,23 @@ class openmeetClassAction extends openapiAction
             if ($nowMeet['type'] == 2) {
 
                 $topics = $this->db->getall("select `id`, `topic_title`, `topic_attendee`, `topic_state`, `topic_info` from `[Q]meeting_topics` where mid = {$nowMeet['id']} order by sort");
-                $j = count($topics);
-                $meetingTopic = array_fill(0, count($topics), null);
+
+                $meetingTopic = array_fill(0, count($topics) - 1, null);
                 // 会议议题处理
-                for ($i = 0; $i < count($topics); $i++) {
+
+                for ($i = 0,$j = 0; $i < count($topics); $i++) {
                     $info = $topics[$i];
                     // 用于排序(已结束放最后)
                     if ($info['topic_state'] == 3) {
-                        $index = $j - $i - 1;
+                        $index = count($topics) - 1 - $j++;
                     } else {
-                        $index = $i - 2;
+                        $index = $i-$j;
                     }
+
                     $meetingTopic[$index]['state'] = $info['topic_state'];
                     $meetingTopic[$index]['tip'] = m("meeting")->ytarra[$info['topic_state']];
                     $meetingTopic[$index]['text'] = $info['topic_title'];
+                    $meetingTopic[$index]['personnel_list'] = str_replace("\n", "<br />", $info['topic_info']);
 
                     if ($info['topic_state'] == 2) {
                         // 当前议题 + 参会人员
@@ -180,6 +186,271 @@ class openmeetClassAction extends openapiAction
         $this->showreturn($data, "请求成功");
     }
 
+    // 手机端 - 会议室列表
+    public function mMeetRoomListAction() {
+
+        $rawArr = $this->getpostarr();
+        if (isset($rawArr['date'])) {
+            $dataDate = substr($rawArr['date'], 0, 10);
+        } else {
+            $dataDate = date("Y-m-d");
+        }
+
+        $dataArr = m("meeting_room")->getall('1=1');
+        $list = [];
+
+        for ($i = 0; $i < count($dataArr); $i++) {
+            $data = $dataArr[$i];
+
+            $sqlStr = /** @lang text */
+                "SELECT count(1) con FROM (
+                    SELECT 1 FROM `[Q]meeting`
+                     WHERE `status` = 1
+                       and `start_time` < now()
+                       and `start_time` REGEXP '".$dataDate."'
+                       and `meet_state` != 2
+                       and `room_id` = '".$data['id']."'
+                    UNION ALL
+                    SELECT 1 FROM `[Q]meeting_key`
+                     WHERE `start_time` < now()
+                       and `start_time` REGEXP '".$dataDate."'
+                       and `meet_state` != 2
+                       and `room_id` = '".$data['id']."'
+                ) t";
+            $meetingHave = $this->db->getall($sqlStr);
+
+            $sqlStr = /** @lang text */
+                "SELECT count(1) con FROM (
+                    SELECT 1 FROM `[Q]meeting`
+                     WHERE `status` = 1
+                       AND `meet_state` != 2
+                       AND `start_time` REGEXP '".$dataDate."'
+                       AND `room_id` = '".$data['id']."'
+                    UNION ALL
+                    SELECT 1 FROM `[Q]meeting_key`
+                     WHERE `start_time` REGEXP '".$dataDate."'
+                       AND `meet_state` != 2
+                       AND `room_id` = '".$data['id']."'
+                ) t";
+            $meetCon = $this->db->getall($sqlStr);
+
+            $list[$i] = [
+                'meeting_room_id' => $data['id'],
+                'meeting_room_name' => $data['room_name'],
+                'meeting_room_state' => $meetingHave[0]['con'] ?? 0 > 0 ? 1 : 0,
+                'meeting_room_state_text' => $meetingHave[0]['con']  ?? 0 > 0 ? "会议中" : "空闲中",
+                'meeting_today_num' => $meetCon[0]['con'] ?? 0
+            ];
+        }
+
+        $this->showreturn($list,'success');
+    }
+
+    // 手机端 - 会议列表
+    public function mMeetListAction() {
+        $rawArr = $this->getpostarr();
+
+        if (!isset($rawArr['room_id'])) {
+            return returnerror('参数缺失');
+        }
+        $roomId = $rawArr['room_id'];
+
+        $roomInfo = m('meeting_room')->getone("id={$roomId}");
+        if (empty($roomInfo)) {
+            return returnerror('会议室不存在!');
+        }
+
+        if (isset($rawArr['date'])) {
+            $dataDate = substr($rawArr['date'], 0, 10);
+        } else {
+            $dataDate = date("Y-m-d");
+        }
+
+
+        $sqlStr = /** @lang text */
+            "SELECT 1 as type, id, title, start_time, end_time, null compere, '办公会议' as meeting_type 
+               FROM `[Q]meeting`
+              WHERE `status` = 1
+                and `start_time` regexp '".$dataDate."'
+                and `meet_state` != 2
+                and `room_id` = '".$roomId."'
+             UNION ALL
+             SELECT 2 as type, id, title, start_time, end_time, compere, '党委会议' as meeting_type 
+               FROM `[Q]meeting_key`
+              WHERE `start_time` regexp '".$dataDate."'
+                and `meet_state` != 2
+                and `room_id` = '".$roomId."'
+            ";
+        $meetingArr = $this->db->getall($sqlStr);
+
+        if (!empty($meetingArr)) {
+
+            for ($i = 0; $i < count($meetingArr); $i++) {
+                $meet = $meetingArr[$i];
+                $meet_time = date("H:i", strtotime($meet['start_time'])).' ~ '.date("H:i", strtotime($meet['end_time']));
+                $state_code =  m("meeting")->meetingState($meet['start_time'], $meet['end_time'], 1);
+                $state_text =  m("meeting")->meetingState($meet['start_time'], $meet['end_time'], 2);
+                $list["meeting_list"][$i] = [
+                    "meeting_id" => $meet['id'],
+                    "meeting_name" => str_replace("\n", "",$meet['title']),
+                    "meeting_time" => $meet_time,
+                    "meeting_moderator" => $meet['compere'],
+                    "meeting_state" => $state_code,
+                    "meeting_state_text" => $state_text,
+                    "meeting_type" => $meet['meeting_type'],
+                    "meeting_type_id" => $meet['type'],
+                ];
+
+                // 会议中
+                if ($state_code == 1) {
+                    $meeting = [
+                        "meeting_room_name" => $roomInfo['room_name'],
+                        "meeting_name" => m("meeting")->meetingState($meet['start_time'], $meet['end_time'], 2),
+                        "meeting_time" => $meet_time,
+                        "meeting_moderator" => null,
+                    ];
+
+                    // 自动改变状态
+                    $firstTopic = m('meeting_topics')->getone("mid={$meet['id']}",'id, topic_state', 'sort');
+                    if (isset($firstTopic['id']) && $firstTopic['topic_state'] < 2) {
+                        m('meeting')->firstMeetingTopicStart($meet['id']);
+                    }
+                }
+            }
+
+            if (empty($meeting)) {
+                $list['basic_information'] = [
+                    "meeting_room_name" => $roomInfo['room_name'],
+                    "meeting_name" => '空闲中',
+                    "meeting_time" => null,
+                    "meeting_moderator" => null,
+                ];
+            } else {
+                $list['basic_information'] = $meeting;
+            }
+
+
+        } else {
+            $list['basic_information'] = [
+                "meeting_room_name" => $roomInfo['room_name'],
+                "meeting_name" => '空闲中',
+                "meeting_time" => null,
+                "meeting_moderator" => null,
+            ];
+            $list['meeting list'] = [];
+        }
+
+
+        $this->showreturn($list,'success');
+
+    }
+
+    // 手机端 - 会议详情
+    public function mMeetDetailAction() {
+        $rawArr = $this->getpostarr();
+
+        if (!isset($rawArr['meet_id']) && !isset($rawArr['meet_type'])) {
+            return returnerror('参数缺失');
+        }
+
+        // 党委会议会议议题处理
+        if ($rawArr['meet_type'] == 2) {
+            $meet = m('meeting_key')->getone("id={$rawArr['meet_id']}", "*");
+            if (isset($meet)) {
+                $mstime = $meet['start_time'];
+                $metime = $meet['end_time'];
+                $now = date("Y-m-d H:i:s");
+                // 会议中状态
+                if ($mstime < $now && $metime > $now) {
+                    // 自动改变议题状态
+                    $firstTopic = m('meeting_topics')->getone("mid={$meet['id']}",'id, topic_state', 'sort');
+                    if (isset($firstTopic['id']) && $firstTopic['topic_state'] < 2) {
+                        m('meeting')->firstMeetingTopicStart($meet['id']);
+                    }
+                }
+            }
+        }
+
+        $meetId = $rawArr['meet_id'];
+        $meetType = $rawArr['meet_type'];
+        // 普通会议
+        if ($meetType == 1) {
+            $meetInfo = $this->db->getone("[Q]meeting", "`id` = '".$meetId."'");
+            if (!empty($meetInfo)) {
+                $info['basic_information'] = [
+                    "meeting_name"=>str_replace("\n", "",$meetInfo['title']),
+                    "meeting_time"=>$meetInfo['start_time'],
+                    "meeting_moderator"=>null,
+                    "meeting_state"=>$meetInfo['meet_state'],
+                    "meeting_state_text"=>m('meeting')->hyarra[$meetInfo['meet_state']],
+                    "meeting_type"=>"办公会议",
+                    "meeting_attendees"=>[
+                        [
+                            "label"=>"参会部门及人员",
+                            "text"=>$meetInfo['attendees']
+                        ],
+                        [
+                            "label"=>"备注",
+                            "remark"=>$meetInfo['remark']
+                        ]
+                    ]
+                ];
+                $info['meetingTopic'] = [];
+                $this->showreturn($info, 'success');
+            }
+        } else {
+            // 党委会议
+            $meetInfo = $this->db->getone("[Q]meeting_key", "`id` = '".$meetId."'");
+            if (!empty($meetInfo)) {
+                $info['basic_information'] = [
+                    "meeting_name"=>str_replace("\n", "",$meetInfo['title']),
+                    "meeting_time"=>$meetInfo['start_time'],
+                    "meeting_moderator"=>$meetInfo['compere'],
+                    "meeting_state"=>$meetInfo['meet_state'],
+                    "meeting_state_text"=>m('meeting')->hyarra[$meetInfo['meet_state']],
+                    "meeting_type"=>"党委会议",
+                    "meeting_attendees"=>[
+                        [
+                            "label"=>"出席",
+                            "text"=>str_replace("\n", " ", $meetInfo['attendees']),
+                        ],
+                        [
+                            "label"=>"列席",
+                            "text"=>str_replace("\n", " ", $meetInfo['attends']),
+                        ]
+                    ]
+                ];
+
+                // 会议议题
+                $topics = m("meeting_topics")->getall("`mid` = '".$meetId."'", "*", "sort");
+
+                $meetingTopic = array_fill(0, count($topics), null);
+                // 会议议题处理
+                for ($i = 0,$j = 0; $i < count($topics); $i++) {
+                    $topiic = $topics[$i];
+                    // 用于排序(已结束放最后)
+                    if ($topiic['topic_state'] == 3) {
+                        $index = count($topics) - 1 - $j++;
+                    } else {
+                        $index = $i-$j;
+                    }
+
+                    $meetingTopic[$index]['state'] = $topiic['topic_state'];
+                    $meetingTopic[$index]['tip'] = m("meeting")->ytarra[$topiic['topic_state']];
+                    $meetingTopic[$index]['text'] = $topiic['topic_title'];
+                    $meetingTopic[$index]['personnel_list'] = str_replace("\n", "<br />", $topiic['topic_info']);
+
+                }
+                $info['meetingTopic'] = $meetingTopic;
+
+                $this->showreturn($info, 'success');
+            }
+        }
+        return returnerror('未找到会议');
+    }
+
+
+
 
     protected function getWeek($date=null) {
         if (!isset($date)) {

+ 20 - 0
webmain/we/custom/customAction.php

@@ -0,0 +1,20 @@
+<?php
+
+class customClassAction extends ActionNot{
+    public function initAction()
+    {
+
+    }
+
+    public function defaultAction()
+    {
+        $num 	 = $this->get('num');
+        $filename 	= ''.P.'/we/custom/'.$num.'/'.$num.'.html';
+        if (file_exists($filename)) {
+            return file_get_contents($filename);
+        } else {
+            return "not_exists";
+        }
+    }
+
+}

+ 241 - 0
webmain/we/custom/repair_fault/repair_fault.html

@@ -0,0 +1,241 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>故障维修</title>
+    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
+    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
+
+    <link rel="stylesheet" href="https://unpkg.com/vant@2.12/lib/index.css">
+    <script src="https://unpkg.com/vue@2.6/dist/vue.min.js"></script>
+    <script src="https://unpkg.com/vant@2.12/lib/vant.min.js"></script>
+    <style>
+        *{
+            margin:0;
+            padding:0;
+            box-sizing: border-box;
+        }
+        body,html{
+            background:#F4F8FB;
+        }
+        .container{
+            width:100%;
+            height:100%;
+            background:#F4F8FB;
+            background:url('/images/custom/bg.png') no-repeat top;
+            background-size:100%;
+            position:absolute;
+            top:0;
+            padding:15px;
+            box-sizing: border-box;
+        }
+        .content{
+            background:white;
+            width:100%;
+            border-radius: 20px;
+            margin-top:180px;
+            box-sizing: border-box;
+            padding:20px;
+            padding-bottom:10px;
+        }
+        .submit{
+            background:#3F6FFF;
+            border-radius: 30px;
+            width:100%;
+            color:white;
+            border:none;
+            margin:20px 0;
+            padding:10px;
+        }
+        .item{
+            padding-bottom:10px;
+            border-bottom: 1px solid #F0F0F0;
+            background:white;
+            margin-bottom:20px;
+        }
+        .border_none{
+            border:none;
+            margin-bottom:0;
+        }
+        .title{
+            display:flex;
+            align-items: center;
+            background:white;
+        }
+        span{
+            margin-top:0;
+            color:red;
+            background:white;
+            width:7px;
+        }
+        p{
+            font-size:13px;
+            background:white;
+        }
+        input{
+            font-size:14px;
+            margin-top:0px;
+            padding:5px 7px;
+            width:100%;
+            border:none;
+            background:white;
+        }
+        .file{
+            margin-top:5px;
+            margin-left:7px;
+        }
+        .van-toast{
+            background:black;
+        }
+        .nav {
+            text-align: center;
+            margin: 8px auto;
+            color: #fff;
+            font-weight: bold;
+            font-size: 20px;
+        }
+    </style>
+</head>
+
+<body>
+<div id="app">
+    <div class="container">
+        <div class="nav">故障记录</div>
+        <div class="content">
+            <div class="item">
+                <div class="title">
+                    <span>*</span>
+                    <p>故障地点及状态描述</p>
+                </div>
+                <input type="text" placeholder="请填写响应内容" v-model="describe">
+            </div>
+            <div class="item">
+                <div class="title">
+                    <span>*</span>
+                    <p>申诉人</p>
+                </div>
+                <input type="text" placeholder="请填写申诉人姓名" v-model="people">
+            </div>
+            <div class="item">
+                <div class="title">
+                    <span>*</span>
+                    <p>申诉电话</p>
+                </div>
+                <input type="text" placeholder="请填写相关电话" v-model="phone">
+            </div>
+            <div class="item">
+                <div class="title">
+                    <span></span>
+                    <p>其他事项</p>
+                </div>
+                <input type="text" placeholder="请填写其他事项" v-model="other">
+            </div>
+            <div class="item border_none">
+                <div class="title">
+                    <span>*</span>
+                    <p>现场照片</p>
+                </div>
+                <van-uploader v-model="picture" :after-read="uploadImage" :deletable="false" multiple :max-count="9" class="file">
+            </div>
+        </div>
+        <button class="submit" @click="submit">提交</button>
+    </div>
+
+    <script>
+        // import { showToast } from 'vant';
+        new Vue({
+            el:'#app',
+            data(){
+                return {
+                    describe:'',
+                    people:'',
+                    phone:'',
+                    other:'',
+                    picture:[],
+                    id_list:[]
+                }
+            },
+            methods:{
+                submit(){
+                    if(this.describe == ''){
+                        vant.Toast('故障地点及状态描述不能为空');
+                        return;
+                    }
+                    if(this.people == ''){
+                        vant.Toast('申诉人不能为空');
+                        return;
+                    }
+                    if(this.phone == ''){
+                        vant.Toast('申诉电话不能为空');
+                        return;
+                    }
+                    let reg = /^1[3456789][0-9]{9}$/
+                    if (!reg.test(this.phone)) {
+                        vant.Toast('手机号码格式不正确');
+                        return
+                    }
+                    if(this.picture.length == 0){
+                        vant.Toast('请上传现场照片');
+                        return
+                    }
+
+                    const data = {
+                        site:this.describe,
+                        reporter:this.people,
+                        mobile:this.phone,
+                        other_info:this.other,
+                        pic:this.id_list
+                    }
+                    axios({
+                        method: 'post',
+                        url: 'http://zq.oa.nxjiewei.com:8011/api.php?m=openRepairFault&a=add&openkey=d9302364e2a2d9fdcab2707a46fbab5a',
+                        data: JSON.stringify(data),
+                        headers: {
+                            'Content-Type': 'multipart/form-data'
+                        }
+                    })
+                        .then(function (res) {
+                            if (res.data['code'] == 200) {
+                                vant.Toast('提交成功');
+                                // window.history.back();
+                            } else {
+                                vant.Toast(res.data['msg']);
+                            }
+                        })
+                        .catch(function (error) {
+                            vant.Toast('网络错误');
+                            // console.log(error);
+                        });
+                },
+                uploadImage(file) {
+                    const files = file.file;
+                    const formData = new FormData();
+                    formData.append('file', files);
+
+                    axios({
+                        method: 'post',
+                        url: 'http://zq.oa.nxjiewei.com:8011/api.php?m=openupfile&a=upfile&openkey=d9302364e2a2d9fdcab2707a46fbab5a',
+                        data: formData,
+                        headers: {
+                            'Content-Type': 'multipart/form-data'
+                        }
+                    })
+                        .then(response => {
+                            console.log('上传成功:', response);
+                            this.id_list.push(response.data.id)
+                        })
+                        .catch(error => {
+                            console.error('上传失败:', error);
+                        });
+                }
+            }
+        });
+
+
+    </script>
+</body>
+
+</html>

+ 7 - 1
webmain/we/ying/yingAction.php

@@ -29,7 +29,13 @@ class yingClassAction extends ActionNot{
 	{
 		return $this->jm->base64decode($str);
 	}
-	
+
+    // 自定义页面
+    public function testAction()
+    {
+        return $this->get('num');
+    }
+
 	public function defaultAction()
 	{
         // 检查用户权限