From c34cbb0bb5a71558b2313ae63dc1ffd036ca7b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=B4=E6=8E=8C?= Date: Sat, 18 Jul 2020 13:47:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/keti/view/keti_info/create.html | 6 ++-- app/keti/view/keti_info/index.html | 12 ++++---- app/keti/view/keti_info/jie_ti.html | 2 +- app/keti/view/keti_info/keti_list.html | 8 ++--- app/keti/view/ketice/create.html | 4 +-- app/keti/view/ketice/index.html | 4 +-- app/rongyu/controller/JsRongyuInfo.php | 20 +++++++++++-- app/rongyu/model/JsRongyuInfo.php | 30 +++++++++---------- app/rongyu/view/danwei/create.html | 8 ++--- app/rongyu/view/danwei/index.html | 6 ++-- app/rongyu/view/jiaoshi/create.html | 4 +-- app/rongyu/view/jiaoshi/index.html | 4 +-- app/rongyu/view/js_rongyu_info/create.html | 6 ++-- app/rongyu/view/js_rongyu_info/index.html | 6 ++-- .../view/js_rongyu_info/rongyu_list.html | 4 +-- 15 files changed, 70 insertions(+), 54 deletions(-) diff --git a/app/keti/view/keti_info/create.html b/app/keti/view/keti_info/create.html index b544d69c..62e0d3e2 100644 --- a/app/keti/view/keti_info/create.html +++ b/app/keti/view/keti_info/create.html @@ -95,7 +95,7 @@
- {php} $school = schoolList('校级','区级');{/php} + {php} $school = danweiJibie('校级','区级');{/php} {volist name="subject" id="vo"} @@ -133,7 +133,7 @@
- {php} $category = getCategory(117);{/php} + {php} $category = categoryChildren(117);{/php} - {php} $school = schoolList('区级','其它级'); {/php} + {php} $school = danweiJibie('区级','其它级'); {/php} {volist name="school" id="vo"} {/volist} @@ -34,7 +34,7 @@
- {php} $category = getCategory(115);{/php} + {php} $category = categoryChildren(115);{/php} {volist name="category" id="vo"} {/volist} @@ -44,7 +44,7 @@
- {php} $school = schoolList('校级','区级'); {/php} + {php} $school = danweiJibie('校级','区级'); {/php} {volist name="school" id="vo"} {/volist} @@ -54,7 +54,7 @@
- {php} $category = getCategory(116);{/php} + {php} $category = categoryChildren(116);{/php} {volist name="category" id="vo"} {/volist} @@ -64,7 +64,7 @@
- {php} $category = getCategory(117);{/php} + {php} $category = categoryChildren(117);{/php} {volist name="category" id="vo"} {/volist} @@ -74,7 +74,7 @@
- {php} $category = getCategory(118);{/php} + {php} $category = categoryChildren(118);{/php} {volist name="category" id="vo"} {/volist} diff --git a/app/keti/view/keti_info/jie_ti.html b/app/keti/view/keti_info/jie_ti.html index 7ed8a632..2aac87b2 100644 --- a/app/keti/view/keti_info/jie_ti.html +++ b/app/keti/view/keti_info/jie_ti.html @@ -74,7 +74,7 @@
- {php}$jddengji = getCategory(118);{/php} + {php}$jddengji = categoryChildren(118);{/php} - {php} $school = schoolList('校级','区级'); {/php} + {php} $school = danweiJibie('校级','区级'); {/php} {volist name="school" id="vo"} {/volist} @@ -34,7 +34,7 @@
- {php} $category = getCategory(116);{/php} + {php} $category = categoryChildren(116);{/php} {volist name="category" id="vo"} {/volist} @@ -44,7 +44,7 @@
- {php} $category = getCategory(117);{/php} + {php} $category = categoryChildren(117);{/php} {volist name="category" id="vo"} {/volist} @@ -54,7 +54,7 @@
- {php} $category = getCategory(118);{/php} + {php} $category = categoryChildren(118);{/php} {volist name="category" id="vo"} {/volist} diff --git a/app/keti/view/ketice/create.html b/app/keti/view/ketice/create.html index bfb05ee4..34fd0a8e 100644 --- a/app/keti/view/ketice/create.html +++ b/app/keti/view/ketice/create.html @@ -15,7 +15,7 @@
- {php} $category = getCategory(115);{/php} + {php} $category = categoryChildren(115);{/php} {volist name="school" id="vo"} diff --git a/app/keti/view/ketice/index.html b/app/keti/view/ketice/index.html index 683ff180..ddd82b16 100644 --- a/app/keti/view/ketice/index.html +++ b/app/keti/view/ketice/index.html @@ -23,7 +23,7 @@
- {php} $category = getCategory(115);{/php} + {php} $category = categoryChildren(115);{/php} {volist name="category" id="vo"} {/volist} @@ -33,7 +33,7 @@
- {php} $school = schoolList('区级','其它级'); {/php} + {php} $school = danweiJibie('区级','其它级'); {/php} {volist name="school" id="vo"} {/volist} diff --git a/app/rongyu/controller/JsRongyuInfo.php b/app/rongyu/controller/JsRongyuInfo.php index e0b40585..0143f369 100644 --- a/app/rongyu/controller/JsRongyuInfo.php +++ b/app/rongyu/controller/JsRongyuInfo.php @@ -448,14 +448,30 @@ class JsRongyuInfo extends BaseController $myrowid = $key + 4; $worksheet->getCell('A' . $myrowid)->setValue($key + 1); $worksheet->getCell('B' . $myrowid)->setValue($value->title); - $worksheet->getCell('C' . $myrowid)->setValue($value->hjJsName); + $names = ''; + foreach ($value->hjJsry as $k => $val) { + if($k == 0) + { + $names = $val->teacher->xingming; + } + $names = $names . '、' .$val->teacher->xingming; + } + $worksheet->getCell('C' . $myrowid)->setValue($names); if($value->hj_school){ $worksheet->getCell('D' . $myrowid)->setValue($value->hj_school->jiancheng); } if($value->ry_subject){ $worksheet->getCell('E' . $myrowid)->setValue($value->ry_subject->title); } - $worksheet->getCell('F' . $myrowid)->setValue($value->cyJsName); + $names = ''; + foreach ($value->cyJsry as $k => $val) { + if($k == 0) + { + $names = $val->teacher->xingming; + } + $names = $names . '、' .$val->teacher->xingming; + } + $worksheet->getCell('F' . $myrowid)->setValue($names); if($value->jx_category){ $worksheet->getCell('G' . $myrowid)->setValue($value->jx_category->title); } diff --git a/app/rongyu/model/JsRongyuInfo.php b/app/rongyu/model/JsRongyuInfo.php index 2877f2a2..259e1867 100644 --- a/app/rongyu/model/JsRongyuInfo.php +++ b/app/rongyu/model/JsRongyuInfo.php @@ -201,7 +201,7 @@ class JsRongyuInfo extends BaseModel }, ] ) - ->append(['hjJsName', 'cyJsName']) + // ->append(['hjJsName', 'cyJsName']) ->select(); return $data; @@ -291,23 +291,23 @@ class JsRongyuInfo extends BaseModel return $value; } - // 获奖教师名整理 - public function getHjJsNameAttr($value) - { - $teacherList = $this->getAttr('hjJsry'); - $teachNames = teacherNames($teacherList); + // // 获奖教师名整理 + // public function getHjJsNameAttr($value) + // { + // $teacherList = $this->getAttr('hjJsry'); + // $teachNames = teacherNames($teacherList); - return $teachNames; + // return $teachNames; - } + // } - // 获奖教师名整理 - public function getCyJsNameAttr($value) - { - $teacherList = $this->getAttr('cyJsry'); - $teachNames = teacherNames($teacherList); + // // 获奖教师名整理 + // public function getCyJsNameAttr($value) + // { + // $teacherList = $this->getAttr('cyJsry'); + // $teachNames = teacherNames($teacherList); - return $teachNames; + // return $teachNames; - } + // } } diff --git a/app/rongyu/view/danwei/create.html b/app/rongyu/view/danwei/create.html index f5e3c79d..6f9bb029 100644 --- a/app/rongyu/view/danwei/create.html +++ b/app/rongyu/view/danwei/create.html @@ -96,7 +96,7 @@
- {php} $category = getCategory(112);{/php} + {php} $category = categoryChildren(112);{/php} {volist name="school" id="vo"} @@ -143,7 +143,7 @@
- {php} $school = schoolList('区级','其它级');{/php} + {php} $school = danweiJibie('区级','其它级');{/php} {volist name="category" id="vo"} diff --git a/app/rongyu/view/danwei/index.html b/app/rongyu/view/danwei/index.html index f318643b..0d1c42c7 100644 --- a/app/rongyu/view/danwei/index.html +++ b/app/rongyu/view/danwei/index.html @@ -23,7 +23,7 @@
- {php} $category = getCategory(112);{/php} + {php} $category = categoryChildren(112);{/php} {volist name="category" id="vo"} {/volist} @@ -33,7 +33,7 @@
- {php} $school = schoolList('区级','其它级'); {/php} + {php} $school = danweiJibie('区级','其它级'); {/php} {volist name="school" id="vo"} {/volist} @@ -43,7 +43,7 @@
- {php} $school = schoolList('校级','区级'); {/php} + {php} $school = danweiJibie('校级','区级'); {/php} {volist name="school" id="vo"} {/volist} diff --git a/app/rongyu/view/jiaoshi/create.html b/app/rongyu/view/jiaoshi/create.html index 8b7fb937..17b1c83c 100644 --- a/app/rongyu/view/jiaoshi/create.html +++ b/app/rongyu/view/jiaoshi/create.html @@ -15,7 +15,7 @@
- {php} $category = getCategory(114);{/php} + {php} $category = categoryChildren(114);{/php} {volist name="school" id="vo"} diff --git a/app/rongyu/view/jiaoshi/index.html b/app/rongyu/view/jiaoshi/index.html index 281ad27b..8bffa95c 100644 --- a/app/rongyu/view/jiaoshi/index.html +++ b/app/rongyu/view/jiaoshi/index.html @@ -23,7 +23,7 @@
- {php} $category = getCategory(114);{/php} + {php} $category = categoryChildren(114);{/php} {volist name="category" id="vo"} {/volist} @@ -33,7 +33,7 @@
- {php} $school = schoolList('区级','其它级'); {/php} + {php} $school = danweiJibie('区级','其它级'); {/php} {volist name="school" id="vo"} {/volist} diff --git a/app/rongyu/view/js_rongyu_info/create.html b/app/rongyu/view/js_rongyu_info/create.html index 7a706044..3e63d445 100644 --- a/app/rongyu/view/js_rongyu_info/create.html +++ b/app/rongyu/view/js_rongyu_info/create.html @@ -114,7 +114,7 @@
- {php} $school = schoolList('校级','区级');{/php} + {php} $school = danweiJibie('校级','区级');{/php} {volist name="jiangxiang" id="vo"} @@ -258,7 +258,7 @@ $(obj).attr('onclick',"imgMax(this,true)"); } } - + {/block} diff --git a/app/rongyu/view/js_rongyu_info/index.html b/app/rongyu/view/js_rongyu_info/index.html index 46da536f..5530d972 100644 --- a/app/rongyu/view/js_rongyu_info/index.html +++ b/app/rongyu/view/js_rongyu_info/index.html @@ -24,7 +24,7 @@
- {php} $category = getCategory(114);{/php} + {php} $category = categoryChildren(114);{/php} {volist name="category" id="vo"} {/volist} @@ -34,7 +34,7 @@
- {php} $school = schoolList('区级', '其它级'); {/php} + {php} $school = danweiJibie('区级', '其它级'); {/php} {volist name="school" id="vo"} {/volist} @@ -44,7 +44,7 @@
- {php} $school = schoolList('校级','区级'); {/php} + {php} $school = danweiJibie('校级','区级'); {/php} {volist name="school" id="vo"} {/volist} diff --git a/app/rongyu/view/js_rongyu_info/rongyu_list.html b/app/rongyu/view/js_rongyu_info/rongyu_list.html index 3142accf..ddf1e1c6 100644 --- a/app/rongyu/view/js_rongyu_info/rongyu_list.html +++ b/app/rongyu/view/js_rongyu_info/rongyu_list.html @@ -37,7 +37,7 @@
- {php} $school = schoolList('校级','区级'); {/php} + {php} $school = danweiJibie('校级','区级'); {/php} {volist name="school" id="vo"} {/volist} @@ -79,7 +79,7 @@ var str=''; if(d.hjJsry) { - for (var k = 0, length = d.hjJsry.length; k < length; k++) { + for (var k = 0, length = d.hjJsry.length; k < length; k++) { if(k == 0){ str = d.hjJsry[k].teacher.xingming; }else{