Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_webapp into dev
This commit is contained in:
		
							
								
								
									
										35
									
								
								packages/party/AppPartyScore/AppPartyScore.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								packages/party/AppPartyScore/AppPartyScore.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | |||||||
|  | <template> | ||||||
|  |   <section class="AppPartyScore"> | ||||||
|  |     <component :is="currentPage" v-bind="$props"/> | ||||||
|  |   </section> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script> | ||||||
|  | import PsList from "./psList"; | ||||||
|  | import PsDetail from "./psDetail"; | ||||||
|  |  | ||||||
|  | export default { | ||||||
|  |   name: "AppPartyScore", | ||||||
|  |   components: {PsDetail, PsList}, | ||||||
|  |   label: "党员积分", | ||||||
|  |   props: { | ||||||
|  |     instance: Function, | ||||||
|  |     dict: Object, | ||||||
|  |     permissions: Function | ||||||
|  |   }, | ||||||
|  |   computed: { | ||||||
|  |     currentPage() { | ||||||
|  |       return this.$route.query.id ? PsDetail : PsList | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.dict.load("residentType", "householdRelation") | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .AppPartyScore { | ||||||
|  |   height: 100%; | ||||||
|  | } | ||||||
|  | </style> | ||||||
							
								
								
									
										101
									
								
								packages/party/AppPartyScore/psDetail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										101
									
								
								packages/party/AppPartyScore/psDetail.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,101 @@ | |||||||
|  | <template> | ||||||
|  |   <section class="psDetail"> | ||||||
|  |     <ai-detail> | ||||||
|  |       <ai-title slot="title" title="积分详情" isShowBottomBorder isShowBack @onBackClick="back"/> | ||||||
|  |       <template #content> | ||||||
|  |         <el-row type="flex"> | ||||||
|  |           <ai-card hideTitle class="staCard fill"> | ||||||
|  |             <template #content> | ||||||
|  |               <div class="color-999" v-text="`姓名`"/> | ||||||
|  |               <b v-text="detail.name"/> | ||||||
|  |             </template> | ||||||
|  |           </ai-card> | ||||||
|  |           <ai-card hideTitle class="staCard fill"> | ||||||
|  |             <template #content> | ||||||
|  |               <div class="color-999" v-text="`个人积分`"/> | ||||||
|  |               <b class="color-26f" v-text="detail.name||0"/> | ||||||
|  |             </template> | ||||||
|  |           </ai-card> | ||||||
|  |           <ai-card hideTitle class="staCard fill"> | ||||||
|  |             <template #content> | ||||||
|  |               <div class="color-999" v-text="`家庭积分`"/> | ||||||
|  |               <b class="color-26f" v-text="detail.name||0"/> | ||||||
|  |             </template> | ||||||
|  |           </ai-card> | ||||||
|  |         </el-row> | ||||||
|  |         <ai-card title="余额变动明细"> | ||||||
|  |           <template #content> | ||||||
|  |             <ai-table :tableData="detail.list" :isShowPagination="false" :col-configs="colConfigs" :dict="dict"/> | ||||||
|  |           </template> | ||||||
|  |         </ai-card> | ||||||
|  |       </template> | ||||||
|  |     </ai-detail> | ||||||
|  |   </section> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script> | ||||||
|  | export default { | ||||||
|  |   name: "psDetail", | ||||||
|  |   props: { | ||||||
|  |     instance: Function, | ||||||
|  |     dict: Object, | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       detail: {}, | ||||||
|  |       colConfigs: [ | ||||||
|  |         {label: "时间", prop: "createTime", width: 120}, | ||||||
|  |         {label: "类型", prop: "createTime", align: 'center'}, | ||||||
|  |         {label: "变动积分", prop: "createTime", align: 'center'}, | ||||||
|  |         {label: "剩余积分", prop: "createTime", align: 'center'}, | ||||||
|  |         {label: "调整说明", prop: "createTime"}, | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     getDetail() { | ||||||
|  |       let {id} = this.$route.query | ||||||
|  |       this.instance.post("/app/appparty/list", null, { | ||||||
|  |         params: {id} | ||||||
|  |       }).then(res => { | ||||||
|  |         if (res?.data) { | ||||||
|  |           this.detail = res.data | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     back() { | ||||||
|  |       this.$router.push({}) | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.getDetail() | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .psDetail { | ||||||
|  |   height: 100%; | ||||||
|  |  | ||||||
|  |   .color-999 { | ||||||
|  |     color: #999; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   .color-26f { | ||||||
|  |     color: #26f; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   .staCard { | ||||||
|  |     font-size: 14px; | ||||||
|  |  | ||||||
|  |     b { | ||||||
|  |       margin-top: 8px; | ||||||
|  |       font-size: 24px; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     & + .staCard { | ||||||
|  |       margin-left: 16px; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </style> | ||||||
							
								
								
									
										103
									
								
								packages/party/AppPartyScore/psList.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								packages/party/AppPartyScore/psList.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,103 @@ | |||||||
|  | <template> | ||||||
|  |   <section class="psList"> | ||||||
|  |     <ai-list> | ||||||
|  |       <ai-title slot="title" title="党员积分" isShowBottomBorder/> | ||||||
|  |       <template #content> | ||||||
|  |         <ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" | ||||||
|  |                   @getList="getTableData" :col-configs="colConfigs" :dict="dict"> | ||||||
|  |           <el-table-column slot="options" label="操作" fixed="right" align="center"> | ||||||
|  |             <template slot-scope="{row}"> | ||||||
|  |               <el-button type="text" @click="getFamilyByPartyId(row.idNumber)">家庭成员</el-button> | ||||||
|  |               <el-button type="text" @click="showDetail(row.id)">详情</el-button> | ||||||
|  |             </template> | ||||||
|  |           </el-table-column> | ||||||
|  |         </ai-table> | ||||||
|  |       </template> | ||||||
|  |     </ai-list> | ||||||
|  |     <ai-dialog :visible.sync="dialog" title="家庭成员" :customFooter="true" width="780px" @close="familyList=[]"> | ||||||
|  |       <ai-table :tableData="familyList" :isShowPagination="false" :col-configs="familyCols" :dict="dict"/> | ||||||
|  |       <div class="dialog-footer" slot="footer"> | ||||||
|  |         <el-button @click="dialog=false">关 闭</el-button> | ||||||
|  |       </div> | ||||||
|  |     </ai-dialog> | ||||||
|  |   </section> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script> | ||||||
|  | import {mapState} from "vuex"; | ||||||
|  |  | ||||||
|  | export default { | ||||||
|  |   name: "psList", | ||||||
|  |   props: { | ||||||
|  |     instance: Function, | ||||||
|  |     dict: Object, | ||||||
|  |   }, | ||||||
|  |   computed: { | ||||||
|  |     ...mapState(['user']), | ||||||
|  |     colConfigs() { | ||||||
|  |       return [ | ||||||
|  |         {label: "姓名", prop: "name"}, | ||||||
|  |         {label: "个人积分", prop: "integral", align: "center"}, | ||||||
|  |         {label: "家庭积分", prop: "familySurplusIntegral", align: "center"}, | ||||||
|  |         {slot: "options"} | ||||||
|  |       ] | ||||||
|  |     }, | ||||||
|  |     familyCols() { | ||||||
|  |       return [ | ||||||
|  |         {label: '与户主关系', prop: 'householdRelation', align: 'center', width: 165, | ||||||
|  |           render: (h, {row}) => h('p', dict.getLabel('householdRelation', row.householdRelation||"户主"))}, | ||||||
|  |         {label: '类型', prop: 'residentType', align: 'center', dict: "residentType"}, | ||||||
|  |         {label: '姓名', prop: 'name', align: 'center'}, | ||||||
|  |         {label: '身份证号', render: (h, {row}) => h('p', this.idCardNoUtil.hideId(row.idNumber)), width: 165}, | ||||||
|  |         {label: '联系电话', prop: 'phone', align: 'center', width: 120} | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       search: {}, | ||||||
|  |       page: {current: 1, size: 10, total: 0}, | ||||||
|  |       tableData: [], | ||||||
|  |       dialog: false, | ||||||
|  |       familyList: [], | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     back() { | ||||||
|  |       this.$router.push({}) | ||||||
|  |     }, | ||||||
|  |     getTableData() { | ||||||
|  |       this.instance.post("/app/appparty/listByPartyIntegral", null, { | ||||||
|  |         params: {...this.page, ...this.search} | ||||||
|  |       }).then(res => { | ||||||
|  |         if (res?.data) { | ||||||
|  |           this.tableData = res.data?.records | ||||||
|  |           this.page.total = res.data.total | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     showDetail(id) { | ||||||
|  |       this.$router.push({query: {id}}) | ||||||
|  |     }, | ||||||
|  |     getFamilyByPartyId(idNumber) { | ||||||
|  |       this.instance.post("/app/appresident/queryHomeMember", null, { | ||||||
|  |         params: {idNumber} | ||||||
|  |       }).then(res => { | ||||||
|  |         if (res?.data) { | ||||||
|  |           this.familyList = res.data?.records | ||||||
|  |           this.dialog = true | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.getTableData() | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .psList { | ||||||
|  |   height: 100%; | ||||||
|  | } | ||||||
|  | </style> | ||||||
| @@ -9,11 +9,13 @@ import List from './components/List' | |||||||
| import Add from './components/Add' | import Add from './components/Add' | ||||||
| import Detail from './components/Detail' | import Detail from './components/Detail' | ||||||
| import {mapState} from "vuex"; | import {mapState} from "vuex"; | ||||||
|  | import NeighbourSetting from "./components/neighbourSetting"; | ||||||
|  |  | ||||||
| export default { | export default { | ||||||
|   name: 'AppPartyMember', |   name: 'AppPartyMember', | ||||||
|   label: '党员管理', |   label: '党员管理', | ||||||
|   components: { |   components: { | ||||||
|  |     NeighbourSetting, | ||||||
|     Add, |     Add, | ||||||
|     List, |     List, | ||||||
|     Detail |     Detail | ||||||
| @@ -32,6 +34,8 @@ export default { | |||||||
|     component() { |     component() { | ||||||
|       if (this.$route.hash == "#add") { |       if (this.$route.hash == "#add") { | ||||||
|         return Add |         return Add | ||||||
|  |       } else if (this.$route.hash == "#ns") { | ||||||
|  |         return NeighbourSetting | ||||||
|       } else if (this.$route.query.id) { |       } else if (this.$route.query.id) { | ||||||
|         return Detail |         return Detail | ||||||
|       } else return List |       } else return List | ||||||
|   | |||||||
| @@ -2,12 +2,7 @@ | |||||||
|   <ai-detail class="party"> |   <ai-detail class="party"> | ||||||
|     <ai-title slot="title" :title="isEdit ? '编辑党员' : '添加党员'" isShowBack isShowBottomBorder @onBackClick="cancel"/> |     <ai-title slot="title" :title="isEdit ? '编辑党员' : '添加党员'" isShowBack isShowBottomBorder @onBackClick="cancel"/> | ||||||
|     <template slot="content"> |     <template slot="content"> | ||||||
|       <el-form |       <el-form ref="form" :model="form" label-width="110px" label-position="right"> | ||||||
|           ref="form" |  | ||||||
|           :model="form" |  | ||||||
|           label-width="110px" |  | ||||||
|           label-position="right" |  | ||||||
|       > |  | ||||||
|         <ai-card title="个人信息"> |         <ai-card title="个人信息"> | ||||||
|           <template #content> |           <template #content> | ||||||
|             <el-alert |             <el-alert | ||||||
| @@ -75,7 +70,6 @@ | |||||||
|               <el-form-item label="个人照片" prop="photo"> |               <el-form-item label="个人照片" prop="photo"> | ||||||
|                 <ai-avatar :instance="instance" v-model="form.avatarUrl"/> |                 <ai-avatar :instance="instance" v-model="form.avatarUrl"/> | ||||||
|               </el-form-item> |               </el-form-item> | ||||||
|  |  | ||||||
|               <el-form-item label="性别" prop="sex"> |               <el-form-item label="性别" prop="sex"> | ||||||
|                 <ai-select |                 <ai-select | ||||||
|                     disabled |                     disabled | ||||||
| @@ -316,6 +310,14 @@ | |||||||
|             </el-form-item> |             </el-form-item> | ||||||
|           </div> |           </div> | ||||||
|         </ai-card> |         </ai-card> | ||||||
|  |         <ai-card title="党员简介"> | ||||||
|  |           <template #content> | ||||||
|  |             <el-form-item label="党员个人简介" prop="personalProfile"> | ||||||
|  |               <el-input type="textarea" v-model="form.personalProfile" clearable maxlength="1000" show-word-limit | ||||||
|  |                         rows="5" placeholder="请输入党员个人简介"/> | ||||||
|  |             </el-form-item> | ||||||
|  |           </template> | ||||||
|  |         </ai-card> | ||||||
|         <ai-card title="流动信息"> |         <ai-card title="流动信息"> | ||||||
|           <div class="ai-form" slot="content"> |           <div class="ai-form" slot="content"> | ||||||
|             <el-form-item |             <el-form-item | ||||||
|   | |||||||
| @@ -66,6 +66,11 @@ | |||||||
|             </ai-wrapper> |             </ai-wrapper> | ||||||
|           </template> |           </template> | ||||||
|         </ai-card> |         </ai-card> | ||||||
|  |         <ai-card title="党员简介"> | ||||||
|  |           <template #content> | ||||||
|  |             <div v-text="info.personalProfile"/> | ||||||
|  |           </template> | ||||||
|  |         </ai-card> | ||||||
|         <ai-card title="流动信息"> |         <ai-card title="流动信息"> | ||||||
|           <template #content> |           <template #content> | ||||||
|             <ai-wrapper |             <ai-wrapper | ||||||
| @@ -317,7 +322,7 @@ export default { | |||||||
|       }).then(res => { |       }).then(res => { | ||||||
|         if (res?.data) { |         if (res?.data) { | ||||||
|           this.info = res.data |           this.info = res.data | ||||||
|           if(this.info.birthday) { |           if (this.info.birthday) { | ||||||
|             this.info.birthday = this.info.birthday.substring(0, 10) |             this.info.birthday = this.info.birthday.substring(0, 10) | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -114,12 +114,13 @@ | |||||||
|           :size.sync="search.size" |           :size.sync="search.size" | ||||||
|           @handleSelectionChange="handleSelectionChange" |           @handleSelectionChange="handleSelectionChange" | ||||||
|           @getList="getList"> |           @getList="getList"> | ||||||
|         <el-table-column slot="options" width="160px" fixed="right" label="操作" align="center"> |         <el-table-column slot="options" width="220px" fixed="right" label="操作" align="center"> | ||||||
|           <template slot-scope="{ row }"> |           <template slot-scope="{ row }"> | ||||||
|             <div class="table-options"> |             <div class="table-options"> | ||||||
|               <el-button type="text" @click="toDetail(row.id)">详情</el-button> |               <el-button type="text" @click="toDetail(row.id)">详情</el-button> | ||||||
|               <el-button type="text" @click="toAdd(row.id)">编辑</el-button> |               <el-button type="text" @click="toAdd(row.id)">编辑</el-button> | ||||||
|               <el-button type="text" @click="remove(row.id)">删除</el-button> |               <el-button type="text" @click="remove(row.id)">删除</el-button> | ||||||
|  |               <el-button type="text" @click="showNeighbourSetting(row.id)">四邻设置</el-button> | ||||||
|             </div> |             </div> | ||||||
|           </template> |           </template> | ||||||
|         </el-table-column> |         </el-table-column> | ||||||
| @@ -204,6 +205,9 @@ export default { | |||||||
|     this.getList() |     this.getList() | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|  |     showNeighbourSetting(id) { | ||||||
|  |       this.$router.push({query: {id}, hash: "#ns"}) | ||||||
|  |     }, | ||||||
|     onTreeChange(e) { |     onTreeChange(e) { | ||||||
|       this.$emit("update:selected", e) |       this.$emit("update:selected", e) | ||||||
|       this.getList(e.id) |       this.getList(e.id) | ||||||
|   | |||||||
							
								
								
									
										219
									
								
								packages/party/partyMember/components/neighbourSetting.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										219
									
								
								packages/party/partyMember/components/neighbourSetting.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,219 @@ | |||||||
|  | <template> | ||||||
|  |   <section class="neighbourSetting"> | ||||||
|  |     <ai-list> | ||||||
|  |       <ai-title slot="title" title="四邻设置" isShowBottomBorder isShowBack @onBackClick="back"/> | ||||||
|  |       <template #content> | ||||||
|  |         <ai-search-bar> | ||||||
|  |           <template #left> | ||||||
|  |             <el-button type="primary" icon="iconfont iconAdd" @click="dialog=true">添加</el-button> | ||||||
|  |             <el-button icon="iconfont iconDelete" :disabled="!search.ids" @click="handleDelete(search.ids)">删除 | ||||||
|  |             </el-button> | ||||||
|  |           </template> | ||||||
|  |           <template #right> | ||||||
|  |             <el-input size="small" placeholder="搜索党员/四邻信息" v-model="search.name" clearable | ||||||
|  |                       @change="page.current=1,getTableData()"/> | ||||||
|  |           </template> | ||||||
|  |         </ai-search-bar> | ||||||
|  |         <ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size" | ||||||
|  |                   @getList="getTableData" :col-configs="colConfigs" :dict="dict" | ||||||
|  |                   @selection-change="v=>search.ids=v.map(e=>e.pfrId).toString()"> | ||||||
|  |           <el-table-column slot="options" label="操作" fixed="right" align="center"> | ||||||
|  |             <template slot-scope="{row}"> | ||||||
|  |               <el-button type="text" @click="handleDelete(row.pfrId)">删除</el-button> | ||||||
|  |             </template> | ||||||
|  |           </el-table-column> | ||||||
|  |         </ai-table> | ||||||
|  |       </template> | ||||||
|  |     </ai-list> | ||||||
|  |     <ai-dialog title="添加户主" :visible.sync="dialog" @closed="form={},residents=[]" @onConfirm="submit" width="1200px"> | ||||||
|  |       <ai-area-get v-model="form.areaId" :instance="instance" :root="user.info.areaId" @change="getResident"/> | ||||||
|  |       <el-row type="flex" class="mar-t16"> | ||||||
|  |         <ai-table ref="Residents" :tableData="residents" :total="list.total" :current.sync="list.current" | ||||||
|  |                   :size.sync="list.size" class="fill" border height="360px" @getList="getResident" | ||||||
|  |                   :col-configs="[{slot: 'resident'}]" layout="slot,->, prev, pager, next, jumper" :pagerCount="5"> | ||||||
|  |           <el-table-column slot="resident"> | ||||||
|  |             <template #header> | ||||||
|  |               <b v-text="`户主信息列表`"/> | ||||||
|  |               <el-input class="fill" v-model="list.con" size="small" placeholder="搜索姓名/身份证号" clearable | ||||||
|  |                         @change="list.current=1,getResident()"/> | ||||||
|  |             </template> | ||||||
|  |             <template slot-scope="{row}"> | ||||||
|  |               <el-row type="flex" justify="space-between" @click.native="handleSelectResident(row)" class="toggle" | ||||||
|  |                       :class="{selected:findResident(row.id)>-1}"> | ||||||
|  |                 <span v-text="row.name"/> | ||||||
|  |                 <span v-text="idCardNoUtil.hideId(row.idNumber)"/> | ||||||
|  |               </el-row> | ||||||
|  |             </template> | ||||||
|  |           </el-table-column> | ||||||
|  |         </ai-table> | ||||||
|  |         <ai-table :tableData="form.residentList" :col-configs="[{slot:'resident'}]" :isShowPagination="false" border | ||||||
|  |                   height="360px"> | ||||||
|  |           <el-table-column slot="resident"> | ||||||
|  |             <template #header> | ||||||
|  |               <b v-text="`已选择`"/> | ||||||
|  |               <el-button type="text" @click="form.residentList=[]">清空</el-button> | ||||||
|  |             </template> | ||||||
|  |             <template slot-scope="{row,$index}"> | ||||||
|  |               <el-row type="flex" align="middle" justify="space-between"> | ||||||
|  |                 <div v-text="[row.residentName, idCardNoUtil.hideId(row.idNumber)].join(' ')"/> | ||||||
|  |                 <el-button type="text" @click="form.residentList.splice($index,1)">删除</el-button> | ||||||
|  |               </el-row> | ||||||
|  |             </template> | ||||||
|  |           </el-table-column> | ||||||
|  |         </ai-table> | ||||||
|  |       </el-row> | ||||||
|  |     </ai-dialog> | ||||||
|  |   </section> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script> | ||||||
|  | import {mapState} from "vuex"; | ||||||
|  |  | ||||||
|  | export default { | ||||||
|  |   name: "neighbourSetting", | ||||||
|  |   props: { | ||||||
|  |     instance: Function, | ||||||
|  |     dict: Object, | ||||||
|  |   }, | ||||||
|  |   computed: { | ||||||
|  |     ...mapState(['user']), | ||||||
|  |     colConfigs() { | ||||||
|  |       return [ | ||||||
|  |         {type: 'selection'}, | ||||||
|  |         {label: "户主姓名", prop: "name"}, | ||||||
|  |         {label: "身份证号", prop: "idNumber"}, | ||||||
|  |         {label: "联系方式", prop: "phone"}, | ||||||
|  |         {label: "添加时间", prop: "createTime"}, | ||||||
|  |         {slot: "options"} | ||||||
|  |       ] | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       search: {name: "", ids: ""}, | ||||||
|  |       page: {current: 1, size: 10, total: 0}, | ||||||
|  |       tableData: [], | ||||||
|  |       dialog: false, | ||||||
|  |       form: {areaId: "", residentList: []}, | ||||||
|  |       residents: [], | ||||||
|  |       list: {current: 1, size: 10, total: 0}, | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     back() { | ||||||
|  |       this.$router.push({}) | ||||||
|  |     }, | ||||||
|  |     getTableData() { | ||||||
|  |       this.instance.post("/app/apppartyfourresident/listFourResident", null, { | ||||||
|  |         params: {...this.page, ...this.search} | ||||||
|  |       }).then(res => { | ||||||
|  |         if (res?.data) { | ||||||
|  |           this.tableData = res.data?.records | ||||||
|  |           this.page.total = res.data.total | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     handleDelete(ids) { | ||||||
|  |       this.$confirm("是否要删除户主?").then(() => { | ||||||
|  |         this.instance.post("/app/apppartyfourresident/delete", null, { | ||||||
|  |           params: {ids} | ||||||
|  |         }).then(res => { | ||||||
|  |           if (res?.code == 0) { | ||||||
|  |             this.$message.success("删除成功!") | ||||||
|  |             this.getTableData() | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |       }).catch(() => 0) | ||||||
|  |     }, | ||||||
|  |     submit() { | ||||||
|  |       this.instance.post("/app/apppartyfourresident/add", this.form).then(res => { | ||||||
|  |         if (res?.code == 0) { | ||||||
|  |           this.$message.success("提交成功!") | ||||||
|  |           this.dialog = false | ||||||
|  |           this.getTableData() | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     handleSearchArea(v) { | ||||||
|  |       this.form.residentList = [] | ||||||
|  |       this.getResident(v) | ||||||
|  |     }, | ||||||
|  |     getResident() { | ||||||
|  |       let {areaId} = this.form | ||||||
|  |       this.instance.post("/app/appresident/list", null, { | ||||||
|  |         params: {householdName: 1, areaId, ...this.list} | ||||||
|  |       }).then(res => { | ||||||
|  |         if (res?.data) { | ||||||
|  |           // this.residents = res.data.records?.map(e => ({dictValue: e.id, dictName: e.name})) | ||||||
|  |           this.residents = res.data.records | ||||||
|  |           this.list.total = res.data.total | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     handleSelectResident(row) { | ||||||
|  |       let {id: partyId} = this.$route.query | ||||||
|  |       let index = this.findResident(row.id) | ||||||
|  |       if (index > -1) { | ||||||
|  |         this.form.residentList.splice(index, 1) | ||||||
|  |       } else { | ||||||
|  |         let {id: residentId, name: residentName, idNumber} = row | ||||||
|  |         this.form.residentList.push({residentId, residentName, idNumber, partyId}) | ||||||
|  |       } | ||||||
|  |       this.$forceUpdate() | ||||||
|  |     }, | ||||||
|  |     findResident(id) { | ||||||
|  |       return this.form.residentList?.findIndex(e => e.residentId == id) | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.search.partyId = this.$route.query.id | ||||||
|  |     this.getTableData() | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  |  | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .neighbourSetting { | ||||||
|  |   height: 100%; | ||||||
|  |  | ||||||
|  |   .mar-t16 { | ||||||
|  |     margin-top: 16px; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   ::v-deep.ai-dialog__content { | ||||||
|  |     .ai-dialog__content--wrapper { | ||||||
|  |       padding-right: 0; | ||||||
|  |       display: flex; | ||||||
|  |       flex-direction: column; | ||||||
|  |  | ||||||
|  |       .el-row { | ||||||
|  |         width: 100%; | ||||||
|  |  | ||||||
|  |         .ai-table + .ai-table { | ||||||
|  |           margin-left: 16px; | ||||||
|  |           width: 400px; | ||||||
|  |  | ||||||
|  |           .ai-table__header > .cell { | ||||||
|  |             line-height: 40px; | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |  | ||||||
|  |       .toggle { | ||||||
|  |         cursor: pointer; | ||||||
|  |  | ||||||
|  |         &.selected { | ||||||
|  |           color: #26f; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |       .ai-table__header > .cell { | ||||||
|  |         display: flex; | ||||||
|  |         align-items: center; | ||||||
|  |         justify-content: space-between; | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </style> | ||||||
| @@ -56,12 +56,13 @@ | |||||||
|                 <el-form label-suffix=":" label-width="180px" size="small"> |                 <el-form label-suffix=":" label-width="180px" size="small"> | ||||||
|                   <div class="border-wrap"> |                   <div class="border-wrap"> | ||||||
|                     <div v-for="(item, index) in applyForm" :key="index"> |                     <div v-for="(item, index) in applyForm" :key="index"> | ||||||
|                       <ai-title :title="index"></ai-title> |                       <ai-title :title="index"/> | ||||||
|                       <el-form-item v-for="e in item" :key="e.id" :label="[e.fieldName,e.fieldNameSuffix].join('')"> |                       <el-form-item v-for="e in item" :key="e.id" :label="[e.fieldName,e.fieldNameSuffix].join('')"> | ||||||
|                         <el-input :value="getFieldValue(e)" readonly style="width: 100%;" |                         <el-input :value="getFieldValue(e)" readonly style="width: 100%;" | ||||||
|                                   v-if="e.fieldDataType!=5 && e.fieldDataType!=10"/> |                                   v-if="e.fieldDataType!=5 && e.fieldDataType!=10"/> | ||||||
|                         <el-input :value="getAreaName(e)" readonly style="width: 100%;" v-if="e.fieldDataType==10"/> |                         <el-input :value="getAreaName(e)" readonly style="width: 100%;" | ||||||
|                         <el-checkbox-group v-model="!e.fieldValue ? '' : String(e.fieldValue).split(',')"> |                                   v-else-if="e.fieldDataType==10"/> | ||||||
|  |                         <el-checkbox-group v-else v-model="!e.fieldValue ? '' : String(e.fieldValue).split(',')"> | ||||||
|                           <el-checkbox :label="val.dictValue" disabled |                           <el-checkbox :label="val.dictValue" disabled | ||||||
|                                        v-for="(val,idx) in dict.getDict(e.dictionaryCode)" :key="idx">{{ val.dictName }} |                                        v-for="(val,idx) in dict.getDict(e.dictionaryCode)" :key="idx">{{ val.dictName }} | ||||||
|                           </el-checkbox> |                           </el-checkbox> | ||||||
| @@ -148,11 +149,9 @@ | |||||||
|                           <li class="desc_li" v-if="item.candidateFieldInfos && item.candidateFieldInfos.length" |                           <li class="desc_li" v-if="item.candidateFieldInfos && item.candidateFieldInfos.length" | ||||||
|                               style="display: flex;flex-direction: column;"> |                               style="display: flex;flex-direction: column;"> | ||||||
|                             <div v-for="(m,i) in item.candidateFieldInfos" :key="i" style="margin-left: 10px;"> |                             <div v-for="(m,i) in item.candidateFieldInfos" :key="i" style="margin-left: 10px;"> | ||||||
|                               <div class="desc_div">{{ m.fieldName }}<span |                               <div class="desc_div">{{ m.fieldName }} | ||||||
|                                   v-if="m.fieldNameSuffix">{{ m.fieldNameSuffix }}</span>:{{ |                                 <span v-if="m.fieldNameSuffix" v-text="m.fieldNameSuffix"/> | ||||||
|                                   m.dictionaryCode |                                 :{{m.dictionaryCode ? dict.getLabel(m.dictionaryCode, m.fieldValue) : m.fieldValue }} | ||||||
|                                       ? dict.getLabel(m.dictionaryCode, m.fieldValue) : m.fieldValue |  | ||||||
|                                 }} |  | ||||||
|                               </div> |                               </div> | ||||||
|                             </div> |                             </div> | ||||||
|                           </li> |                           </li> | ||||||
| @@ -237,28 +236,15 @@ | |||||||
|             </el-radio-group> |             </el-radio-group> | ||||||
|  |  | ||||||
|             <el-date-picker |             <el-date-picker | ||||||
|                 v-if="op.fieldDataType=='8'" |                 v-if="op.fieldDataType==3" | ||||||
|                 v-model.trim="op.fieldValue" |                 v-model.trim="op.fieldValue" | ||||||
|                 format="yyyy年MM月dd日" |                 format="yyyy年MM月dd日" | ||||||
|                 value-format="yyyy年MM月dd日" |                 value-format="yyyy年MM月dd日" | ||||||
|                 type="date" |                 type="date" | ||||||
|                 placeholder="请选择"> |                 placeholder="请选择"> | ||||||
|             </el-date-picker> |             </el-date-picker> | ||||||
|  |             <ai-select v-if="op.fieldDataType=='9'" v-model="op.fieldValue" | ||||||
|             <el-select |                        :selectList="dict.getDict(op.dictionaryCode)"/> | ||||||
|                 v-if="op.fieldDataType=='9'" |  | ||||||
|                 size="small" |  | ||||||
|                 v-model="op.fieldValue" |  | ||||||
|                 placeholder="请选择" |  | ||||||
|                 clearable> |  | ||||||
|               <el-option |  | ||||||
|                   v-for="(k,m) in dict.getDict(op.dictionaryCode)" |  | ||||||
|                   :key="m" |  | ||||||
|                   :label="k.dictName" |  | ||||||
|                   :value="k.dictValue" |  | ||||||
|               /> |  | ||||||
|             </el-select> |  | ||||||
|  |  | ||||||
|           </el-form-item> |           </el-form-item> | ||||||
|           <el-form-item label="审批意见" prop="opinion" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]" |           <el-form-item label="审批意见" prop="opinion" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]" | ||||||
|                         v-if="titleType=='审批拒绝'"> |                         v-if="titleType=='审批拒绝'"> | ||||||
| @@ -404,7 +390,7 @@ export default { | |||||||
|       return e.dictionaryCode && this.dict.getLabel(e.dictionaryCode, val) |       return e.dictionaryCode && this.dict.getLabel(e.dictionaryCode, val) | ||||||
|     }, |     }, | ||||||
|     getFieldValue(e) { |     getFieldValue(e) { | ||||||
|       return e.dictionaryCode ? this.dict.getLabel(e.dictionaryCode, e.fieldValue) : e.fieldValue |       return !!e.dictionaryCode ? this.dict.getLabel(e.dictionaryCode, e.fieldValue) : e.fieldValue | ||||||
|     }, |     }, | ||||||
|     getAreaName(e) { |     getAreaName(e) { | ||||||
|       return e.areaValue |       return e.areaValue | ||||||
| @@ -949,6 +935,8 @@ export default { | |||||||
|  |  | ||||||
|           .desc_div { |           .desc_div { | ||||||
|             flex: 1; |             flex: 1; | ||||||
|  |             min-width: 0; | ||||||
|  |             margin-bottom: 8px; | ||||||
|             display: flex; |             display: flex; | ||||||
|             flex-wrap: wrap; |             flex-wrap: wrap; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -92,13 +92,13 @@ export default { | |||||||
|         {prop: 'landOutflowName', label: '土地流出方'}, |         {prop: 'landOutflowName', label: '土地流出方'}, | ||||||
|         {prop: 'landArea', align: 'center', label: '土地面积/㎡'}, |         {prop: 'landArea', align: 'center', label: '土地面积/㎡'}, | ||||||
|         {prop: 'landUndertakeName', align: 'center', label: '土地承接方'}, |         {prop: 'landUndertakeName', align: 'center', label: '土地承接方'}, | ||||||
|         {prop: 'circulateType', align: 'center', label: '流转形式'}, |         {prop: 'circulateType', align: 'center', label: '流转形式', dict: "landCirculateType"}, | ||||||
|         {prop: 'startDate', align: 'center', label: '开始日期'}, |         {prop: 'startDate', align: 'center', label: '开始日期'}, | ||||||
|       ], |       ], | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   created() { |   created() { | ||||||
|     this.dict.load("enterpriseType") |     this.dict.load("enterpriseType", "landCirculateType") | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     getPCR() { |     getPCR() { | ||||||
| @@ -116,7 +116,7 @@ export default { | |||||||
|       }) |       }) | ||||||
|     }, |     }, | ||||||
|     handleShow() { |     handleShow() { | ||||||
|       this.getPCR().then(() => this.dialog = true) |       this.getPCR().then(() => this.dialog = true).catch(() => this.dialog = true) | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   props: { |   props: { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user