3 changed files with 607 additions and 604 deletions
@ -1,71 +1,122 @@ |
|||||
<template> |
<template> |
||||
<div> |
<div> |
||||
<div class="dialog-h-content scroll-h"> |
<div class="dialog-h-content scroll-h"> |
||||
|
<div class="m-row"> |
||||
<div |
<div class="m-info"> |
||||
class="m-row"> |
<div class="info-prop"> |
||||
<div class="m-info"> |
<span class="info-title-2">物业名称</span> |
||||
<div class="info-prop"> |
<span>{{ villageList.name || '--' }}</span> |
||||
<span class="info-title-2">物业名称</span> |
</div> |
||||
<span>{{ villageList.name|| "--" }}</span> |
</div> |
||||
</div> |
</div> |
||||
</div> |
<div class="m-row"> |
||||
</div> |
<div class="m-info"> |
||||
|
<div class="info-prop"> |
||||
</div> |
<span class="info-title-2">物业联系人</span> |
||||
<div class="div-btn"> |
<span>{{ villageList.contactName || '--' }}</span> |
||||
<el-button size="small" |
</div> |
||||
@click="handleCancle">关 闭</el-button> |
</div> |
||||
|
</div> |
||||
</div> |
<div class="m-row"> |
||||
</div> |
<div class="m-info"> |
||||
</template> |
<div class="info-prop"> |
||||
|
<span class="info-title-2">联系电话</span> |
||||
<script> |
<span>{{ villageList.contactMobile || '--' }}</span> |
||||
import { mapGetters } from "vuex"; |
</div> |
||||
import { requestPost } from "@/js/dai/request"; |
</div> |
||||
import fileList from '@/views/components/fileList' |
</div> |
||||
|
<!-- 物业公司 这个不一定 物业联系人 tianqian 联系电话 --> |
||||
export default { |
<!-- <div class="m-row"> |
||||
props: { |
<div class="m-info"> |
||||
formId: { |
<div class="info-prop"> |
||||
type: String, |
<span class="info-title-2">联系电话</span> |
||||
default: "", |
<span>{{ villageList.name || '--' }}</span> |
||||
}, |
</div> |
||||
villageList:{ |
</div> |
||||
type:Object, |
</div> |
||||
default:()=>{} |
<div class="m-row"> |
||||
} |
<div class="m-info"> |
||||
}, |
<div class="info-prop"> |
||||
|
<span class="info-title-2">证件号</span> |
||||
data () { |
<span>{{ villageList.name || '--' }}</span> |
||||
return { |
</div> |
||||
|
</div> |
||||
customerId: localStorage.getItem("customerId"), |
</div> |
||||
|
<div class="m-row"> |
||||
initLoading: false, |
<div class="m-info"> |
||||
|
<div class="info-prop"> |
||||
fmData: {}, |
<span class="info-title-2">类型</span> |
||||
|
<span>{{ villageList.name || '--' }}</span> |
||||
|
</div> |
||||
}; |
</div> |
||||
}, |
</div> |
||||
components: { fileList }, |
<div class="m-row"> |
||||
computed: { |
<div class="m-info"> |
||||
|
<div class="info-prop"> |
||||
}, |
<span class="info-title-2">所属组织</span> |
||||
watch: {}, |
<span>{{ villageList.name || '--' }}</span> |
||||
|
</div> |
||||
methods: { |
</div> |
||||
|
</div> |
||||
handleCancle () { |
<div class="m-row"> |
||||
this.$emit("diaDetailClose"); |
<div class="m-info"> |
||||
}, |
<div class="info-prop"> |
||||
}, |
<span class="info-title-2">楼栋</span> |
||||
}; |
<span>{{ villageList.name || '--' }}</span> |
||||
</script> |
</div> |
||||
|
</div> |
||||
<style lang="scss" scoped > |
</div> |
||||
@import "@/assets/scss/modules/management/detail-main.scss"; |
<div class="m-row"> |
||||
</style> |
<div class="m-info"> |
||||
|
<div class="info-prop"> |
||||
|
<span class="info-title-2">单元</span> |
||||
|
<span>{{ villageList.name || '--' }}</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> --> |
||||
|
</div> |
||||
|
<div class="div-btn"><el-button size="small" @click="handleCancle">关 闭</el-button></div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { mapGetters } from 'vuex'; |
||||
|
import { requestPost } from '@/js/dai/request'; |
||||
|
import fileList from '@/views/components/fileList'; |
||||
|
|
||||
|
export default { |
||||
|
props: { |
||||
|
formId: { |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
villageList: { |
||||
|
type: Object, |
||||
|
default: () => {} |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
customerId: localStorage.getItem('customerId'), |
||||
|
|
||||
|
initLoading: false, |
||||
|
|
||||
|
fmData: {} |
||||
|
}; |
||||
|
}, |
||||
|
components: { fileList }, |
||||
|
computed: {}, |
||||
|
watch: {}, |
||||
|
|
||||
|
methods: { |
||||
|
handleCancle() { |
||||
|
this.$emit('diaDetailClose'); |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
@import '@/assets/scss/modules/management/detail-main.scss'; |
||||
|
</style> |
||||
|
@ -1,205 +1,208 @@ |
|||||
<template> |
<template> |
||||
<div> |
<div> |
||||
<div class="dialog-h-content scroll-h"> |
<div class="dialog-h-content scroll-h"> |
||||
<el-form |
<!-- 姓名 联系电话 证件号 类型 所属组织 楼栋 单元 tianqian --> |
||||
ref="ref_form" |
<!-- 物业公司 这个不一定 物业联系人 tianqian 联系电话 --> |
||||
:inline="true" |
<el-form ref="ref_form" :inline="true" :model="fmData" :rules="dataRule" :disabled="formType === 'watch'" class="form"> |
||||
:model="fmData" |
<el-form-item label="物业名称" prop="name" label-width="150px" style="display: block"> |
||||
:rules="dataRule" |
<el-input v-model="fmData.name" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
:disabled="formType === 'watch'" |
</el-form-item> |
||||
class="form" |
<el-form-item label="物业联系人" prop="contactName" label-width="150px" style="display: block"> |
||||
> |
<el-input v-model="fmData.contactName" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
<el-form-item |
</el-form-item> |
||||
label="物业名称" |
<el-form-item label="联系电话" prop="contactMobile" label-width="150px" style="display: block"> |
||||
prop="name" |
<el-input v-model="fmData.contactMobile" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
label-width="150px" |
</el-form-item> |
||||
style="display: block" |
<!-- <el-form-item label="姓名" prop="name" label-width="150px" style="display: block"> |
||||
> |
<el-input v-model="fmData.name" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
<el-input |
</el-form-item> |
||||
v-if="formType == 'add' || formType == 'edit'" |
|
||||
class="item_width_1" |
<el-form-item label="联系电话" prop="serviceContent"> |
||||
show-word-limit |
<el-input v-model="fmData.name" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
placeholder="请输入物业名称" |
</el-form-item> |
||||
v-model="fmData.name" |
<el-form-item label="证件号" prop="serviceContent"> |
||||
> |
<el-input v-model="fmData.name" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
</el-input> |
</el-form-item> |
||||
<div style="width:610px" v-else>{{ fmData.serviceName || "--" }}</div> |
<el-form-item label="类型" prop="serviceContent"> |
||||
</el-form-item> |
<el-input v-model="fmData.name" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
|
</el-form-item> |
||||
</el-form> |
<el-form-item label="所属组织" prop="serviceContent"> |
||||
</div> |
<el-input v-model="fmData.name" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
|
</el-form-item> |
||||
<div class="div_btn resi-btns"> |
<el-form-item label="楼栋" prop="serviceContent"> |
||||
<el-button size="small" @click="handleCancle">取 消</el-button> |
<el-input v-model="fmData.name" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
<el-button |
</el-form-item> |
||||
v-if="formType != 'watch'" |
<el-form-item label="单元" prop="serviceContent"> |
||||
type="primary" |
<el-input v-model="fmData.name" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
size="small" |
</el-form-item> --> |
||||
:disabled="btnDisable" |
</el-form> |
||||
@click="handleComfirm" |
</div> |
||||
>确 定</el-button |
|
||||
> |
<div class="div_btn resi-btns"> |
||||
</div> |
<el-button size="small" @click="handleCancle">取 消</el-button> |
||||
</div> |
<el-button v-if="formType != 'watch'" type="primary" size="small" :disabled="btnDisable" @click="handleComfirm">确 定</el-button> |
||||
</template> |
</div> |
||||
|
</div> |
||||
<script> |
</template> |
||||
import { mapGetters } from "vuex"; |
|
||||
import { requestPost } from "@/js/dai/request"; |
<script> |
||||
import formVltHelper from "dai-js/tools/formVltHelper"; |
import { mapGetters } from 'vuex'; |
||||
|
import { requestPost } from '@/js/dai/request'; |
||||
export default { |
import formVltHelper from 'dai-js/tools/formVltHelper'; |
||||
props: { |
|
||||
formId: { |
export default { |
||||
type: String, |
props: { |
||||
default: "", |
formId: { |
||||
}, |
type: String, |
||||
formType: { |
default: '' |
||||
type: String, |
}, |
||||
default: "info", |
formType: { |
||||
}, |
type: String, |
||||
villageList: { |
default: 'info' |
||||
type: Object, |
}, |
||||
default: {}, |
villageList: { |
||||
}, |
type: Object, |
||||
}, |
default: {} |
||||
|
} |
||||
data() { |
}, |
||||
return { |
|
||||
uploadUrl: window.SITE_CONFIG["apiURL"] + "/oss/file/uploadqrcodeV2", |
data() { |
||||
customerId: localStorage.getItem("customerId"), |
return { |
||||
|
uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2', |
||||
btnDisable: false, |
customerId: localStorage.getItem('customerId'), |
||||
|
|
||||
fmData: { |
btnDisable: false, |
||||
name:"" |
|
||||
}, |
fmData: { |
||||
|
name: '', |
||||
levelOptions: [ |
contactName: '', |
||||
{ |
contactMobile: '', |
||||
value: "0", |
}, |
||||
label: "市级", |
|
||||
}, |
levelOptions: [ |
||||
{ |
{ |
||||
value: "1", |
value: '0', |
||||
label: "区级", |
label: '市级' |
||||
}, |
}, |
||||
{ |
{ |
||||
value: "2", |
value: '1', |
||||
label: "街道级", |
label: '区级' |
||||
}, |
}, |
||||
], |
{ |
||||
categoryOptions: [], |
value: '2', |
||||
}; |
label: '街道级' |
||||
}, |
} |
||||
components: {}, |
], |
||||
computed: { |
categoryOptions: [] |
||||
dataRule() { |
}; |
||||
return { |
}, |
||||
name: [ |
components: {}, |
||||
{ required: true, message: "物业名字不能为空", trigger: "blur" }, |
computed: { |
||||
], |
dataRule() { |
||||
}; |
return { |
||||
}, |
name: [{ required: true, message: '物业名字不能为空', trigger: 'blur' }] |
||||
}, |
}; |
||||
watch: {}, |
} |
||||
|
}, |
||||
async mounted() { |
watch: {}, |
||||
this.initForm(); |
|
||||
}, |
async mounted() { |
||||
|
this.initForm(); |
||||
methods: { |
}, |
||||
async initForm() { |
|
||||
if ( this.formType != "add") { |
methods: { |
||||
this.getInfo(); |
async initForm() { |
||||
} |
if (this.formType != 'add') { |
||||
}, |
this.getInfo(); |
||||
|
} |
||||
async getInfo() { |
}, |
||||
this.fmData.name = this.villageList.name |
|
||||
}, |
async getInfo() { |
||||
|
this.fmData.name = this.villageList.name; |
||||
async handleComfirm() { |
this.fmData.contactName = this.villageList.contactName; |
||||
this.btnDisable = true; |
this.fmData.contactMobile = this.villageList.contactMobile; |
||||
setTimeout(() => { |
}, |
||||
this.btnDisable = false; |
|
||||
}, 10000); |
async handleComfirm() { |
||||
this.$refs["ref_form"].validate((valid, messageObj) => { |
this.btnDisable = true; |
||||
if (!valid) { |
setTimeout(() => { |
||||
app.util.validateRule(messageObj); |
this.btnDisable = false; |
||||
this.btnDisable = false; |
}, 10000); |
||||
} else { |
this.$refs['ref_form'].validate((valid, messageObj) => { |
||||
this.submit(); |
if (!valid) { |
||||
} |
app.util.validateRule(messageObj); |
||||
}); |
this.btnDisable = false; |
||||
}, |
} else { |
||||
|
this.submit(); |
||||
async submit() { |
} |
||||
let url = ""; |
}); |
||||
let params = { ...this.fmData }; |
}, |
||||
if (this.formType === "add") { |
|
||||
url = "/gov/org/propertymanagement/add"; |
async submit() { |
||||
} else { |
let url = ''; |
||||
url = "/gov/org/propertymanagement/update"; |
let params = { ...this.fmData }; |
||||
this.$set(params,"id", this.villageList.id) |
if (this.formType === 'add') { |
||||
} |
url = '/gov/org/propertymanagement/add'; |
||||
const { data, code, msg } = await requestPost(url, params); |
} else { |
||||
|
url = '/gov/org/propertymanagement/update'; |
||||
if (code === 0) { |
this.$set(params, 'id', this.villageList.id); |
||||
this.$message({ |
} |
||||
type: "success", |
const { data, code, msg } = await requestPost(url, params); |
||||
message: "操作成功", |
|
||||
}); |
if (code === 0) { |
||||
this.$emit("afterEdit"); |
this.$message({ |
||||
this.btnDisable = false; |
type: 'success', |
||||
} else { |
message: '操作成功' |
||||
this.btnDisable = false; |
}); |
||||
this.$message.error(msg); |
this.$emit('afterEdit'); |
||||
} |
this.btnDisable = false; |
||||
}, |
} else { |
||||
|
this.btnDisable = false; |
||||
handleCancle() { |
this.$message.error(msg); |
||||
this.$emit("close"); |
} |
||||
}, |
}, |
||||
}, |
|
||||
}; |
handleCancle() { |
||||
</script> |
this.$emit('close'); |
||||
|
} |
||||
<style lang="scss" scoped> |
} |
||||
.item_width_1 { |
}; |
||||
width: 500px; |
</script> |
||||
} |
|
||||
.item_width_2 { |
<style lang="scss" scoped> |
||||
width: 400px; |
.item_width_1 { |
||||
} |
width: 500px; |
||||
.item_width_3 { |
} |
||||
margin-left: 10px; |
.item_width_2 { |
||||
width: 200px; |
width: 400px; |
||||
} |
} |
||||
.item_width_4 { |
.item_width_3 { |
||||
width: 200px; |
margin-left: 10px; |
||||
} |
width: 200px; |
||||
|
} |
||||
.div_map { |
.item_width_4 { |
||||
margin-top: 10px; |
width: 200px; |
||||
} |
} |
||||
|
|
||||
.div_btn { |
.div_map { |
||||
// display: flex; |
margin-top: 10px; |
||||
// justify-content: flex-end; |
} |
||||
} |
|
||||
.el-tabs { |
.div_btn { |
||||
margin: 0 20px; |
// display: flex; |
||||
} |
// justify-content: flex-end; |
||||
.el-upload__tip { |
} |
||||
color: rgb(155, 155, 155); |
.el-tabs { |
||||
margin: 0; |
margin: 0 20px; |
||||
} |
} |
||||
.form { |
.el-upload__tip { |
||||
margin-top: 30px; |
color: rgb(155, 155, 155); |
||||
} |
margin: 0; |
||||
|
} |
||||
.attachement-list { |
.form { |
||||
} |
margin-top: 30px; |
||||
</style> |
} |
||||
|
|
||||
|
.attachement-list { |
||||
|
} |
||||
|
</style> |
||||
|
@ -1,336 +1,285 @@ |
|||||
<template> |
<template> |
||||
<div class="div_main"> |
<div class="div_main"> |
||||
<div v-show="true"> |
<div v-show="true"> |
||||
<div class="div_search"> |
<div class="div_search"> |
||||
<el-form :inline="true" |
<el-form :inline="true" :model="searchData" ref="ref_searchform" :label-width="'80px'"> |
||||
:model="searchData" |
<div> |
||||
ref="ref_searchform" |
<el-form-item label="物业名称" prop="name"> |
||||
:label-width="'80px'"> |
<el-input v-model="searchData.name" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
<div> |
</el-form-item> |
||||
<el-form-item label="物业名称" |
<el-form-item label="物业联系人" prop="contactName"> |
||||
prop="serviceContent"> |
<el-input v-model="searchData.contactName" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
<el-input v-model="searchData.name" |
</el-form-item> |
||||
class="item_width_2" |
<el-form-item label="联系电话" prop="contactMobile"> |
||||
size="small" |
<el-input v-model="searchData.contactMobile" class="item_width_2" size="small" clearable placeholder="请输入"></el-input> |
||||
clearable |
</el-form-item> |
||||
placeholder="请输入"> |
|
||||
</el-input> |
<el-button style="margin-left: 30px" size="small" class="diy-button--search" @click="handleSearch">查询</el-button> |
||||
</el-form-item> |
<el-button style="margin-left: 10px" size="small" class="diy-button--reset" @click="resetSearch">重置</el-button> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
</div> |
||||
<el-button style="margin-left: 30px" |
|
||||
size="small" |
<div class="div_table"> |
||||
class="diy-button--search" |
<div class="div_btn"> |
||||
@click="handleSearch">查询</el-button> |
<el-button class="diy-button--add" size="small" @click="handleAdd">新增</el-button> |
||||
<el-button style="margin-left: 10px" |
|
||||
size="small" |
<!-- <el-button |
||||
class="diy-button--reset" |
|
||||
@click="resetSearch">重置</el-button> |
|
||||
</div> |
|
||||
</el-form> |
|
||||
</div> |
|
||||
|
|
||||
<div class="div_table"> |
|
||||
<div class="div_btn"> |
|
||||
<el-button class="diy-button--add" |
|
||||
size="small" |
|
||||
@click="handleAdd">新增</el-button> |
|
||||
|
|
||||
<!-- <el-button |
|
||||
@click="handleExport" |
@click="handleExport" |
||||
class="diy-button--reset" |
class="diy-button--reset" |
||||
size="small" |
size="small" |
||||
>导出</el-button |
>导出</el-button |
||||
> --> |
> --> |
||||
</div> |
</div> |
||||
|
|
||||
<el-table :data="tableData" |
<el-table :data="tableData" border :header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" class="table" style="width: 100%" :height="maxTableHeight"> |
||||
border |
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" /> |
||||
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }" |
|
||||
class="table" |
<el-table-column prop="name" align="center" label="物业名称" :show-overflow-tooltip="true"></el-table-column> |
||||
style="width: 100%" |
<el-table-column prop="contactName" align="center" label="物业联系人" :show-overflow-tooltip="true"></el-table-column> |
||||
:height="maxTableHeight"> |
<el-table-column prop="contactMobile" align="center" label="联系电话" :show-overflow-tooltip="true"></el-table-column> |
||||
<el-table-column label="序号" |
<el-table-column prop="totalNeighborHood" align="center" label="管理小区数量 " :show-overflow-tooltip="true"></el-table-column> |
||||
fixed="left" |
|
||||
type="index" |
<el-table-column fixed="right" label="操作" align="center" width="200"> |
||||
align="center" |
<template slot-scope="scope"> |
||||
width="50" /> |
<el-button @click="handleWatch(scope.row)" type="text" size="small" class=".div-table-button--detail">查看</el-button> |
||||
|
<el-button @click="handleEdit(scope.row)" type="text" size="small" class="div-table-button--edit">编辑</el-button> |
||||
<el-table-column prop="name" |
|
||||
align="center" |
<el-popconfirm title="删除之后无法回复,确认删除?" @onConfirm="handleDelete(scope.row, scope.$index)" @confirm="handleDelete(scope.row, scope.$index)"> |
||||
label="物业名称" |
<el-button slot="reference" type="text" size="small" style="margin-left: 10px" class="div-table-button--delete">删除</el-button> |
||||
:show-overflow-tooltip="true"> |
</el-popconfirm> |
||||
</el-table-column> |
</template> |
||||
|
</el-table-column> |
||||
<el-table-column prop="totalNeighborHood" |
</el-table> |
||||
align="center" |
|
||||
label="管理小区数量 " |
<div> |
||||
:show-overflow-tooltip="true"> |
<el-pagination |
||||
</el-table-column> |
@size-change="handleSizeChange" |
||||
|
@current-change="handleCurrentChange" |
||||
<el-table-column fixed="right" |
:current-page.sync="pageNo" |
||||
label="操作" |
:page-sizes="[20, 50, 100, 200]" |
||||
align="center" |
:page-size="parseInt(pageSize)" |
||||
width="200"> |
layout="sizes, prev, pager, next, total" |
||||
<template slot-scope="scope"> |
:total="total" |
||||
<el-button @click="handleWatch(scope.row)" |
></el-pagination> |
||||
type="text" |
</div> |
||||
size="small" |
</div> |
||||
class=".div-table-button--detail">查看</el-button> |
</div> |
||||
<el-button @click="handleEdit(scope.row)" |
|
||||
type="text" |
<!-- 修改弹出框 --> |
||||
size="small" |
<el-dialog |
||||
class="div-table-button--edit">编辑</el-button> |
v-if="formShow" |
||||
|
:visible.sync="formShow" |
||||
<el-popconfirm title="删除之后无法回复,确认删除?" |
:close-on-click-modal="false" |
||||
@onConfirm="handleDelete(scope.row, scope.$index)" |
:close-on-press-escape="false" |
||||
@confirm="handleDelete(scope.row, scope.$index)"> |
:title="formTitle" |
||||
<el-button slot="reference" |
width="850px" |
||||
type="text" |
top="5vh" |
||||
size="small" |
class="dialog-h" |
||||
style="margin-left: 10px" |
@closed="handleClose" |
||||
class="div-table-button--delete">删除</el-button> |
> |
||||
</el-popconfirm> |
<edit-form ref="eleEditForm" :formId="formId" :formType="formType" @close="handleClose" :villageList="villageList" @afterEdit="handleEditSuccess"></edit-form> |
||||
</template> |
</el-dialog> |
||||
</el-table-column> |
|
||||
</el-table> |
<!-- 详情弹出框 --> |
||||
|
<el-dialog |
||||
<div> |
v-if="detailShow" |
||||
<el-pagination @size-change="handleSizeChange" |
:visible.sync="detailShow" |
||||
@current-change="handleCurrentChange" |
:close-on-click-modal="false" |
||||
:current-page.sync="pageNo" |
:close-on-press-escape="false" |
||||
:page-sizes="[20, 50, 100, 200]" |
:title="'详情'" |
||||
:page-size="parseInt(pageSize)" |
width="850px" |
||||
layout="sizes, prev, pager, next, total" |
top="5vh" |
||||
:total="total"> |
class="dialog-h" |
||||
</el-pagination> |
@closed="handleClose" |
||||
</div> |
> |
||||
</div> |
<detail-form ref="ref_form_detail" :formId="formId" :villageList="villageList" @diaDetailClose="handleClose"></detail-form> |
||||
</div> |
</el-dialog> |
||||
|
</div> |
||||
<!-- 修改弹出框 --> |
</template> |
||||
<el-dialog v-if="formShow" |
|
||||
:visible.sync="formShow" |
<script> |
||||
:close-on-click-modal="false" |
import { requestPost } from '@/js/dai/request'; |
||||
:close-on-press-escape="false" |
import nextTick from 'dai-js/tools/nextTick'; |
||||
:title="formTitle" |
import { mapGetters } from 'vuex'; |
||||
width="850px" |
import axios from 'axios'; |
||||
top="5vh" |
import editForm from './cpts/edit'; |
||||
class="dialog-h" |
import detailForm from './cpts/detail'; |
||||
@closed="handleClose"> |
|
||||
<edit-form ref="eleEditForm" |
function iniSearchData() { |
||||
:formId="formId" |
return { |
||||
:formType="formType" |
name: '', |
||||
@close="handleClose" |
contactName: '', |
||||
:villageList="villageList" |
contactMobile: '' |
||||
@afterEdit="handleEditSuccess"></edit-form> |
}; |
||||
</el-dialog> |
} |
||||
|
|
||||
<!-- 详情弹出框 --> |
export default { |
||||
<el-dialog v-if="detailShow" |
components: { editForm, detailForm }, |
||||
:visible.sync="detailShow" |
|
||||
:close-on-click-modal="false" |
data() { |
||||
:close-on-press-escape="false" |
return { |
||||
|
tableData: [], |
||||
:title="'详情'" |
villageList: {}, |
||||
width="850px" |
searchData: iniSearchData(), |
||||
top="5vh" |
categoryOptions: [], |
||||
class="dialog-h" |
|
||||
@closed="handleClose"> |
pageNo: 1, |
||||
<detail-form ref="ref_form_detail" |
pageSize: window.localStorage.getItem('pageSize') || 20, |
||||
:formId="formId" |
total: 1, |
||||
:villageList="villageList" |
|
||||
@diaDetailClose="handleClose"></detail-form> |
formId: '', |
||||
</el-dialog> |
formShow: false, |
||||
</div> |
formTitle: '服务项目', |
||||
</template> |
formType: '', // 列表list 新增add 修改edit 详情info |
||||
|
|
||||
<script> |
detailShow: false |
||||
import { requestPost } from "@/js/dai/request"; |
}; |
||||
import nextTick from "dai-js/tools/nextTick"; |
}, |
||||
import { mapGetters } from "vuex"; |
computed: { |
||||
import axios from "axios"; |
maxTableHeight() { |
||||
import editForm from "./cpts/edit"; |
return this.$store.state.inIframe ? this.clientHeight - 410 + this.iframeHeigh : this.clientHeight - 410; |
||||
import detailForm from "./cpts/detail"; |
}, |
||||
|
...mapGetters(['clientHeight', 'iframeHeight']) |
||||
function iniSearchData () { |
}, |
||||
return { |
|
||||
name: "", |
mounted() { |
||||
}; |
console.log(this.$store.state); |
||||
} |
this.user = this.$store.state.user; |
||||
|
this.getTableData(); |
||||
export default { |
}, |
||||
components: { editForm, detailForm }, |
methods: { |
||||
|
handleSearch(val) { |
||||
data () { |
console.log(this.searchData); |
||||
return { |
this.pageNo = 1; |
||||
tableData: [], |
this.getTableData(); |
||||
villageList:{}, |
}, |
||||
searchData: iniSearchData(), |
|
||||
categoryOptions: [], |
async handleExport() { |
||||
|
const url = '/gov/project/icEvent/export'; |
||||
pageNo: 1, |
const { pageSize, pageNo, searchData } = this; |
||||
pageSize: window.localStorage.getItem("pageSize") || 20, |
axios({ |
||||
total: 1, |
url: window.SITE_CONFIG['apiURL'] + url, |
||||
|
method: 'post', |
||||
formId: "", |
data: { |
||||
formShow: false, |
pageSize, |
||||
formTitle: "服务项目", |
pageNo, |
||||
formType: "", // 列表list 新增add 修改edit 详情info |
...searchData |
||||
|
}, |
||||
detailShow: false, |
responseType: 'blob' |
||||
}; |
}) |
||||
}, |
.then(res => { |
||||
computed: { |
let fileName = window.decodeURI(res.headers['content-disposition'].split(';')[1].split('=')[1]); |
||||
maxTableHeight () { |
console.log('filename', fileName); |
||||
return this.$store.state.inIframe |
let blob = new Blob([res.data], { type: 'application/vnd.ms-excel' }); |
||||
? this.clientHeight - 410 + this.iframeHeigh |
var url = window.URL.createObjectURL(blob); |
||||
: this.clientHeight - 410; |
var aLink = document.createElement('a'); |
||||
}, |
aLink.style.display = 'none'; |
||||
...mapGetters(["clientHeight", "iframeHeight"]), |
aLink.href = url; |
||||
}, |
aLink.setAttribute('download', fileName); |
||||
|
document.body.appendChild(aLink); |
||||
mounted () { |
aLink.click(); |
||||
console.log(this.$store.state); |
document.body.removeChild(aLink); //下载完成移除元素 |
||||
this.user = this.$store.state.user; |
window.URL.revokeObjectURL(url); //释放掉blob对象 |
||||
this.getTableData(); |
}) |
||||
}, |
.catch(err => { |
||||
methods: { |
console.log('获取导出情失败', err); |
||||
handleSearch (val) { |
return this.$message.error('网络错误'); |
||||
console.log(this.searchData); |
}); |
||||
this.pageNo = 1; |
}, |
||||
this.getTableData(); |
|
||||
}, |
handleAdd() { |
||||
|
this.formType = 'add'; |
||||
async handleExport () { |
this.formTitle = '新增'; |
||||
const url = "/gov/project/icEvent/export"; |
this.formShow = true; |
||||
const { pageSize, pageNo, searchData } = this; |
}, |
||||
axios({ |
|
||||
url: window.SITE_CONFIG["apiURL"] + url, |
handleWatch(row) { |
||||
method: "post", |
// this.formType = "watch"; |
||||
data: { |
this.villageList = row; |
||||
pageSize, |
// this.formTitle = "查看"; |
||||
pageNo, |
// this.formShow = true; |
||||
...searchData, |
console.log(this.villageList); |
||||
}, |
this.detailShow = true; |
||||
responseType: "blob", |
}, |
||||
}) |
|
||||
.then((res) => { |
handleEdit(row) { |
||||
let fileName = window.decodeURI( |
this.formType = 'edit'; |
||||
res.headers["content-disposition"].split(";")[1].split("=")[1] |
this.formId = row.villageId; |
||||
); |
this.villageList = row; |
||||
console.log("filename", fileName); |
this.formTitle = '编辑'; |
||||
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" }); |
this.formShow = true; |
||||
var url = window.URL.createObjectURL(blob); |
}, |
||||
var aLink = document.createElement("a"); |
|
||||
aLink.style.display = "none"; |
handleClose() { |
||||
aLink.href = url; |
this.formShow = false; |
||||
aLink.setAttribute("download", fileName); |
this.detailShow = false; |
||||
document.body.appendChild(aLink); |
}, |
||||
aLink.click(); |
|
||||
document.body.removeChild(aLink); //下载完成移除元素 |
handleEditSuccess() { |
||||
window.URL.revokeObjectURL(url); //释放掉blob对象 |
this.handleClose(); |
||||
}) |
this.getTableData(); |
||||
.catch((err) => { |
}, |
||||
console.log("获取导出情失败", err); |
|
||||
return this.$message.error("网络错误"); |
async handleDelete(rowData, rowIndex) { |
||||
}); |
console.log(rowData, rowIndex); |
||||
}, |
const url = '/gov/org/propertymanagement/delete'; |
||||
|
let params = { id: rowData.id }; |
||||
handleAdd () { |
const { data, code, msg } = await requestPost(url, params); |
||||
this.formType = "add"; |
if (code === 0) { |
||||
this.formTitle = "新增"; |
this.$message.success('删除成功!'); |
||||
this.formShow = true; |
this.getTableData(); |
||||
}, |
} else { |
||||
|
if (code >= 8000) { |
||||
handleWatch (row) { |
this.$message.error(msg); |
||||
// this.formType = "watch"; |
} else { |
||||
this.villageList = row |
this.$message.error('操作失败!'); |
||||
// this.formTitle = "查看"; |
} |
||||
// this.formShow = true; |
} |
||||
console.log(this.villageList); |
}, |
||||
this.detailShow = true |
|
||||
}, |
async getTableData() { |
||||
|
const url = '/gov/org/propertymanagement/page'; |
||||
handleEdit (row) { |
|
||||
this.formType = "edit"; |
const { pageSize, pageNo, searchData } = this; |
||||
this.formId = row.villageId; |
const { data, code, msg } = await requestPost(url, { |
||||
this.villageList = row |
pageSize, |
||||
this.formTitle = "编辑"; |
pageNo, |
||||
this.formShow = true; |
...searchData |
||||
}, |
}); |
||||
|
|
||||
handleClose () { |
if (code === 0) { |
||||
this.formShow = false; |
this.total = data.total || 0; |
||||
this.detailShow = false |
this.tableData = data.list |
||||
}, |
? data.list.map(item => { |
||||
|
return item; |
||||
handleEditSuccess () { |
}) |
||||
this.handleClose(); |
: []; |
||||
this.getTableData(); |
} else { |
||||
}, |
this.$message.error(msg); |
||||
|
} |
||||
async handleDelete (rowData, rowIndex) { |
}, |
||||
console.log(rowData, rowIndex); |
|
||||
const url = "/gov/org/propertymanagement/delete"; |
handleSizeChange(val) { |
||||
let params = {id : rowData.id} |
this.pageSize = val; |
||||
const { data, code, msg } = await requestPost(url,params); |
window.localStorage.setItem('pageSize', val); |
||||
if (code === 0) { |
this.getTableData(); |
||||
this.$message.success("删除成功!"); |
}, |
||||
this.getTableData(); |
handleCurrentChange(val) { |
||||
} else { |
this.pageNo = val; |
||||
if(code>=8000){ |
this.getTableData(); |
||||
this.$message.error(msg); |
}, |
||||
}else{ |
|
||||
this.$message.error("操作失败!"); |
resetSearch() { |
||||
} |
this.searchData = iniSearchData(); |
||||
} |
this.getTableData(); |
||||
}, |
} |
||||
|
} |
||||
async getTableData () { |
}; |
||||
const url = "/gov/org/propertymanagement/page"; |
</script> |
||||
|
|
||||
const { pageSize, pageNo, searchData } = this; |
<style lang="scss" scoped> |
||||
const { data, code, msg } = await requestPost(url, { |
@import '@/assets/scss/buttonstyle.scss'; |
||||
pageSize, |
@import '@/assets/scss/modules/management/list-main.scss'; |
||||
pageNo, |
@import '@/assets/scss/modules/shequzhili/event-info.scss'; |
||||
...searchData, |
</style> |
||||
}); |
|
||||
|
|
||||
if (code === 0) { |
|
||||
this.total = data.total || 0; |
|
||||
this.tableData = data.list |
|
||||
? data.list.map((item) => { |
|
||||
return item; |
|
||||
}) |
|
||||
: []; |
|
||||
} else { |
|
||||
this.$message.error(msg); |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
handleSizeChange (val) { |
|
||||
this.pageSize = val; |
|
||||
window.localStorage.setItem("pageSize", val); |
|
||||
this.getTableData(); |
|
||||
}, |
|
||||
handleCurrentChange (val) { |
|
||||
this.pageNo = val; |
|
||||
this.getTableData(); |
|
||||
}, |
|
||||
|
|
||||
resetSearch () { |
|
||||
this.searchData = iniSearchData(); |
|
||||
this.getTableData(); |
|
||||
}, |
|
||||
}, |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss" scoped> |
|
||||
@import "@/assets/scss/buttonstyle.scss"; |
|
||||
@import "@/assets/scss/modules/management/list-main.scss"; |
|
||||
@import "@/assets/scss/modules/shequzhili/event-info.scss"; |
|
||||
</style> |
|
||||
|
|
||||
|
Loading…
Reference in new issue