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

修改bug

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