|
|
|
|
@ -9,6 +9,8 @@
|
|
|
|
|
<Input style="width: 200px; margin-right: 10px" v-model="searchFields.keyword" placeholder="关键字搜索" />
|
|
|
|
|
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
|
|
|
|
|
<Button type="primary" @click="edit()" style="margin-left: 10px">新增</Button>
|
|
|
|
|
<Button type="primary" @click="dialogPlanVisible = true" slot="reference" style="margin-left: 10px">导入</Button>
|
|
|
|
|
|
|
|
|
|
<div class="upfile">
|
|
|
|
|
<el-popover
|
|
|
|
|
placement="bottom-start"
|
|
|
|
|
@ -16,23 +18,8 @@
|
|
|
|
|
width="300"
|
|
|
|
|
trigger="hover"
|
|
|
|
|
content="">
|
|
|
|
|
<el-upload
|
|
|
|
|
slot="reference"
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
action="/api/admin/maintain-plan/import-show"
|
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
|
:before-remove="beforeRemove"
|
|
|
|
|
:data="uploadOther"
|
|
|
|
|
multiple
|
|
|
|
|
:limit="1"
|
|
|
|
|
:on-success="handleSuccess"
|
|
|
|
|
:on-exceed="handleExceed"
|
|
|
|
|
:file-list="fileList">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-popover>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@ -65,18 +52,55 @@
|
|
|
|
|
</el-pagination>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog class="common-dialog" title="上传文件" :visible.sync="dialogPlanVisible" width="40%">
|
|
|
|
|
<div class="dialogConcent">
|
|
|
|
|
<el-scrollbar style="flex: 1">
|
|
|
|
|
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="所属片区" prop="plan_area_id">
|
|
|
|
|
<el-select @change="showArea" filterable style="width:100%" v-model="plan_area_id" placeholder="请选择所属片区">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in areaList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="文件上传" prop="filelist">
|
|
|
|
|
<el-upload
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
action="/api/admin/maintain-plan/import-show"
|
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
|
:before-remove="beforeRemove"
|
|
|
|
|
:data="uploadOther"
|
|
|
|
|
multiple
|
|
|
|
|
:limit="1"
|
|
|
|
|
:on-success="handleSuccess"
|
|
|
|
|
:on-exceed="handleExceed"
|
|
|
|
|
:file-list="fileList">
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog class="common-dialog" title="养护计划编辑" :visible.sync="dialogFormVisible" width="40%">
|
|
|
|
|
<div class="dialogConcent">
|
|
|
|
|
<el-scrollbar style="flex: 1">
|
|
|
|
|
|
|
|
|
|
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
|
|
|
|
|
<el-row>
|
|
|
|
|
<!-- <el-col :span="24">
|
|
|
|
|
<el-form-item label="养护计划名称" prop="name">
|
|
|
|
|
<el-input v-model="form.name" placeholder="请填写养护计划名称" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col> -->
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="所属道路" prop="road_id">
|
|
|
|
|
<el-select class="width100" v-model="roadName" filterable remote @change="chooseRoad"
|
|
|
|
|
@ -188,27 +212,17 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog class="common-dialog" title="文件预览" @close="resetFile" :visible.sync="dialogFileVisible" width="60%">
|
|
|
|
|
<div class="dialogConcent">
|
|
|
|
|
<el-scrollbar style="flex: 1">
|
|
|
|
|
<div>所属片区:{{plan_area_name}}</div>
|
|
|
|
|
<el-table :data="fileData" class="v-table" :height="tableHeight" style="width: 100%">
|
|
|
|
|
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in filecolumns"
|
|
|
|
|
:label="column.title" :width="column.width" :fixed="column.fixed">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<!-- <div v-if="column.type=='date'">
|
|
|
|
|
<el-form>
|
|
|
|
|
<el-form-item label="" prop="scope.row[column.field]">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
style="width:100%"
|
|
|
|
|
v-model="scope.row[column.field]"
|
|
|
|
|
type="date"
|
|
|
|
|
format="yyyy-MM-dd"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<el-input v-model="scope.row[column.field]"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
@ -326,12 +340,16 @@
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
fileData:[],
|
|
|
|
|
plan_area_id:"",
|
|
|
|
|
plan_area_name:"",
|
|
|
|
|
dialogPlanVisible:false,
|
|
|
|
|
dialogFileVisible:false,
|
|
|
|
|
filecolumns:[{
|
|
|
|
|
field: "序号",
|
|
|
|
|
title: "序号",
|
|
|
|
|
type: "string",
|
|
|
|
|
align: "left",
|
|
|
|
|
width:80
|
|
|
|
|
},{
|
|
|
|
|
field: "路名",
|
|
|
|
|
title: "路名",
|
|
|
|
|
@ -357,6 +375,16 @@
|
|
|
|
|
title: "支管",
|
|
|
|
|
type: "string",
|
|
|
|
|
align: "left",
|
|
|
|
|
},{
|
|
|
|
|
field: "inspection_well",
|
|
|
|
|
title: "窨井",
|
|
|
|
|
type: "string",
|
|
|
|
|
align: "left",
|
|
|
|
|
},{
|
|
|
|
|
field: "side_well",
|
|
|
|
|
title: "边井",
|
|
|
|
|
type: "string",
|
|
|
|
|
align: "left",
|
|
|
|
|
}],
|
|
|
|
|
|
|
|
|
|
columns: [{
|
|
|
|
|
@ -619,6 +647,7 @@
|
|
|
|
|
},
|
|
|
|
|
handleSuccess(response, file, fileList){
|
|
|
|
|
// this.fileList = response
|
|
|
|
|
|
|
|
|
|
var nowyear = ""
|
|
|
|
|
var k = 0
|
|
|
|
|
for(var i=0;i<response.length;i++){
|
|
|
|
|
@ -664,18 +693,29 @@
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.dialogPlanVisible = false
|
|
|
|
|
this.dialogFileVisible = true
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
showArea(val){
|
|
|
|
|
console.log(val)
|
|
|
|
|
if(val){
|
|
|
|
|
this.plan_area_id = val.id
|
|
|
|
|
this.plan_area_name = val.name
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
submitFile(){
|
|
|
|
|
console.log(this.plan_area_id)
|
|
|
|
|
console.log(this.fileData)
|
|
|
|
|
// return
|
|
|
|
|
importPlan({
|
|
|
|
|
data:this.fileData
|
|
|
|
|
data:this.fileData,
|
|
|
|
|
area_id:this.plan_area_id
|
|
|
|
|
}).then(res=>{
|
|
|
|
|
this.$Message.success('操作成功');
|
|
|
|
|
this.fileList = []
|
|
|
|
|
this.fileData = []
|
|
|
|
|
this.fileData = []
|
|
|
|
|
this.plan_area_id=""
|
|
|
|
|
this.load();
|
|
|
|
|
this.dialogFileVisible = false
|
|
|
|
|
}).catch(error=>{
|
|
|
|
|
@ -687,6 +727,7 @@
|
|
|
|
|
resetFile(){
|
|
|
|
|
this.fileList = []
|
|
|
|
|
this.fileData = []
|
|
|
|
|
this.plan_area_id=""
|
|
|
|
|
this.dialogFileVisible = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|