jingling 9 months ago
commit c5f99a8b48

@ -0,0 +1,84 @@
<!--
* @Author: 王文杰
* @Date: 2024-02-02 09:28:28
* @LastEditors: 王文杰
* @LastEditTime: 2024-02-02 13:45:21
* @FilePath: /jnpf-web/src/components/mapComponents/index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<el-dialog :visible="visible" style="z-index: 9999;" :append-to-body="true" :close-on-click-modal="false" @close="handleCancelMap" width="30%" title="选择地点">
<iframe id="mapPage" width="100%" height="600px" frameborder=0 :src="map_src">
</iframe>
<template slot="footer">
<el-button @click="handleSureMap" type='primary'>确定</el-button>
<el-button @click="handleCancelMap" type='primary'>取消</el-button>
</template>
</el-dialog>
</template>
<script>
export default {
props: {
visibleMap: {
type: Boolean,
default: false,
}
},
data() {
return {
visible: this.visibleMap,
map_src: 'https://mapapi.qq.com/web/mapComponents/locationPicker/v/index.html?search=1&type=1&key=U24BZ-7UECT-ZSNXI-L3GJD-GZD3E-3YFF6&referer=myapp',
form: {
//ID
id_area: [
0,
0,
0
],
address: '',
lng: '',
lat: '',
},
map_data: {
url: 'https://mapapi.qq.com/web/mapComponents/locationPicker/v/index.html?search=1&type=1&key=U24BZ-7UECT-ZSNXI-L3GJD-GZD3E-3YFF6&referer=myapp',
address: '',
lng: '',
lat: '',
},
}
},
created() {
let that = this
window.addEventListener('message', function(event) {
//
var loc = event.data;
console.log(loc)
if (loc && loc.module == 'locationPicker') { //postmodule'locationPicker'
that.map_data.address = loc.poiaddress
that.map_data.lat = loc.latlng.lat
that.map_data.lng = loc.latlng.lng
that.$emit('chooseMapPoint',that.map_data)
} else {
that.$emit('chooseMapPoint','选择数据为空')
}
}, false);
},
methods: {
//
handleSureMap() {
debugger
this.$emit('sure', this.map_data)
},
//
handleCancelMap () {
this.$emit('cancel')
},
}
}
</script>
<style>
</style>

@ -1,6 +1,3 @@
<template> <template>
<transition name="el-zoom-in-center"> <transition name="el-zoom-in-center">
<div class="JNPF-preview-main"> <div class="JNPF-preview-main">
@ -20,19 +17,16 @@
{{'下一条'}} {{'下一条'}}
</el-dropdown-item> </el-dropdown-item>
</template> </template>
<el-dropdown-item type="primary" @click.native="dataFormSubmit(2)" <el-dropdown-item type="primary" @click.native="dataFormSubmit(2)" :loading="continueBtnLoading" :disabled='btnLoading'>
:loading="continueBtnLoading" :disabled='btnLoading'>
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-dropdown-item> {{!dataForm.id ?'确定并新增':'确定并继续'}}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading" <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading" :disabled='continueBtnLoading'> </el-button>
:disabled='continueBtnLoading'> </el-button>
<el-button @click="goBack"> </el-button> <el-button @click="goBack"> </el-button>
</div> </div>
</div> </div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}"> <el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="default" <el-form ref="formRef" :model="dataForm" :rules="dataRule" size="default" label-width="100px" label-position="right">
label-width="100px" label-position="right">
<template v-if="!loading"> <template v-if="!loading">
<!-- 具体表单 --> <!-- 具体表单 -->
<el-col :span="24"> <el-col :span="24">
@ -43,78 +37,68 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="回收站编号" prop="stationCode"> <jnpf-form-tip-item label="回收站编号" prop="stationCode">
<JnpfInput v-model="dataForm.stationCode" @change="changeData('stationCode',-1)" <JnpfInput v-model="dataForm.stationCode" @change="changeData('stationCode',-1)" placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="回收站名称" prop="stationName"> <jnpf-form-tip-item label="回收站名称" prop="stationName">
<JnpfInput v-model="dataForm.stationName" @change="changeData('stationName',-1)" <JnpfInput v-model="dataForm.stationName" @change="changeData('stationName',-1)" placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}'> </JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item class="site-item" label="回收站位置" prop="stationName">
<JnpfInput class="input" disabled v-model="dataForm.stationLocation" @change="changeData('stationName',-1)" placeholder="请选择站点位置" clearable :style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
<el-button @click="handleShowMap"></el-button>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="回收站简称" prop="shortName"> <jnpf-form-tip-item label="回收站简称" prop="shortName">
<JnpfInput v-model="dataForm.shortName" @change="changeData('shortName',-1)" <JnpfInput v-model="dataForm.shortName" @change="changeData('shortName',-1)" placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="经营模式" prop="managementModel"> <jnpf-form-tip-item label="经营模式" prop="managementModel">
<JnpfSelect v-model="dataForm.managementModel" <JnpfSelect v-model="dataForm.managementModel" @change="changeData('managementModel',-1)" placeholder="请选择" clearable :style='{"width":"100%"}' :options="managementModelOptions" :props="managementModelProps">
@change="changeData('managementModel',-1)" placeholder="请选择" clearable
:style='{"width":"100%"}' :options="managementModelOptions"
:props="managementModelProps">
</JnpfSelect> </JnpfSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="所在城市" prop="city"> <jnpf-form-tip-item label="所在城市" prop="city">
<JnpfAreaSelect v-model="dataForm.city" @change="changeData('city',-1)" <JnpfAreaSelect v-model="dataForm.city" @change="changeData('city',-1)" placeholder="请选择" clearable :style='{"width":"100%"}' :level="1">
placeholder="请选择" clearable :style='{"width":"100%"}' :level="1">
</JnpfAreaSelect> </JnpfAreaSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="回收类目" prop="recycleTypeIds"> <jnpf-form-tip-item label="回收类目" prop="recycleTypeIds">
<JnpfSelect v-model="dataForm.recycleTypeIds" <JnpfSelect v-model="dataForm.recycleTypeIds" @change="changeData('recycleTypeIds',-1)" placeholder="请选择" clearable :style='{"width":"100%"}' :options="recycleTypeIdsOptions" :props="recycleTypeIdsProps">
@change="changeData('recycleTypeIds',-1)" placeholder="请选择" clearable
:style='{"width":"100%"}' :options="recycleTypeIdsOptions"
:props="recycleTypeIdsProps">
</JnpfSelect> </JnpfSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="首联系人" prop="firstContactPerson"> <jnpf-form-tip-item label="首联系人" prop="firstContactPerson">
<JnpfInput v-model="dataForm.firstContactPerson" <JnpfInput v-model="dataForm.firstContactPerson" @change="changeData('firstContactPerson',-1)" placeholder="请输入" clearable :style='{"width":"100%"}'>
@change="changeData('firstContactPerson',-1)" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="职位" prop="firstContactPersonPosition"> <jnpf-form-tip-item label="职位" prop="firstContactPersonPosition">
<JnpfInput v-model="dataForm.firstContactPersonPosition" <JnpfInput v-model="dataForm.firstContactPersonPosition" @change="changeData('firstContactPersonPosition',-1)" placeholder="请输入" clearable :style='{"width":"100%"}'>
@change="changeData('firstContactPersonPosition',-1)" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="手机号码" prop="firstContactPersonTel"> <jnpf-form-tip-item label="手机号码" prop="firstContactPersonTel">
<JnpfInput v-model="dataForm.firstContactPersonTel" <JnpfInput v-model="dataForm.firstContactPersonTel" @change="changeData('firstContactPersonTel',-1)" placeholder="请输入" clearable :style='{"width":"100%"}'>
@change="changeData('firstContactPersonTel',-1)" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="回收站状态" prop="stationStatus"> <jnpf-form-tip-item label="回收站状态" prop="stationStatus">
<JnpfSwitch v-model="dataForm.stationStatus" <JnpfSwitch v-model="dataForm.stationStatus" @change="changeData('stationStatus',-1)" :active-value="1" :inactive-value="0">
@change="changeData('stationStatus',-1)" :active-value="1" :inactive-value="0">
</JnpfSwitch> </JnpfSwitch>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
@ -126,30 +110,25 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="回收站照片" prop="stationImg"> <jnpf-form-tip-item label="回收站照片" prop="stationImg">
<JnpfUploadImg v-model="dataForm.stationImg" @change="changeData('stationImg',-1)" <JnpfUploadImg v-model="dataForm.stationImg" @change="changeData('stationImg',-1)" :fileSize="10" sizeUnit="MB" :limit="1" pathType="defaultPath" :isAccount="0">
:fileSize="10" sizeUnit="MB" :limit="1" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg> </JnpfUploadImg>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="详细地址" prop="address"> <jnpf-form-tip-item label="详细地址" prop="address">
<JnpfInput v-model="dataForm.address" @change="changeData('address',-1)" <JnpfInput v-model="dataForm.address" @change="changeData('address',-1)" placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="回收电话" prop="recycleTel"> <jnpf-form-tip-item label="回收电话" prop="recycleTel">
<JnpfInput v-model="dataForm.recycleTel" @change="changeData('recycleTel',-1)" <JnpfInput v-model="dataForm.recycleTel" @change="changeData('recycleTel',-1)" placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<jnpf-form-tip-item label="回收站介绍" prop="stationDescription"> <jnpf-form-tip-item label="回收站介绍" prop="stationDescription">
<JnpfTextarea v-model="dataForm.stationDescription" <JnpfTextarea v-model="dataForm.stationDescription" @change="changeData('stationDescription',-1)" placeholder="请输入" clearable :style='{"width":"100%"}' :autosize='{"minRows":4,"maxRows":4}'>
@change="changeData('stationDescription',-1)" placeholder="请输入" clearable
:style='{"width":"100%"}' :autosize='{"minRows":4,"maxRows":4}'>
</JnpfTextarea> </JnpfTextarea>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
@ -165,11 +144,7 @@
<span class="required-sign">*</span>回收类目 <span class="required-sign">*</span>回收类目
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfSelect v-model="scope.row.recycleTypeId" <JnpfSelect v-model="scope.row.recycleTypeId" @change="changeData('recyclestationprice-recycleTypeId',scope.$index)" placeholder="请选择" clearable :style='{"width":"100%"}' :options="recyclestationpricerecycleTypeIdOptions" :props="recyclestationpricerecycleTypeIdProps">
@change="changeData('recyclestationprice-recycleTypeId',scope.$index)"
placeholder="请选择" clearable :style='{"width":"100%"}'
:options="recyclestationpricerecycleTypeIdOptions"
:props="recyclestationpricerecycleTypeIdProps">
</JnpfSelect> </JnpfSelect>
</template> </template>
</el-table-column> </el-table-column>
@ -178,16 +153,13 @@
<span class="required-sign">*</span>单价(kg) <span class="required-sign">*</span>单价(kg)
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.unitPrice" <JnpfInput v-model="scope.row.unitPrice" @change="changeData('recyclestationprice-unitPrice',scope.$index)" placeholder="请输入" clearable :style='{"width":"100%"}'>
@change="changeData('recyclestationprice-unitPrice',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="50"> <el-table-column label="操作" width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn" <el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delrecyclestationpriceList(scope.$index)"></el-button>
@click="delrecyclestationpriceList(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -205,32 +177,21 @@
<el-card class="mb-20" shadow="never" header="营业时间配置"> <el-card class="mb-20" shadow="never" header="营业时间配置">
<el-col :span="12"> <el-col :span="12">
<jnpf-form-tip-item label="营业时间" prop="businessDays"> <jnpf-form-tip-item label="营业时间" prop="businessDays">
<JnpfCheckbox v-model="dataForm.businessDays" <JnpfCheckbox v-model="dataForm.businessDays" @change="changeData('businessDays',-1)" optionType="default" direction="horizontal" :style='{"width":"100%"}' :options="businessDaysOptions" :props="businessDaysProps">
@change="changeData('businessDays',-1)" optionType="default"
direction="horizontal" :style='{"width":"100%"}' :options="businessDaysOptions"
:props="businessDaysProps">
</JnpfCheckbox> </JnpfCheckbox>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<jnpf-form-tip-item label="营业时间起" prop="appointmentTimeStart"> <jnpf-form-tip-item label="营业时间起" prop="appointmentTimeStart">
<JnpfTimePicker v-model="dataForm.appointmentTimeStart" <JnpfTimePicker v-model="dataForm.appointmentTimeStart" @change="changeData('appointmentTimeStart',-1)" :startTime="time(false,1,1,'','HH:mm','')" :endTime="time(false,1,1,'','HH:mm','')" placeholder="请选择" clearable :style='{"width":"100%"}' format="HH:mm">
@change="changeData('appointmentTimeStart',-1)"
:startTime="time(false,1,1,'','HH:mm','')"
:endTime="time(false,1,1,'','HH:mm','')" placeholder="请选择" clearable
:style='{"width":"100%"}' format="HH:mm">
</JnpfTimePicker> </JnpfTimePicker>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<jnpf-form-tip-item label="营业时间止" prop="appointmentTimeEnd"> <jnpf-form-tip-item label="营业时间止" prop="appointmentTimeEnd">
<JnpfTimePicker v-model="dataForm.appointmentTimeEnd" <JnpfTimePicker v-model="dataForm.appointmentTimeEnd" @change="changeData('appointmentTimeEnd',-1)" :startTime="time(false,1,1,'','HH:mm','')" :endTime="time(false,1,1,'','HH:mm','')" placeholder="请选择" clearable :style='{"width":"100%"}' format="HH:mm">
@change="changeData('appointmentTimeEnd',-1)"
:startTime="time(false,1,1,'','HH:mm','')"
:endTime="time(false,1,1,'','HH:mm','')" placeholder="请选择" clearable
:style='{"width":"100%"}' format="HH:mm">
</JnpfTimePicker> </JnpfTimePicker>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
@ -238,9 +199,7 @@
<el-card class="mb-20" shadow="never" header="接单范围配置"> <el-card class="mb-20" shadow="never" header="接单范围配置">
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="接单范围" prop="acceptRange"> <jnpf-form-tip-item label="接单范围" prop="acceptRange">
<JnpfSelect v-model="dataForm.acceptRange" @change="changeData('acceptRange',-1)" <JnpfSelect v-model="dataForm.acceptRange" @change="changeData('acceptRange',-1)" placeholder="请选择" clearable :style='{"width":"100%"}' :options="acceptRangeOptions" :props="acceptRangeProps">
placeholder="请选择" clearable :style='{"width":"100%"}'
:options="acceptRangeOptions" :props="acceptRangeProps">
</JnpfSelect> </JnpfSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
@ -257,23 +216,13 @@
<span class="required-sign">*</span>小区id <span class="required-sign">*</span>小区id
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.housingEstateId" <JnpfPopupSelect v-model="scope.row.housingEstateId" @change="changeData('recyclestationhousingestate-housingEstateId',scope.$index)" :rowIndex="scope.$index" :formData="dataForm" :templateJson="interfaceRes.recyclestationhousingestatehousingEstateId" placeholder="请选择" propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name' :field="'housingEstateId'+scope.$index" interfaceId="520155939362312325" :pageSize="20" :columnOptions="recyclestationhousingestatehousingEstateIdcolumnOptions" clearable :style='{"width":"100%"}'>
@change="changeData('recyclestationhousingestate-housingEstateId',scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.recyclestationhousingestatehousingEstateId"
placeholder="请选择" propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='name'
:field="'housingEstateId'+scope.$index" interfaceId="520155939362312325"
:pageSize="20"
:columnOptions="recyclestationhousingestatehousingEstateIdcolumnOptions"
clearable :style='{"width":"100%"}'>
</JnpfPopupSelect> </JnpfPopupSelect>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="50"> <el-table-column label="操作" width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn" <el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delrecyclestationhousingestateList(scope.$index)"></el-button>
@click="delrecyclestationhousingestateList(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -285,14 +234,13 @@
<!-- 表单结束 --> <!-- 表单结束 -->
</template> </template>
</el-form> </el-form>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" <mapComponent v-if="visibleMap" :visibleMap='visibleMap' @chooseMapPoint='getCallMap' @cancel='cancelMap' @sure='sureMap'></mapComponent>
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false" /> <SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false" />
</el-row> </el-row>
</div> </div>
</transition> </transition>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
@ -302,11 +250,16 @@ import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize' import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js' import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index" import { thousandsFormat } from "@/components/Generator/utils/index"
import mapComponent from "@/components/mapComponent"
export default { export default {
components: {}, components: {
mapComponent
},
props: [], props: [],
data() { data() {
return { return {
visibleMap: false,
dataFormSubmitType: 0, dataFormSubmitType: 0,
continueBtnLoading: false, continueBtnLoading: false,
index: 0, index: 0,
@ -328,8 +281,7 @@ export default {
recyclestationhousingestateList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" }, recyclestationhousingestateList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
}, },
// //
ableAll: { ableAll: {},
},
tableRows: { tableRows: {
recyclestationpriceList: { recyclestationpriceList: {
recycleTypeIdOptions: [], recycleTypeIdOptions: [],
@ -345,9 +297,11 @@ export default {
}, },
Vmodel: "", Vmodel: "",
currVmodel: "", currVmodel: "",
stationLocationObj: {}, //
dataForm: { dataForm: {
stationCode: undefined, stationCode: undefined,
stationName: undefined, stationName: undefined,
stationLocation: undefined, //
shortName: undefined, shortName: undefined,
managementModel: undefined, managementModel: undefined,
city: [], city: [],
@ -368,59 +322,48 @@ export default {
recyclestationhousingestateList: [], recyclestationhousingestateList: [],
}, },
tableRequiredData: {}, tableRequiredData: {},
dataRule: dataRule: {
{ stationCode: [{
stationCode: [
{
required: true, required: true,
message: '请输入', message: '请输入',
trigger: 'blur' trigger: 'blur'
}, }, ],
], stationName: [{
stationName: [
{
required: true, required: true,
message: '请输入', message: '请输入',
trigger: 'blur' trigger: 'blur'
}, }, ],
], stationLocation: [{
managementModel: [ required: true,
{ message: '请输入',
trigger: 'blur'
}, ],
managementModel: [{
required: true, required: true,
message: '请选择', message: '请选择',
trigger: 'change' trigger: 'change'
}, }, ],
], city: [{
city: [
{
required: true, required: true,
message: '请至少选择一个', message: '请至少选择一个',
trigger: 'change' trigger: 'change'
}, }, ],
], firstContactPerson: [{
firstContactPerson: [
{
required: true, required: true,
message: '请输入', message: '请输入',
trigger: 'blur' trigger: 'blur'
}, }, ],
], firstContactPersonTel: [{
firstContactPersonTel: [
{
required: true, required: true,
message: '请输入', message: '请输入',
trigger: 'blur' trigger: 'blur'
}, }, ],
], address: [{
address: [
{
required: true, required: true,
message: '请输入', message: '请输入',
trigger: 'blur' trigger: 'blur'
}, }, ],
], recycleTel: [{
recycleTel: [
{
required: true, required: true,
message: '请输入', message: '请输入',
trigger: 'blur' trigger: 'blur'
@ -431,34 +374,26 @@ export default {
trigger: 'blur' trigger: 'blur'
}, },
], ],
businessDays: [ businessDays: [{
{
required: true, required: true,
message: '请至少选择一个', message: '请至少选择一个',
trigger: 'change' trigger: 'change'
}, }, ],
], appointmentTimeStart: [{
appointmentTimeStart: [
{
required: true, required: true,
message: '请选择', message: '请选择',
trigger: 'change' trigger: 'change'
}, }, ],
], appointmentTimeEnd: [{
appointmentTimeEnd: [
{
required: true, required: true,
message: '请选择', message: '请选择',
trigger: 'change' trigger: 'change'
}, }, ],
], acceptRange: [{
acceptRange: [
{
required: true, required: true,
message: '请选择', message: '请选择',
trigger: 'change' trigger: 'change'
}, }, ],
],
}, },
managementModelOptions: [], managementModelOptions: [],
managementModelProps: { "label": "fullName", "value": "id" }, managementModelProps: { "label": "fullName", "value": "id" },
@ -507,8 +442,24 @@ export default {
this.initDefaultData() this.initDefaultData()
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm)) this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
}, },
mounted() { }, mounted() {
},
methods: { methods: {
handleShowMap() {
this.visibleMap = true
},
getCallMap(e) {
console.log('chooseMapPoint',e)
},
cancelMap () {
this.visibleMap = false
},
sureMap(valObj){
this.stationLocationObj = valObj
this.dataForm.stationLocation = valObj.address
console.log('位置信息',valObj)
this.visibleMap = false
},
prev() { prev() {
this.index-- this.index--
if (this.index === 0) { if (this.index === 0) {
@ -746,8 +697,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.dataForm.recyclestationpriceList.splice(index, 1); this.dataForm.recyclestationpriceList.splice(index, 1);
}).catch(() => { }).catch(() => {});
});
}, },
getrecyclestationpriceList(value) { getrecyclestationpriceList(value) {
let item = { ...this.tableRows.recyclestationpriceList, ...value } let item = { ...this.tableRows.recyclestationpriceList, ...value }
@ -768,8 +718,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.dataForm.recyclestationhousingestateList.splice(index, 1); this.dataForm.recyclestationhousingestateList.splice(index, 1);
}).catch(() => { }).catch(() => {});
});
}, },
getrecyclestationhousingestateList(value) { getrecyclestationhousingestateList(value) {
let item = { ...this.tableRows.recyclestationhousingestateList, ...value } let item = { ...this.tableRows.recyclestationhousingestateList, ...value }
@ -860,6 +809,11 @@ export default {
}, },
dataList() { dataList() {
var _data = this.dataForm; var _data = this.dataForm;
// stationLocationObj
var _data_new = {
..._data,
stationLocationObj: this.stationLocationObj
}
return _data; return _data;
}, },
dataInfo(dataAll) { dataInfo(dataAll) {
@ -877,5 +831,19 @@ export default {
}, },
}, },
} }
</script> </script>
<style scoped lang="scss">
.site-item {
display: flex;
::v-deep .el-form-item__content {
display: flex!important;
align-items: flex-start;
margin-left: 0!important;
.input {
width: 200px!important;
margin-right: 10px;
}
}
}
</style>

Loading…
Cancel
Save