提交 87e7f693 authored 作者: chengye's avatar chengye

修复不能上传电表照片bug

上级 be077230
......@@ -3,6 +3,8 @@
<component name="ChangeListManager">
<list default="true" id="f51c1393-9404-4c81-be85-d91ed40531b3" name="默认更改列表" comment="">
<change beforePath="$PROJECT_DIR$/application/em/controller/Em.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/em/controller/Em.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/application/em/view/em/create.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/em/view/em/create.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/route/admin.php" beforeDir="false" afterPath="$PROJECT_DIR$/route/admin.php" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
......@@ -28,11 +30,11 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/em/controller/Em.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="689">
<caret line="269" selection-start-line="269" selection-end-line="269" />
<caret line="260" column="5" lean-forward="true" selection-start-line="260" selection-start-column="5" selection-end-line="260" selection-end-column="5" />
</state>
</provider>
</entry>
......@@ -40,8 +42,8 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/em/view/em/create.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="297">
<caret line="656" column="32" lean-forward="true" selection-start-line="656" selection-start-column="32" selection-end-line="656" selection-end-column="32" />
<state relative-caret-position="351">
<caret line="658" column="38" lean-forward="true" selection-start-line="658" selection-start-column="38" selection-end-line="658" selection-end-column="38" />
</state>
</provider>
</entry>
......@@ -55,11 +57,11 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/route/admin.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="552">
<caret line="140" lean-forward="true" selection-start-line="140" selection-end-line="140" />
<state relative-caret-position="498">
<caret line="138" column="41" selection-start-line="138" selection-start-column="41" selection-end-line="138" selection-end-column="41" />
</state>
</provider>
</entry>
......@@ -94,9 +96,9 @@
<option value="$PROJECT_DIR$/application/admin/view/basestation/base_map.html" />
<option value="$PROJECT_DIR$/application/admin/controller/Upload.php" />
<option value="$PROJECT_DIR$/application/admin/controller/Em.php" />
<option value="$PROJECT_DIR$/route/admin.php" />
<option value="$PROJECT_DIR$/application/em/view/em/create.html" />
<option value="$PROJECT_DIR$/application/em/controller/Em.php" />
<option value="$PROJECT_DIR$/application/em/view/em/create.html" />
<option value="$PROJECT_DIR$/route/admin.php" />
</list>
</option>
</component>
......@@ -286,12 +288,12 @@
<workItem from="1579059424177" duration="1050000" />
<workItem from="1579079847870" duration="1330000" />
<workItem from="1579164336952" duration="142000" />
<workItem from="1580875021110" duration="2318000" />
<workItem from="1580875021110" duration="2413000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="20192000" />
<option name="totallyTimeSpent" value="20287000" />
</component>
<component name="ToolWindowManager">
<frame x="-7" y="-7" width="2575" height="1415" extended-state="6" />
......@@ -493,31 +495,31 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/admin.php">
<entry file="file://$PROJECT_DIR$/application/em/controller/Em.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="10" column="22" lean-forward="true" selection-start-line="10" selection-start-column="22" selection-end-line="10" selection-end-column="44" />
<state relative-caret-position="689">
<caret line="260" column="5" lean-forward="true" selection-start-line="260" selection-start-column="5" selection-end-line="260" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/route/admin.php">
<entry file="file://$PROJECT_DIR$/application/em/view/em/create.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="552">
<caret line="140" lean-forward="true" selection-start-line="140" selection-end-line="140" />
<state relative-caret-position="351">
<caret line="658" column="38" lean-forward="true" selection-start-line="658" selection-start-column="38" selection-end-line="658" selection-end-column="38" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/em/view/em/create.html">
<entry file="file://$PROJECT_DIR$/config/admin.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="297">
<caret line="656" column="32" lean-forward="true" selection-start-line="656" selection-start-column="32" selection-end-line="656" selection-end-column="32" />
<state relative-caret-position="270">
<caret line="10" column="22" lean-forward="true" selection-start-line="10" selection-start-column="22" selection-end-line="10" selection-end-column="44" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/em/controller/Em.php">
<entry file="file://$PROJECT_DIR$/route/admin.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="689">
<caret line="269" selection-start-line="269" selection-end-line="269" />
<state relative-caret-position="498">
<caret line="138" column="41" selection-start-line="138" selection-start-column="41" selection-end-line="138" selection-end-column="41" />
</state>
</provider>
</entry>
......
......@@ -6,7 +6,6 @@
namespace app\em\controller;
use app\admin\controller\Base;
use app\admin\controller\Upload;
use app\admin\model\DepartmentModel;
use app\admin\model\ElectricMeter;
use app\admin\model\ElectricMeterType;
......@@ -260,17 +259,4 @@ class Em extends Base
return true;
}
}
public function emPhoto(){
$file = Request::file('em_photo');
$upload = new Upload($file,1);
$result = $upload->upload();
if(!empty($result)){
return jsonSuc('电表附件上传成功',$result);
} else {
return jsonErr($result);
}
}
}
\ No newline at end of file
......@@ -654,8 +654,8 @@
//上传电表照片
var uploadEa = upload.render({
elem: '#electric_annex_button' ,
url: '/emPhoto',
field: 'em_photo',
url: '/upAnnex',
field: 'annex_file',
done: function (res) {
if(res.status == 1){
//将电表照片的ID填写
......
......@@ -137,7 +137,6 @@ Route::get('em_add/:sid','em/em/create');
Route::post('em_add','em/em/store');
Route::get('em','em/em/index');
Route::get('em_edit/:id','em/em/update');
Route::post('emPhoto','em/em/emPhoto');
//抄表单
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论