| subPackage/house/family/index.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/house/member/householdLabel.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/house/member/index.vue | ●●●●● patch | view | raw | blame | history | |
| subPackage/workbench/views/editExamine.vue | ●●●●● patch | view | raw | blame | history |
subPackage/house/family/index.vue
@@ -89,14 +89,15 @@ {{scItem.houseNo}} </text> </view> <!-- <view style="margin-top:5rpx;"> <block> <view class="mr-10" style="display: inline-block;"> <u-tag text="测试" size="mini"> <view style="margin-top:10rpx;" v-if="scItem.householdLabelList.length"> <block v-for="i in scItem.householdLabelList"> <view class="mr-10" v-if="i.labelName" style="display: inline-block;"> <u-tag :text="i.labelName" :bgColor="i.color" :borderColor="i.color" size="mini"> </u-tag> </view> </block> </view> --> </view> </view> </view> subPackage/house/member/householdLabel.vue
@@ -1,12 +1,12 @@ <template> <view class="container"> <view class="main"> <view class="base b-c-w"> <view class="base b-c-w" v-if="id"> <u-icon name="/static/icon/map.png" width="15" height="18"></u-icon> <view>{{ houseAddress}}</view> </view> <view class="content"> <view class="l flex-1 flex"> <view class="l flex-1 flex" v-if="id"> <view class="flex_base"> <view class="head-img flex_base"> <u--image shape="circle" :showLoading="true" src="/static/icon/user-01.png" width="120rpx" @@ -27,7 +27,7 @@ <view v-for="(item, k) in item.children" :key="k"> <u-button size="mini" type="primary" :color="item.color" :style="{color: item.color && '#fff'}" :text="item.name" @click="showLabelPopup(item)"></u-button> @click="showLabelPopup(item,index,k)"></u-button> </view> </view> </view> @@ -114,12 +114,15 @@ labelValue: '', remark: '', // 标记 number: 0 number: 0, id: "", from: "", fIndex: "", cIndex: "" } }, created() {}, mounted() { this.getDoorPlateAddressDetail() // this.$nextTick(() => { // if (this.labelBtnList.length === 0) { // this.getLabelList() @@ -127,14 +130,26 @@ // }) }, onLoad(option) { console.log("option==>", option); const data = JSON.parse(option.data); this.householdInfo = data; this.houseCode = data.houseCode if (data.id) { this.id = data.id; this.getDoorPlateAddressDetail() } if (option.from) { this.from = option.from; } // this.getDoorPlateAddressDetail() }, onShow() { this.getLabelList() }, methods: { // 获取房屋详情 async getDoorPlateAddressDetail() { @@ -151,12 +166,15 @@ }, // 获取房屋标签信息 async getLabelList() { const param = { id: this.householdInfo.id if (this.id) { const param = { id: this.householdInfo.id } const res = await getHouseholdDetail(param) this.householdInfo = res.data // const householdLabelList = this.householdInfo.householdLabelList } const res = await getHouseholdDetail(param) this.householdInfo = res.data const householdLabelList = this.householdInfo.householdLabelList // 房屋标签处理 const labelParam = { parentId: 1000 @@ -170,26 +188,32 @@ labelChildAll.push(f) }) }) if (householdLabelList.length > 0) { labelChildAll.forEach(e => { householdLabelList.forEach(f => { if (Number(e.id) == f.labelId) { e['color'] = f.color e['remark'] = f.remark } if (this.id) { let householdLabelList = this.householdInfo.householdLabelList if (householdLabelList.length > 0) { labelChildAll.forEach(e => { householdLabelList.forEach(f => { if (Number(e.id) == f.labelId) { e['color'] = f.color e['remark'] = f.remark } }) }) }) } } }, // 房屋弹窗 showLabelPopup(item) { showLabelPopup(item, fIndex, cIndex) { // 先清空 this.number = 0 this.labelValue = "" this.remark = "" this.popupShow = true this.labelModelInfo.title = item.name this.currentLabelInfo = item this.currentLabelInfo = item; this.fIndex = fIndex; this.cIndex = cIndex; // 遍历标签集合 this.labelList.forEach(e => { if (e.color == item.color) { @@ -214,14 +238,17 @@ color, name } = this.currentColorInfo console.log() let res = null if (name === '撤销') { if (this.number == 1) { const data = { labelId: id, householdId: this.householdInfo.id } res = await removeHouseholdLabel(data) // const data = { // labelId: id, // householdId: this.householdInfo.id // } // res = await removeHouseholdLabel(data) this.removeLabel(id) } else { uni.showToast({ title: "无可撤销项", @@ -231,7 +258,66 @@ return } } else { res = await saveOrUpdateHouseholdLabel({ // res = await saveOrUpdateHouseholdLabel({ // householdId: this.householdInfo.id, // labelId: id, // remark: this.remark, // lableType: 1, // color, // houseCode: this.houseCode, // userId: this.householdInfo.associatedUserId // }) this.addLabel(id, color) } // if (res.code !== 200) { // uni.showToast({ // title: "修改失败", // icon: "error", // duration: 1500 // }) // return // } // 刷新页面 this.getLabelList() this.popupShow = false }, removeLabel(id) { if (this.from) { let item = this.labelBtnList[this.fIndex]; item.children[this.cIndex].color = ""; // this.labelBtnList[this.fIndex].children[this.cIndex] this.$set(this.labelBtnList, this.fIndex, item); this.updatePrePageData() } else { const data = { labelId: id, householdId: this.householdInfo.id } removeHouseholdLabel(data).then(res => { if (res.code != 200) { uni.showToast({ title: "操作失败", icon: "error", duration: 1200 }) } }) } }, addLabel(id, color) { console.log("color==>", color); if (this.from) { let item = this.labelBtnList[this.fIndex].children[this.cIndex]; item.color = color; item.remark = this.remark; console.log(item); // this.labelBtnList[this.fIndex].children[this.cIndex] this.$set(this.labelBtnList[this.fIndex].children, this.cIndex, item); // this.updatePrePageData() } else { saveOrUpdateHouseholdLabel({ householdId: this.householdInfo.id, labelId: id, remark: this.remark, @@ -239,20 +325,52 @@ color, houseCode: this.houseCode, userId: this.householdInfo.associatedUserId }).then(res => { if (res.code != 200) { uni.showToast({ title: "操作失败", icon: "error", duration: 1200 }) } }) } if (res.code !== 200) { uni.showToast({ title: "修改失败", icon: "error", duration: 1500 }) return } // 刷新页面 this.getLabelList() this.popupShow = false }, updatePrePageData() { let pages = getCurrentPages(); let prePage = pages[pages.length - 2]; let arr = [] for (let i = 0, ii = this.labelBtnList.length; i < ii; i++) { for (let k = 0, kk = this.labelBtnList[i].children.length; k < kk; k++) { if (this.labelBtnList[i].children[k].color) { arr.push({ color: this.labelBtnList[i].children[k].color, labelId: this.labelBtnList[i].children[k].id, labelName: this.labelBtnList[i].children[k].name, lableType: 1, houseCode: prePage.$vm.houseCode }) } } } prePage.$vm.form.householdLabelList = arr; // householdLabelList: [ // { // color: "#30D17C" // createTime: null // houseCode: "00B2E27337554723B2F4843DCE4DE613" // householdId: "1738448756973039617" // id: 837 // labelId: 4 // labelName: "特困人员" // lableType: 1 // remark: "" // userId: null // }] } } } @@ -269,7 +387,9 @@ display: flex; flex-direction: column; background: #f6f6f6; .main { // position: relative; // height: 0; // flex: 1; subPackage/house/member/index.vue
@@ -103,24 +103,54 @@ </u--input> <u-icon slot="right" name="arrow-right"></u-icon> </u-form-item> <u-form-item class="form-item" labelWidth="100" label="标签" @click="navTo"> <u-form-item class="form-item" labelWidth="100" label="籍贯地区" prop="nativePlaceAdcode"> <view class="region"> <picker mode="region" @change="changeNativeRegion"> <view class="region-picker c-c0" v-if="!nativePlace"> 请选择 </view> <view class="region-picker c-30" v-if="nativePlace"> {{nativePlace}} </view> </picker> </view> <u-icon slot="right" name="arrow-right"></u-icon> </u-form-item> <u-form-item class="form-item" labelWidth="100" label="户籍地区" prop="residentAdcode"> <view class="region"> <picker mode="region" @change="changeHouseholdRegion"> <view class="region-picker c-c0" v-if="!residentad"> 请选择 </view> <view class="region-picker c-30" v-if="residentad"> {{residentad}} </view> </picker> </view> <u-icon slot="right" name="arrow-right"></u-icon> </u-form-item> <u-form-item class="form-item address-row" labelWidth="100" label="现居住地" prop="currentAddress"> <u--input border="none" :disabled="form.source ==1?true:false" disabledColor="#ffffff" v-model="form.currentAddress" placeholder="请输入"> </u--input> </u-form-item> <u-form-item class="form-item" labelWidth="100" label="居住地区" prop="homeAdcode" @click="showRegion = true"> <u--input border="none" v-model="homeRegion" disabled disabledColor="#ffffff" placeholder="请选择"> <u-form-item @click="showSelectBus('户籍类型','residentType')" class="form-item" labelWidth="100" label="户籍类型" prop="residentType"> <u--input border="none" v-model="selectDefaultName.residentType" disabled disabledColor="#ffffff" placeholder="请选择"> </u--input> <u-icon slot="right" name="arrow-right"></u-icon> </u-form-item> <u-form-item class="form-item" labelWidth="100" label="户籍登记地" prop="hukouRegistration"> <u--input border="none" v-model="form.hukouRegistration" placeholder="请输入"> </u--input> </u-form-item> <u-form-item class="form-item" labelWidth="100" label="标签" @click="navTo"> <u-icon slot="right" name="arrow-right"></u-icon> @@ -193,17 +223,7 @@ <u--input border="none" v-model="form.diseaseName" placeholder="请输入"> </u--input> </u-form-item> <u-form-item @click="showSelectBus('户籍类型','residentType')" class="form-item" labelWidth="100" label="户籍类型" prop="residentType"> <u--input border="none" v-model="selectDefaultName.residentType" disabled disabledColor="#ffffff" placeholder="请选择"> </u--input> <u-icon slot="right" name="arrow-right"></u-icon> </u-form-item> <u-form-item class="form-item" labelWidth="100" label="户籍登记地" prop="hukouRegistration"> <u--input border="none" v-model="form.hukouRegistration" placeholder="请输入"> </u--input> </u-form-item> <u-form-item class="form-item" labelWidth="100" label="外出详址" prop="goOutAddr"> <u--input border="none" v-model="form.goOutAddr" placeholder="请输入"> </u--input> @@ -234,34 +254,7 @@ </u-form-item> <u-form-item class="form-item" labelWidth="100" label="籍贯地区" prop="nativePlaceAdcode"> <view class="region"> <picker mode="region" @change="changeNativeRegion"> <view class="region-picker c-c0" v-if="!nativePlace"> 请选择 </view> <view class="region-picker c-30" v-if="nativePlace"> {{nativePlace}} </view> </picker> </view> <u-icon slot="right" name="arrow-right"></u-icon> </u-form-item> <u-form-item class="form-item" labelWidth="100" label="户籍地区" prop="residentAdcode"> <view class="region"> <picker mode="region" @change="changeHouseholdRegion"> <view class="region-picker c-c0" v-if="!residentad"> 请选择 </view> <view class="region-picker c-30" v-if="residentad"> {{residentad}} </view> </picker> </view> <u-icon slot="right" name="arrow-right"></u-icon> </u-form-item> </view> @@ -448,7 +441,8 @@ homeIndex: 0, showRegion: false, navtivePlaceDefault: [], residentadDefault: [] residentadDefault: [], isEdit: false } }, created() { @@ -460,10 +454,12 @@ this.houseCode = data.houseCode this.getRegionList() if (data.type == 1) { this.isEdit = false; this.addOrUpdateTitle = "保存" this.getAllBizDict() } if (data.type == 2) { this.isEdit = true; this.addOrUpdateTitle = "修改" this.getHouseholdInfo(data) } @@ -702,8 +698,15 @@ navTo() { let data = JSON.parse(JSON.stringify(this.form)); this.$u.func.globalNavigator( `householdLabel?data=${JSON.stringify(data)}`) if (!this.isEdit) { this.$u.func.globalNavigator( `householdLabel?data=${JSON.stringify(data)}&from=add`) } else { this.$u.func.globalNavigator( `householdLabel?data=${JSON.stringify(data)}`) } } } } subPackage/workbench/views/editExamine.vue
@@ -47,7 +47,7 @@ </view> <view class="practitioner"> <box-title title="从业人员信息"></box-title> <view class="info" v-for="(item, index) in personNum" :key="i"> <view class="info" v-for="(item, index) in personNum" :key="index"> <view class="title">人员信息-#{{ index*1 + 1 }}</view> <formItem ref="formItemRef"></formItem> </view> @@ -198,10 +198,16 @@ } this.personNum = placePractitioner.length const componetns = this.$refs.formItemRef || [] this.$refs.formItemRef.forEach((item, index) => { item.form = placePractitioner[index] // const componetns = this.$refs.formItemRef || [] placePractitioner.forEach((item, index) => { this.$nextTick(() => { this.$refs.formItemRef[index].form = item }) }) // this.$refs.formItemRef.forEach((item, index) => { // item.form = placePractitioner[index] // }) }) },