|
|
@@ -4,14 +4,15 @@
|
|
|
|
|
|
@section('content')
|
|
|
<nav id="nav2">
|
|
|
- @component('maintenance.menu')@endcomponent
|
|
|
+ @component('demand.menu')@endcomponent
|
|
|
+ @component('demand.search.menu')@endcomponent
|
|
|
</nav>
|
|
|
|
|
|
<div class="container-fluid d-none" id="list">
|
|
|
<div id="form_div"></div>
|
|
|
|
|
|
- @include('maintenance.demand._table')
|
|
|
- @include('maintenance.demand._uploadFile')
|
|
|
+ @include('demand.search._table')
|
|
|
+ @include('demand.search._uploadFile')
|
|
|
|
|
|
</div>
|
|
|
@endsection
|
|
|
@@ -31,7 +32,7 @@
|
|
|
{name: 0, value: '需求'}, {name: 1, value: '问题'}
|
|
|
],
|
|
|
selectTr: null,
|
|
|
- uploadError: null,
|
|
|
+ uploadError: [],
|
|
|
selectDemand: null,
|
|
|
selectIndex: null,
|
|
|
imgs: [],
|
|
|
@@ -159,11 +160,11 @@
|
|
|
tempTip.setIndex(1051)
|
|
|
tempTip.waitingTip('上传中......');
|
|
|
|
|
|
- // if(fileInput.files.length === 0){
|
|
|
- // tempTip.cancelWaitingTip();
|
|
|
- // this.uploadError = ['请选择上传文件'];
|
|
|
- // return;
|
|
|
- // }
|
|
|
+ if(fileInput.files.length === 0){
|
|
|
+ tempTip.cancelWaitingTip();
|
|
|
+ this.uploadError = ['请选择上传文件'];
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
let that = this;
|
|
|
window.axios.post(url, formData, {
|
|
|
@@ -183,6 +184,7 @@
|
|
|
this.$forceUpdate();
|
|
|
return;
|
|
|
}
|
|
|
+ if(res.data.errors)this.uploadError = res.data.errors;
|
|
|
window.tempTip.show('文件上传失败');
|
|
|
}).catch(err => {
|
|
|
tempTip.cancelWaitingTip()
|
|
|
@@ -230,6 +232,7 @@
|
|
|
showUploadDiv(demand, index) {
|
|
|
this.selectDemand = demand['id'];
|
|
|
this.selectIndex = index;
|
|
|
+ this.uploadError = [];
|
|
|
$('#uploadFile').modal('show');
|
|
|
},
|
|
|
lazy() {
|