|
|
|
|
@ -27,57 +27,83 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:up_admin_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>上报人:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select v-model="form.up_admin_id" @change="changeUpAdmin" filterable allow-create clearable placeholder="请选择上报人" style="width: 400px;">
|
|
|
|
|
<el-option v-for="item in userdata" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<template v-slot:ask_id>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:siteName>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold;">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>检查地点:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-cascader filterable ref="cascader1" :show-all-levels="false" v-model="form.siteName" v-if="showCasc" clearable :options="siteList" :props="{'label':'name','value':'id'}"
|
|
|
|
|
placeholder="请选择检查地点" style="width: 290px;margin-right: 10px;" @change="changeSite"></el-cascader>
|
|
|
|
|
<el-input v-model="form.siteName" v-if="!showCasc" type='text' placeholder="请选择检查地点" clearable
|
|
|
|
|
style="width: 290px;margin-right: 10px;" @focus="$refs.maps.box = true"></el-input>
|
|
|
|
|
<el-button type="primary" v-if="showCasc" @click="$refs.maps.box = true;showCasc=false;form.siteName=''">选择地图</el-button>
|
|
|
|
|
<el-button type="primary" v-if="!showCasc" @click="showCasc = true;form.siteName=''">选择站点</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:patrol_list v-if="type=='add'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold;">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>问题类型:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select v-model="form.ask_id" filterable clearable placeholder="请选择问题类型" style="width: 400px;">
|
|
|
|
|
<el-option v-for="item in askList" :key="item.id" :label="item.value" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:siteName>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold;">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>检查地点:
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>问题详情
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<!-- <el-select @change="changeSite" v-model="form.siteName" filterable clearable placeholder="请选择检查地点" style="width: 400px;">
|
|
|
|
|
<el-option label="选择地图位置" :value="-1">
|
|
|
|
|
</el-option>
|
|
|
|
|
<el-option v-for="item in siteList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select> -->
|
|
|
|
|
<el-cascader ref="cascader1" :show-all-levels="false" v-model="form.siteName" v-if="showCasc" clearable :options="siteList" :props="{'label':'name','value':'id'}"
|
|
|
|
|
placeholder="请选择检查地点" style="width: 290px;margin-right: 10px;" @change="changeSite"></el-cascader>
|
|
|
|
|
<el-input v-model="form.siteName" v-if="!showCasc" type='text' placeholder="请选择检查地点" clearable
|
|
|
|
|
style="width: 290px;margin-right: 10px;" @focus="$refs.maps.box = true"></el-input>
|
|
|
|
|
<el-button type="primary" v-if="showCasc" @click="$refs.maps.box = true;showCasc=false;form.siteName=''">选择地图</el-button>
|
|
|
|
|
<el-button type="primary" v-if="!showCasc" @click="showCasc = true;form.siteName=''">选择站点</el-button>
|
|
|
|
|
<div class="xy-table-item-content" style="display: flex;flex-wrap: wrap;margin-left: 10px;">
|
|
|
|
|
<div style="margin-bottom:10px">
|
|
|
|
|
<el-button type="primary" @click="addPatrolList">新增</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<xy-table
|
|
|
|
|
:list="patrol_list"
|
|
|
|
|
stripe
|
|
|
|
|
:isPage="false"
|
|
|
|
|
:table-item="patrol_table">
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<el-table-column align='center' label="操作" width="80" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div>
|
|
|
|
|
<Poptip transfer confirm title="确认要删除吗?" @on-ok="delPatrolList(scope.$index)">
|
|
|
|
|
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size='small' ghost>删除</Button>
|
|
|
|
|
</Poptip>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
</xy-table>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:up_admin_id>
|
|
|
|
|
<template v-slot:ask_id v-if="type=='editor'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>上报人:
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold;">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>问题类型:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select v-model="form.up_admin_id" @change="changeUpAdmin" filterable allow-create clearable placeholder="请选择上报人" style="width: 400px;">
|
|
|
|
|
<el-option v-for="item in userdata" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
<el-select v-model="form.ask_id" filterable clearable placeholder="请选择问题类型" style="width: 400px;">
|
|
|
|
|
<el-option v-for="item in askList" :key="item.id" :label="item.value" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:ask_department>
|
|
|
|
|
<template v-slot:ask_department v-if="type=='editor'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>建议整改科室:
|
|
|
|
|
@ -107,7 +133,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:showgroups v-if="showgroups"></template>
|
|
|
|
|
<template v-slot:ask_introduce>
|
|
|
|
|
<template v-slot:ask_introduce v-if="type=='editor'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold;">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>问题描述:
|
|
|
|
|
@ -118,7 +144,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:tips>
|
|
|
|
|
<template v-slot:tips v-if="type=='editor'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>整改建议:
|
|
|
|
|
@ -130,10 +156,10 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:file_ids>
|
|
|
|
|
<template v-slot:file_ids v-if="type=='editor'">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>附件:
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>问题图片:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload :action="action" class='upload-demo' list-type="picture-card" :file-list="pictureList"
|
|
|
|
|
@ -163,7 +189,8 @@
|
|
|
|
|
} from "@/api/system/dictionary.js";
|
|
|
|
|
import {
|
|
|
|
|
save,
|
|
|
|
|
get
|
|
|
|
|
get,
|
|
|
|
|
batchSave
|
|
|
|
|
} from "@/api/task/patrol.js";
|
|
|
|
|
import {
|
|
|
|
|
listunit
|
|
|
|
|
@ -213,16 +240,153 @@
|
|
|
|
|
},
|
|
|
|
|
userdata:[],
|
|
|
|
|
mapform: [],
|
|
|
|
|
patrol_table:[
|
|
|
|
|
{
|
|
|
|
|
label:'问题类型',
|
|
|
|
|
prop:'ask_id',
|
|
|
|
|
width:180,
|
|
|
|
|
customFn:(row,scope)=>{
|
|
|
|
|
return(<el-select v-model={this.patrol_list[scope.$index].ask_id} filterable clearable placeholder="请选择问题类型">
|
|
|
|
|
{
|
|
|
|
|
this.askList.map(item=>{
|
|
|
|
|
return(
|
|
|
|
|
<el-option key={item.id} label={item.value} value={item.id}>
|
|
|
|
|
</el-option>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</el-select>)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// label:'检查地点',
|
|
|
|
|
// prop:'siteName',
|
|
|
|
|
// width:180,
|
|
|
|
|
// customFn:(row,scope)=>{
|
|
|
|
|
// return(<div>
|
|
|
|
|
// {
|
|
|
|
|
// this.showCasc? <el-cascader filterable ref="cascader1"
|
|
|
|
|
// show-all-levels={false} v-model={this.patrol_list[scope.$index].siteName}
|
|
|
|
|
// clearable options={this.siteList} props={{
|
|
|
|
|
// 'props':{'label':'name','value':'id'}
|
|
|
|
|
// }}
|
|
|
|
|
// placeholder="请选择检查地点" style="width: 290px;margin-right: 10px;"
|
|
|
|
|
// on={{
|
|
|
|
|
// ["change"]: (e) => (this.changeSite(e)),
|
|
|
|
|
// }}></el-cascader> : <el-input v-model={this.patrol_list[scope.$index].siteName}
|
|
|
|
|
// type='text' placeholder="请选择检查地点" clearable
|
|
|
|
|
// style="width: 290px;margin-right: 10px;"
|
|
|
|
|
// on={{
|
|
|
|
|
// ["focus"]: (e) => (this.$refs.maps.box = true),
|
|
|
|
|
// }}></el-input>
|
|
|
|
|
// }
|
|
|
|
|
// <div>
|
|
|
|
|
// {
|
|
|
|
|
// this.showCasc? <el-button type="primary"
|
|
|
|
|
// on={{
|
|
|
|
|
// ["click"]: (e) => (this.$refs.maps.box = true,this.showCasc=false,this.patrol_list[scope.$index].siteName=''),
|
|
|
|
|
// }}>选择地图</el-button>
|
|
|
|
|
// :<el-button type="primary"
|
|
|
|
|
// on={{
|
|
|
|
|
// ["click"]: (e) => (this.showCasc=true,this.patrol_list[scope.$index].siteName=''),
|
|
|
|
|
// }}>选择站点</el-button>
|
|
|
|
|
// }
|
|
|
|
|
// </div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// </div>)
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
label:'建议整改科室',
|
|
|
|
|
prop:'ask_department',
|
|
|
|
|
width:180,
|
|
|
|
|
customFn:(row,scope)=>{
|
|
|
|
|
return(<el-select
|
|
|
|
|
on={{
|
|
|
|
|
["change"]: (e) => (this.changeDepartment(e,scope.$index)),
|
|
|
|
|
}}
|
|
|
|
|
v-model={this.patrol_list[scope.$index].ask_department} filterable allow-create clearable placeholder="请选择或输入建议整改科室">
|
|
|
|
|
{
|
|
|
|
|
this.depList.map(item=>{
|
|
|
|
|
return(
|
|
|
|
|
<el-option key={item.id} label={item.name} value={item.name}>
|
|
|
|
|
</el-option>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</el-select>)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:'问题描述',
|
|
|
|
|
prop:'ask_introduce',
|
|
|
|
|
width:180,
|
|
|
|
|
customFn:(row,scope)=>{
|
|
|
|
|
return(<el-input v-model={this.patrol_list[scope.$index].ask_introduce} type='text'
|
|
|
|
|
placeholder="请输入问题描述" clearable>
|
|
|
|
|
</el-input>)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label:'整改建议',
|
|
|
|
|
prop:'tips',
|
|
|
|
|
width:180,
|
|
|
|
|
customFn:(row,scope)=>{
|
|
|
|
|
return(<el-input v-model={this.patrol_list[scope.$index].tips} type='text'
|
|
|
|
|
placeholder="请输入整改建议" clearable>
|
|
|
|
|
</el-input>)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
label:'问题图片',
|
|
|
|
|
prop:'files',
|
|
|
|
|
minWidth:180,
|
|
|
|
|
customFn:(row,scope)=>{
|
|
|
|
|
let _this = this
|
|
|
|
|
return(<el-upload action={this.action} style={{'overflow-x':'scroll','overflow-y':'hidden'}} class='upload-demo' list-type="picture-card"
|
|
|
|
|
file-list={this.patrol_list[scope.$index].pictureList}
|
|
|
|
|
ref="pictureUpload" auto-upload={true} data={this.uploadOther}
|
|
|
|
|
props={
|
|
|
|
|
{
|
|
|
|
|
"on-success": (response, file, fileList) => this.handlesuccess(response, file, fileList,scope.$index),
|
|
|
|
|
["on-preview"]: (file) => this.handlePictureCardPreview(file),
|
|
|
|
|
["on-remove"]: (file, fileList) => this.handleRemove(file, fileList,scope.$index),
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}>
|
|
|
|
|
<i class="el-icon-plus"></i>
|
|
|
|
|
</el-upload>)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
patrol_list:[{
|
|
|
|
|
ask_id:'',
|
|
|
|
|
site_id: '',
|
|
|
|
|
siteName: '',
|
|
|
|
|
address: '',
|
|
|
|
|
lat: '',
|
|
|
|
|
lon: '',
|
|
|
|
|
ask_department:'',
|
|
|
|
|
ask_introduce:'',
|
|
|
|
|
tips:'',
|
|
|
|
|
pictureList:[]
|
|
|
|
|
}],
|
|
|
|
|
form: {
|
|
|
|
|
mission_id: '',
|
|
|
|
|
date: '',
|
|
|
|
|
up_admin_id:"",
|
|
|
|
|
siteName: '',
|
|
|
|
|
patrol_list:[],
|
|
|
|
|
|
|
|
|
|
ask_id: '',
|
|
|
|
|
site_id: '',
|
|
|
|
|
siteName: '',
|
|
|
|
|
address: '',
|
|
|
|
|
lat: '',
|
|
|
|
|
lon: '',
|
|
|
|
|
up_admin_id:"",
|
|
|
|
|
|
|
|
|
|
ask_department: '',
|
|
|
|
|
groups:'',
|
|
|
|
|
showgroups:"",
|
|
|
|
|
@ -245,14 +409,14 @@
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择检查地点'
|
|
|
|
|
}],
|
|
|
|
|
ask_id: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择问题类型'
|
|
|
|
|
}],
|
|
|
|
|
ask_introduce: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入问题描述'
|
|
|
|
|
}]
|
|
|
|
|
// ask_id: [{
|
|
|
|
|
// required: true,
|
|
|
|
|
// message: '请选择问题类型'
|
|
|
|
|
// }],
|
|
|
|
|
// ask_introduce: [{
|
|
|
|
|
// required: true,
|
|
|
|
|
// message: '请输入问题描述'
|
|
|
|
|
// }]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -275,7 +439,7 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
changeUpAdmin(){
|
|
|
|
|
|
|
|
|
|
alert("123")
|
|
|
|
|
},
|
|
|
|
|
getGroups(e){
|
|
|
|
|
this.groupObj = {}
|
|
|
|
|
@ -357,15 +521,21 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
changeDepartment(e){
|
|
|
|
|
changeDepartment(e,index){
|
|
|
|
|
console.log("eeee",e)
|
|
|
|
|
let arr = []
|
|
|
|
|
this.form.accept_department_ids = []
|
|
|
|
|
if(e){
|
|
|
|
|
this.depList.map(item=>{
|
|
|
|
|
if(e===item.name){
|
|
|
|
|
this.form.accept_department_ids.push(item.id)
|
|
|
|
|
arr.push(item.id)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if(this.type==='add'){
|
|
|
|
|
this.patrol_list[index].accept_department_ids = arr
|
|
|
|
|
}else{
|
|
|
|
|
this.form.accept_department_ids = arr
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
@ -403,11 +573,33 @@
|
|
|
|
|
const res = await getparameteritem('askList')
|
|
|
|
|
this.askList = res.detail
|
|
|
|
|
},
|
|
|
|
|
handleRemove(file, fileList) {
|
|
|
|
|
this.pictureList = fileList
|
|
|
|
|
addPatrolList(){
|
|
|
|
|
this.patrol_list.push({
|
|
|
|
|
ask_id:'',
|
|
|
|
|
ask_department:'',
|
|
|
|
|
ask_introduce:'',
|
|
|
|
|
tips:'',
|
|
|
|
|
pictureList:[]
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
delPatrolList(index){
|
|
|
|
|
this.patrol_list.splice(index,1)
|
|
|
|
|
},
|
|
|
|
|
handleRemove(file, fileList,index) {
|
|
|
|
|
if(this.type=='add'){
|
|
|
|
|
this.patrol_list[index].pictureList = fileList
|
|
|
|
|
}else{
|
|
|
|
|
this.pictureList = fileList
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handlesuccess(response, file, fileList) {
|
|
|
|
|
this.pictureList = fileList
|
|
|
|
|
handlesuccess(response, file, fileList,index) {
|
|
|
|
|
console.log(response, file, fileList,index)
|
|
|
|
|
if(this.type=='add'){
|
|
|
|
|
this.patrol_list[index].pictureList = fileList
|
|
|
|
|
console.log("this.patrol_list",this.patrol_list)
|
|
|
|
|
}else{
|
|
|
|
|
this.pictureList = fileList
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handlePictureCardPreview(file) {
|
|
|
|
|
this.showPicUrl = file.url;
|
|
|
|
|
@ -418,13 +610,15 @@
|
|
|
|
|
this.form = {
|
|
|
|
|
mission_id: res?.mission_id,
|
|
|
|
|
date: res?.date,
|
|
|
|
|
ask_id: res?.ask_id,
|
|
|
|
|
up_admin_id:res?.up_admin_id,
|
|
|
|
|
site_id: res?.site_id,
|
|
|
|
|
siteName: res.site_id?[undefined,res.site_id]:res.address,
|
|
|
|
|
address: res?.address,
|
|
|
|
|
lat: res?.lat,
|
|
|
|
|
lon: res?.lon,
|
|
|
|
|
up_admin_id:res?.up_admin_id,
|
|
|
|
|
ask_id: res?.ask_id,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ask_department: res?.ask_department,
|
|
|
|
|
groups:'',
|
|
|
|
|
showgroups:"",
|
|
|
|
|
@ -432,6 +626,7 @@
|
|
|
|
|
tips: res?.tips,
|
|
|
|
|
accept_department_ids:res.accept_department_ids?res.accept_department_ids:[],
|
|
|
|
|
file_ids: res?.file_ids,
|
|
|
|
|
patrol_list:[],
|
|
|
|
|
}
|
|
|
|
|
res.mission_id?this.getGroups(res.mission_id):''
|
|
|
|
|
this.showCasc = res.site_id?true:false
|
|
|
|
|
@ -440,7 +635,6 @@
|
|
|
|
|
// if(this.showCasc){
|
|
|
|
|
// console.log("this.form.siteName",this.form.siteName)
|
|
|
|
|
// // this.$refs['cascader'].checkedValue = this.form.siteName
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
this.mapform = [res.lon, res.lat, res.address]
|
|
|
|
|
for (var f of res.files) {
|
|
|
|
|
@ -454,6 +648,8 @@
|
|
|
|
|
// res.guide_upload ? this.guidePictureList.push(res.guide_upload) : ''
|
|
|
|
|
},
|
|
|
|
|
submit() {
|
|
|
|
|
console.log("this.patrol_list",this.patrol_list)
|
|
|
|
|
// return
|
|
|
|
|
let _files = []
|
|
|
|
|
if (this.pictureList.length > 0) {
|
|
|
|
|
for (var h of this.pictureList) {
|
|
|
|
|
@ -468,8 +664,27 @@
|
|
|
|
|
this.form.file_ids = []
|
|
|
|
|
}
|
|
|
|
|
if (this.type === 'add') {
|
|
|
|
|
save({
|
|
|
|
|
...this.form
|
|
|
|
|
this.patrol_list.map(item=>{
|
|
|
|
|
let _files = []
|
|
|
|
|
item.pictureList.map(p=>{
|
|
|
|
|
if (p.response) {
|
|
|
|
|
_files.push(p.response.id)
|
|
|
|
|
} else {
|
|
|
|
|
_files.push(p.id)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
item.file_ids = _files
|
|
|
|
|
})
|
|
|
|
|
let baseForm = {
|
|
|
|
|
mission_id:this.form.mission_id,
|
|
|
|
|
date:this.form.date,
|
|
|
|
|
up_admin_id:this.form.up_admin_id,
|
|
|
|
|
batch:this.patrol_list
|
|
|
|
|
}
|
|
|
|
|
console.log("baseForm",baseForm)
|
|
|
|
|
// return
|
|
|
|
|
batchSave({
|
|
|
|
|
...baseForm
|
|
|
|
|
}).then(res => {
|
|
|
|
|
Message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
@ -498,6 +713,7 @@
|
|
|
|
|
watch: {
|
|
|
|
|
isShow(newVal) {
|
|
|
|
|
if (newVal) {
|
|
|
|
|
console.log("this.type",this.type)
|
|
|
|
|
if (this.type === 'editor') {
|
|
|
|
|
this.getDetail()
|
|
|
|
|
}
|
|
|
|
|
@ -511,11 +727,13 @@
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.id = ''
|
|
|
|
|
this.type='add'
|
|
|
|
|
this.login_id = ''
|
|
|
|
|
this.department_id = ''
|
|
|
|
|
this.groupObj = {}
|
|
|
|
|
this.showgroups = false
|
|
|
|
|
this.pictureList = []
|
|
|
|
|
this.patrol_list = []
|
|
|
|
|
this.mission_id = ''
|
|
|
|
|
this.mapform = []
|
|
|
|
|
this.showCasc = true
|
|
|
|
|
@ -547,8 +765,8 @@
|
|
|
|
|
// .xy-table-item-label {
|
|
|
|
|
// width: 160px;
|
|
|
|
|
// }
|
|
|
|
|
::v-deep .ask_department {
|
|
|
|
|
// flex-basis: 100%;
|
|
|
|
|
::v-deep .patrol_list {
|
|
|
|
|
flex-basis: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .avue-input-map {
|
|
|
|
|
|