提交 19dd7385 authored 作者: 宋雄's avatar 宋雄

修改bug

上级 d57a4bbf
NODE_ENV=development
# VUE_APP_API_BASE_URL='http://192.168.0.119:9999'
VUE_APP_API_BASE_URL='http://192.168.0.102:9999'
VUE_APP_API_BASE_URL='http://192.168.0.101:9999'
# VUE_APP_API_BASE_URL='http://220.203.25.212:9999'
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
......
......@@ -80,6 +80,7 @@ const geCommunityOwnertInfoApi = (params)=>getAction("/property-community/info/c
const auditCommunityOwnerApi = (params)=>postAction("/property-community/info/communityOwner/audit",params);
const downloadOwnerTemplate = (params)=>postAction("/property-community/info/communityOwner/downloadOwnerTemplate",params);
const setOwnerLabelApi = (params)=>postAction("/property-community/ownerlabel/ownerLabel/add",params);
const editOwnerLabelApi = (params)=>postAction("/property-community//ownerlabel/ownerLabel/edit",params);
const setCommunityOwnerLabelApi = (params)=>postAction("/property-community/info/communityOwner/setLabel",params);
const geQueryByOwnerIdApi = (params)=>getAction("/property-community/info/communityOwner/queryByOwnerId",params);
const geCommunityDeleteApi = (params)=>getAction("/property-community/ownerlabel/ownerLabel/delete",params);
......@@ -242,6 +243,7 @@ export {
auditPropertyApi,
freezeOrPropertyApi,
setOwnerLabelApi,
editOwnerLabelApi,
setCommunityOwnerLabelApi,
geQueryByOwnerIdApi,
geCommunityDeleteApi
......
......@@ -72,8 +72,10 @@
this.initDepartComponent()
},
visible: {
handler() {
this.loadDepart();
handler(newV) {
if(newV) {
this.loadDepart();
}
this.initDepartComponent(true)
}
}
......
......@@ -68,7 +68,7 @@
@change="handleTableChange"
>
<span slot="bedroomCount" slot-scope="text, record">
<span>{{record.bedroomCount}}{{record.officeCount}}{{record.kitchenCount}}{{record.officeCount}}</span>
<span>{{record.bedroomCount ? `${record.bedroomCount}室` : ''}}{{record.officeCount ? `${record.officeCount}厅` : ''}}{{record.kitchenCount ? `${record.kitchenCount}厨` : ''}}{{record.officeCount ? `${record.officeCount}卫` : ''}}</span>
</span>
<span slot="action" slot-scope="text, record">
<a @click="onGetDetail(record, 'edit')">编辑</a>
......
......@@ -161,7 +161,7 @@
<div class="row-box">
<a-row type="flex" justify="end">
<a-button @click="onCancel">返回</a-button>
<a-button v-if="labelType !== '3'" @click="onSubmit" type="primary" style="margin-left: 10px;">确认</a-button>
<a-button :loading="isLoading" v-if="labelType !== '3'" @click="onSubmit" type="primary" style="margin-left: 10px;">确认</a-button>
</a-row>
</div>
</a-spin>
......@@ -169,14 +169,15 @@
</template>
<script>
import { geCommunityOwnertInfoApi, setOwnerLabelApi, setCommunityOwnerLabelApi } from '@/api/api'
import { geCommunityOwnertInfoApi, setOwnerLabelApi, editOwnerLabelApi, setCommunityOwnerLabelApi } from '@/api/api'
import {RELATION_SHIP, INDUSTRY_JOB, OWNER_LEBEL} from '@/assets/static.js'
let isPoorEdit = false
export default {
name: 'PropertyChargruleForm',
inject:['closeCurrent'],
data () {
return {
isLoading: false,
labelType: '2',
relationShipList: RELATION_SHIP,
ownerPotionLists: INDUSTRY_JOB,
......@@ -266,6 +267,24 @@
this.formParamas.accessAddress = result.communityVo.accessAddress
this.formParamas.committeeName = result.committee ? result.committee.committeeName : ''
}
if(this.labelType === '2' && result.destituteInfo) {
isPoorEdit = true
let labelCodes = result.destituteInfo.labelCode.split(',')
let labelDescs = result.destituteInfo.labelDesc.split(',')
let potions = labelCodes.map((item, index)=> {
return {
key: item,
label: labelDescs[index]
}
})
let formModel = {
potions,
labelCode: result.destituteInfo ? result.destituteInfo.labelCode : null,
labelImg: result.destituteInfo ? result.destituteInfo.labelImg : null,
labelRemark: result.destituteInfo ? result.destituteInfo.labelRemark : null
}
this.formModel = {...formModel}
}
if(this.labelType === '3') {
let formParamas = {
accessAddress: result.communityVo.accessAddress,
......@@ -309,6 +328,7 @@
this.$message.success("复制成功!");
},
async onSubmit() {
this.isLoading = true
this.$refs.form.validate(valid => {
if (valid) {
if(this.labelType === '1') {
......@@ -322,27 +342,53 @@
} else {
this.$message.warning(res.message);
}
this.isLoading = false
}).catch(err=> {
console.log(err)
this.isLoading = false
})
} else {
let labelCode = this.formModel.potions.map(item=>item.key).join(',')
let labelDesc = this.formModel.potions.map(item=>item.label).join(',')
setOwnerLabelApi({
ownerId: this.$route.query.id,
labelImg: this.formModel.labelImg,
labelRemark: this.formModel.labelRemark,
labelCode,
labelDesc
}).then(res=> {
if(res.code === 200) {
this.$message.success(res.message);
this.closeCurrent()
} else {
this.$message.warning(res.message);
}
})
if(isPoorEdit) {
editOwnerLabelApi({
ownerId: this.$route.query.id,
labelImg: this.formModel.labelImg,
labelRemark: this.formModel.labelRemark,
labelCode,
labelDesc
}).then(res=> {
if(res.code === 200) {
this.$message.success(res.message);
this.closeCurrent()
} else {
this.$message.warning(res.message);
}
this.isLoading = false
}).catch(err=> {
this.isLoading = false
})
} else {
setOwnerLabelApi({
ownerId: this.$route.query.id,
labelImg: this.formModel.labelImg,
labelRemark: this.formModel.labelRemark,
labelCode,
labelDesc
}).then(res=> {
if(res.code === 200) {
this.$message.success(res.message);
this.closeCurrent()
} else {
this.$message.warning(res.message);
}
this.isLoading = false
}).catch(err=> {
this.isLoading = false
})
}
}
} else {
this.isLoading = false
}
})
}
......
......@@ -118,8 +118,8 @@
<a-menu-item v-if="!record.labelCommitteeCode">
<a href="javascript:;" @click="onHandleSetting(record.id, '1')">设置业委会</a>
</a-menu-item>
<a-menu-item v-if="record.destituteAuditStatus !== 'auditPass'">
<a href="javascript:;" @click="onHandleSetting(record.id, '2')">设置特困人员</a>
<a-menu-item v-if="record.destituteAuditStatus !== 'auditPass' && record.destituteAuditStatus !== 'waitAudit'">
<a href="javascript:;" @click="onHandleSetting(record.id, '2')">{{record.destituteAuditStatus === 'refuse' ? '修改特困人员' : '设置特困人员'}}</a>
</a-menu-item>
<a-menu-item v-if="!!record.labelCommitteeCode">
<a-popconfirm title="确定撤销业委会吗?" @confirm="()=> onDeleteIndustry(record.id)" placement="topLeft">
......@@ -259,7 +259,11 @@ export default {
return {
treeDataFlag: true,
useOptions: [],
certificationOptions: [],
certificationOptions: [
{label: '待审核', value: 'waitAudit'},
{label: '审核通过', value: 'auditPass'},
{label: '已驳回', value: 'refuse'}
],
// 表头
columns: columns,
url: {
......@@ -291,7 +295,7 @@ export default {
},
created() {
this.getBuildingList()
this.initDictData()
// this.initDictData()
},
computed: {
importExcelUrl: function () {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论