Lou
2024-03-25 d7b9ef1ab1051fe91f78560fe92c961b356f134f
更新
6 files modified
4 files added
1458 ■■■■■ changed files
api/counterfraud/counterfraud.js 19 ●●●●● patch | view | raw | blame | history
common/setting.js 4 ●●●● patch | view | raw | blame | history
components/btn/footerBtn.vue 51 ●●●● patch | view | raw | blame | history
pages.json 24 ●●●●● patch | view | raw | blame | history
subPackage/article/detail.vue 52 ●●●● patch | view | raw | blame | history
subPackage/article/signature.vue 13 ●●●●● patch | view | raw | blame | history
subPackage/bs/views/rentDetail.vue 14 ●●●●● patch | view | raw | blame | history
subPackage/counterfraud/add.vue 630 ●●●●● patch | view | raw | blame | history
subPackage/counterfraud/dispose.vue 630 ●●●●● patch | view | raw | blame | history
subPackage/user/test.vue 21 ●●●●● patch | view | raw | blame | history
api/counterfraud/counterfraud.js
New file
@@ -0,0 +1,19 @@
import http from '@/http/api.js'
//反诈宣传
export const addCounterfraud = (params) => {
    return http.request({
        url: '/blade-backblastPubRecord/backblastPubRecord/addOrUpdate',
        method: 'POST',
        data: params
    })
}
//反诈宣传处置
export const setCounterfraudDisopes = (params) => {
    return http.request({
        url: '/blade-backblastWarnHanRec/backblastWarnHanRec/saveOrUpdate',
        method: 'POST',
        data: params
    })
}
common/setting.js
@@ -10,8 +10,8 @@
    version: '2.0.0',
    // 开发环境接口Url
    // devUrl: 'http://z4042833u6.wicp.vip',
    // devUrl: 'https://srgdjczzxtpt.com:2080/api',
    devUrl: 'http://192.168.2.111:9528',
    // devUrl: 'http://192.168.2.111:9528',
    devUrl: 'https://srgdjczzxtpt.com:2080/api',
    // devUrl: 'https://kt39592615.goho.co',
    minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
    // minioBaseUrl: "http://192.168.0.101:9528/",
components/btn/footerBtn.vue
@@ -1,52 +1,53 @@
<template>
    <view class="footer">
        <button class="footer-btn"   @click="handel">{{text}}</button>
        <button class="footer-btn" @click="handel">{{text}}</button>
    </view>
</template>
<script>
    export default {
        name:"footerBtn",
        props:{
            text:{
                type:String,
                default:"提交"
        name: "footerBtn",
        props: {
            text: {
                type: String,
                default: "提交"
            }
        },
        methods:{
            handel(){
        methods: {
            handel() {
                this.$emit("click")
            }
        }
    }
</script>
<style lang="scss"  scoped >
    .footer{
        width:100%;
        padding:20rpx 30rpx;
<style lang="scss" scoped>
    .footer {
        width: 100%;
        padding: 20rpx 30rpx;
        box-sizing: border-box;
        position: fixed;
        bottom:0;
        left:0;
        bottom: 0;
        left: 0;
        background-color: #fff;
        z-index: 10;
        padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
        z-index:999;
        background-color:#fff;
        box-shadow: 0rpx 0rpx 10rpx 1rpx rgba(0,0,0,0.1);
        .footer-btn{
            width:100%;
        padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
        z-index: 999;
        background-color: #fff;
        box-shadow: 0rpx 0rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
        .footer-btn {
            width: 100%;
            height: 78rpx;
            line-height: 78rpx;
            border-radius: 8rpx;
            font-size: 32rpx;
            color:#fff;
            border:none;
            color: #fff;
            border: none;
            background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
        }
        .footer-btn::after{
            border:none;
        .footer-btn::after {
            border: none;
        }
    }
</style>
pages.json
@@ -1028,6 +1028,30 @@
                    }
                }
            ]
        },
        //反诈
        {
            "root": "subPackage/counterfraud",
            "pages": [{
                    "path": "add",
                    "style": {
                        "navigationBarTitleText": "反诈宣传",
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black",
                        "enablePullDownRefresh": false
                    }
                },
                {
                    "path": "dispose",
                    "style": {
                        "navigationBarTitleText": "反诈预警处置",
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black",
                        "enablePullDownRefresh": false
                    }
                }
            ]
        }
    ],
    "globalStyle": {
subPackage/article/detail.vue
@@ -84,7 +84,7 @@
                            <view class="" v-if="item.optionRange == 0">
                                <u-radio-group size="22" iconPlacement="right" activeColor="#017BFC" placement="column"
                                    v-model="item.selected" @change="selectOption($event,index)"
                                    :disabled="item.isSubmit || isEnd">
                                    :disabled="item.isSubmit || isEnd  || isComplete">
                                    <view class="mb-30" v-for="(i,k) in item.children">
                                        <u-radio :label="i.optionContent" :name="i.id"></u-radio>
                                        <view class="flex j-c-s-b a-i-c mt-10">
@@ -336,16 +336,20 @@
                    if (res.code == 200) {
                        let data = res.data;
                        let tempArr = [];
                        let count = 0;
                        if (data.length) {
                            for (let i of data) {
                                if (i.selected) {
                                    this.isComplete = true;
                                    tempArr.push(i);
                                    if (typeof i.selected == "string" && i.optionRange == 0) {
                                    if (typeof(i.selected) == "string" && i.optionRange == 0) {
                                        this.isSubmit = true;
                                        i.isSubmit = true;
                                        i.selected = Number(i.selected)
                                    }
                                    if (typeof i.selected == "string" && i.optionRange == 1) {
                                    if (typeof(i.selected) == "string" && i.optionRange == 1) {
                                        this.isSubmit = true;
                                        i.isSubmit = true;
                                        i.selected = JSON.parse(i.selected)
@@ -354,10 +358,15 @@
                            }
                        }
                        this.voteTopicList = data;
                        if (data.length == tempArr.length) {
                            this.isComplete = true;
                            this.setOptionDisable()
                        // if (data.length == tempArr.length) {
                        //     this.isComplete = true;
                        //     this.setOptionDisable()
                        // }
                        if (this.isComplete) {
                            this.setOptionDisable();
                        }
                    }
                })
            },
@@ -455,15 +464,25 @@
                        i.houseCode = uni.getStorageSync("siteInfo").houseCode
                        i.signaturePath = signPath ? signPath : ""
                        arr.push(i)
                    } else if (!i.selected && i.mandatoryFlag == 2) {
                        this.$showTips('必填议题请选择选项')
                        return;
                    }
                    // else if (!i.selected && i.mandatoryFlag == 2) {
                    //     this.$showTips('必填议题请选择选项')
                    //     return;
                    // }
                }
                return arr;
            },
            checkOption() {
                for (let i of this.voteTopicList) {
                    if (!i.selected && i.mandatoryFlag == 2) {
                        this.$showTips('必填议题请选择选项')
                        return false;
                    }
                }
            },
            confirmValidationCode() {
@@ -473,10 +492,25 @@
            //提交投票
            submitVote() {
                if (this.applyInfo.signatureFlag == 1) {
                    if (this.voteTopicList.length == 1 && (this.voteTopicList[0].mandatoryFlag == 1 || !this.voteTopicList[
                            0].mandatoryFlag) && !this.voteTopicList[0].selected) {
                        this.$showTips("请选择议题选项");
                        return
                    } else {
                        if (this.checkOption() === false) return;
                    }
                    uni.navigateTo({
                        url: `signature?type=2`
                    })
                } else {
                    if (this.voteTopicList.length == 1 && (this.voteTopicList[0].mandatoryFlag == 1 || !this.voteTopicList[
                            0].mandatoryFlag) && !this.voteTopicList[0].selected) {
                        this.$showTips("请选择议题选项");
                        return
                    } else {
                        if (this.checkOption() === false) return;
                    }
                    this.isShowPopup = true;
                    // this.voteRequest()
                }
subPackage/article/signature.vue
@@ -1,16 +1,17 @@
<template>
    <view>
        <jushi-signature :settings="settings" @change="signatureChange"></jushi-signature>
        <!-- <view class="" style="margin-top: 20rpx;">
        <jushi-signature :settings="settings" @change="signatureChange" v-if="!imgUrl"></jushi-signature>
        <view class="" style="margin-top: 20rpx;" v-if="imgUrl">
            <text class="text">保存后的签名图片</text>
            <view class="preview">
                <image :src="imgUrl" mode="" style="width: 100%;"></image>
            </view>
        </view> -->
        </view>
        <u-popup :show="isShowPopup" @close="isShowPopup = false" mode="center" :round="10" :closeable="true">
        <u-popup :show="isShowPopup" zIndex="99999" @close="isShowPopup = false" mode="center" :round="10"
            :closeable="true">
            <view class='login-mode'>
                <view class="f-30 fw">
                    安全验证
@@ -63,7 +64,8 @@
                validationCode: "",
                phone: "",
                text: "获取验证码",
                imgSrc: ""
                imgSrc: "",
                type: ""
            }
        },
@@ -116,6 +118,7 @@
                if (this.type == 1) {
                    prePage.$vm.applyRequest(src);
                } else {
                    console.log(222);
                    this.isShowPopup = true;
                    this.imgSrc = src;
subPackage/bs/views/rentDetail.vue
@@ -261,10 +261,11 @@
            } = option
            this.houseCode = houseCode
            this.currentRole = uni.getStorageSync("activeRole")
            this.getAllBizDict()
            // 使用id来判断是不是修改
            if (id !== void 0) {
                this.rentId = id
                this.getAllBizDict()
                this.getCurrentRentInfo()
            }
        },
@@ -629,7 +630,6 @@
            //识别成功
            recognizeSuccess(e, index) {
                console.log("e==>", e);
                let {
                    detail: {
                        name,
@@ -644,11 +644,13 @@
                this.$refs.rentform[index].form.hukouRegistration = address.text; //地址
                this.$refs.rentform[index].form.idCard = id.text; //身份证号
                this.$refs.rentform[index].genderValue = gender.text; //性别
                this.$refs.rentform[index].nationValue = nationality.text; //民族
                this.$refs.rentform[index].nationValue = `${nationality.text}族`; //民族
                this.$refs.rentform[index].form.gender = this.getValue(this.genderList, gender.text).value;
                this.$refs.rentform[index].form.ethnicity = this.getValue(this.nationList, nationality.text).value;
                this.$refs.rentform[index].gender = [this.getValue(genderList, gender.text).index];
                this.$refs.rentform[index].nationTypeIndex = [this.getValue(this.nationList, nationality.text).index];
                this.$refs.rentform[index].form.ethnicity = this.getValue(this.nationList, `${nationality.text}族`).value;
                this.$refs.rentform[index].gender = [this.getValue(this.genderList, gender.text).index];
                this.$refs.rentform[index].nationTypeIndex = [this.getValue(this.nationList, `${nationality.text}族`)
                    .index
                ];
            },
            getValue(arr, name) {
subPackage/counterfraud/add.vue
New file
@@ -0,0 +1,630 @@
<template>
    <view>
        <view class="top item flex j-c-s-b a-i-c bgc-ff" @click="onScan()" v-if="!currentId">
            <view class="flex a-i-c">
                <u-icon name="/static/icon/nav-05.png" width="90rpx" height="90rpx"></u-icon>
                <text class="f-28 ml-10">扫码获取房屋信息</text>
            </view>
            <u-icon name="arrow-right" size="20"></u-icon>
        </view>
        <view class="content bgc-ff">
            <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90"
                :labelStyle="{fontSize:'28rpx'}">
                <u-form-item label="地址" prop="address" :borderBottom="false" v-if="!isScan">
                    <view class="address-row flex">
                        <view class="address-content f-28" v-if="info.address">
                            {{info.address}}
                        </view>
                        <view class="address-content f-28 c-99" v-if="!info.address">
                            请选择地址
                        </view>
                        <view class="location-btn c-main f-24" @click="getLocation()">
                            获取地址
                        </view>
                    </view>
                    <!-- <u-input v-model="info.address" border="none"  placeholderClass="f-28 c-99"
                        inputAlign="right"    disabled  disabledColor="#fff">
                        <template slot="suffix">
                            <button class="location-btn c-main f-24"   @click="getLocation()">获取地址</button>
                        </template>
                    </u-input> -->
                </u-form-item>
                <u-form-item label="地址" borderBottom required v-if="isScan">
                    <u-textarea v-model="info.address" border="none" disabled disabledColor="#fff"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-textarea>
                </u-form-item>
                <u-form-item label="业主姓名" borderBottom required v-if="isScan">
                    <u-input v-model="houseHoldInfo.name" border="none" disabled disabledColor="#fff"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="业主电话" borderBottom required v-if="isScan">
                    <u-input v-model="houseHoldInfo.phoneNumber" border="none" disabled disabledColor="#fff"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                </u-form-item>
                <!--                 <u-form-item label="地址" borderBottom required>
                    <u-input v-model="address" border="none" disabled disabledColor="#fff" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                </u-form-item> -->
                <u-form-item label="记录内容" borderBottom required prop="pubContent">
                    <u-textarea type="textarea" v-model="info.pubContent" border="none" placeholderClass="f-28 c-99"
                        inputAlign="right" placeholder="请输入记录内容">
                    </u-textarea>
                </u-form-item>
                <!-- <u-form-item label="走访时间" prop="workTime" :borderBottom="false" required @click="showSelectDate = true">
                    <u-input v-model="info.workTime" disabled disabledColor="#ffffff" border="none" placeholder="请选择"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item> -->
                <!-- <u-form-item label="房屋" prop="houseCode" :borderBottom="false"  required
                    @click="isShowScStatus = true">
                    <u-input v-model="info.scStatus" disabled disabledColor="#fff" border="none" placeholder="请选择"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item> -->
            </u-form>
        </view>
        <view class="upload bgc-ff">
            <view class="f-28">现场照片</view>
            <view class="mt-20">
                <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
                    :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
                    :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
                    <view class="upload-item upload-icon flex_base">
                        <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
                    </view>
                </u-upload>
            </view>
        </view>
        <view class="footer flex a-i-c j-c-s-b" v-if="isScan">
            <view class="footer-item  footer-left c-main" @click="navToHouse">
                查看更多
            </view>
            <view class="footer-item footer-right c-ff" @click="submitInfo">
                提交
            </view>
        </view>
        <footer-btn v-if="!isScan" @click="submitInfo" :text="isEdit?'保存':'提交'" />
    </view>
</template>
<script>
    import {
        addWorkLog,
        getWorkLogDetail,
        updateWorkLog
    } from "@/api/workLog/workLog.js"
    import uploadMixin from "@/mixin/uploadMixin";
    import {
        bizDictionary,
        update
    } from '@/api/system/dict.js'
    import {
        getLabelListByParentId
    } from "@/api/label/label.js";
    import {
        fetchHousehold
    } from "@/api/house/household.js"
    import {
        getHouseholdDetail
    } from '@/api/house/household.js'
    import {
        getQrCodeDetail
    } from "@/api/system/index"
    import {
        getHouseRentInfo
    } from "@/api/doorplateAddress/doorplateAddress";
    import {
        addCounterfraud
    } from "@/api/counterfraud/counterfraud.js"
    export default {
        mixins: [uploadMixin],
        data() {
            return {
                form: {
                    images: []
                },
                info: {
                    // name: "",
                    // phone: "",
                    address: "",
                    houseCode: "",
                    lng: "",
                    lat: "",
                    pubContent: ""
                },
                rules: {
                    // 'name': {
                    //     type: 'string',
                    //     required: true,
                    //     message: '请输入姓名',
                    //     trigger: ['blur', 'change']
                    // },
                    // 'phone': {
                    //     type: 'string',
                    //     required: true,
                    //     message: '请输入手机号',
                    //     trigger: ['blur', 'change']
                    // },
                    type: [{
                        type: 'number',
                        required: true,
                        message: '请选择走访类型',
                        trigger: ['blur', 'change']
                    }],
                    // peopleType: [{
                    //     type: 'number',
                    //     required: true,
                    //     message: '请选择重点人群类型',
                    //     trigger: ['blur', 'change']
                    // }],
                    householdId: [{
                        type: 'string',
                        required: true,
                        message: '请选择被访问人',
                        trigger: ['blur', 'change']
                    }],
                    context: [{
                        type: 'string',
                        required: true,
                        message: '请输入工作内容',
                        trigger: ['blur', 'change']
                    }],
                },
                showSelectDate: false,
                workTime: Number(new Date()),
                isShowPicker: false,
                houseIndex: [0],
                typeList: [],
                typeName: "",
                typeIndex: [0],
                isShowTypePicker: false,
                isShowLabelPicker: false,
                labelList: [],
                labelIndex: [0],
                labelName: "",
                keyword: "",
                houseHoldList: [],
                selectedHousehold: {},
                isShowPopup: false,
                address: "",
                isEdit: false,
                id: "",
                isScan: false, //是否扫码
                houseHoldInfo: {}
            }
        },
        // onLoad() {
        //     let userInfo = uni.getStorageSync("userInfo");
        //     this.$set(this.info, "name", userInfo.real_name);
        //     this.$set(this.info, "phone", userInfo.phone);
        // },
        async onLoad(option) {
            await this.getTypeList();
            await this.getLabelList();
            if (option.id) {
                this.isEdit = true;
                this.id = option.id;
                setTimeout(() => {
                    this.getDetail(option.id)
                }, 200)
            }
        },
        onReady() {
            //onReady 为uni-app支持的生命周期之一
            this.$refs.form.setRules(this.rules)
        },
        methods: {
            getLocation() {
                uni.chooseLocation({
                    success: (res) => {
                        this.$set(this.info, "address", res.address);
                        this.$set(this.info, "lat", res.latitude);
                        this.$set(this.info, "lng", res.longitude)
                    }
                })
            },
            getHouseInfo(code) {
                getHouseRentInfo(code).then(res => {
                    console.log(res)
                    if (res.code == 200 && res.data.householdList.length) {
                        this.houseHoldInfo = res.data.houseHoldList[0]
                    }
                })
            },
            getDetail(id) {
                getWorkLogDetail({
                    id
                }).then(res => {
                    console.log(res);
                    if (res.code == 200) {
                        let data = res.data
                        this.tyepIndex = this.$getIndex(this.typeList[0], data.type, "dictKey", "dictValue").index;
                        this.typeName = this.$getIndex(this.typeList[0], data.type, "dictKey", "dictValue").name;
                        if (data.workTime) {
                            this.workTime = Number(new Date(data.workTime))
                        }
                        // this.info.type = data.type;
                        // this.info.workTime = data.workTime;
                        // this.info.context = data.context;
                        // this.info.householdId = data.householdId;
                        // this.info.personType = data.personType;
                        console.log(typeof data.personType)
                        this.labelIndex = this.$getIndex(this.labelList[0], data.personType, "id", "name").index;
                        this.labelName = this.$getIndex(this.labelList[0], data.personType, "id", "name").name;
                        this.getHouseholdList();
                        this.getHousehold(data.householdId);
                        this.form.images = this.$setImageUrl(data.url, 2);
                        this.info.id = data.id;
                        for (let i in this.info) {
                            this.$set(this.info, i, data[i])
                        }
                    }
                })
            },
            getTypeList() {
                bizDictionary({
                    code: "haveType"
                }).then(res => {
                    console.log(res)
                    this.typeList = [res.data];
                })
            },
            getLabelList() {
                getLabelListByParentId({
                    parentId: 100
                }).then(res => {
                    this.labelList = [res.data];
                })
            },
            getHousehold(id) {
                getHouseholdDetail({
                    id
                }).then(res => {
                    console.log(res);
                    this.address = res.data.currentAddress;
                    this.selectedHousehold = res.data;
                })
            },
            getHouseholdList() {
                fetchHousehold({
                    labelId: this.info.personType,
                    searchKey: this.keyword,
                    limit: 20
                }).then(res => {
                    this.houseHoldList = res.data;
                })
            },
            confirmDate(e) {
                this.showSelectDate = false;
                this.info.workTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
            },
            confirmHouse(e) {
                this.houseIndex = e.indexs;
                this.info.houseCode = e.value[0];
                this.isShowPicker = false;
            },
            //选择走访类型
            confirmType(e) {
                console.log("type==>", e);
                this.typeIndex = e.indexs;
                this.info.type = e.value[0].dictKey;
                this.typeName = e.value[0].dictValue;
                if (e.value[0].dictKey == 1) {
                    this.info.personType = "";
                    this.keyword = "";
                    this.getHouseholdList();
                }
                this.isShowTypePicker = false;
            },
            //选择重点人群类型
            confirmLabelType(e) {
                this.labelIndex = e.indexs;
                this.info.personType = e.value[0].id;
                this.labelName = e.value[0].name;
                this.isShowLabelPicker = false;
                this.getHouseholdList();
            },
            //搜索住户
            searchHousehold() {
                this.getHouseholdList()
            },
            clearKeyword() {
                this.keyword = "";
                this.getHouseholdList()
            },
            //选择住户
            selectHousehold(item) {
                this.selectedHousehold = item;
                this.info.householdId = item.id;
                this.address = `${item.townStreetName}${item.neiName}${item.aoiName}${item.address || ""}`
                this.isShowPopup = false;
            },
            checkImages() {
                if (this.form.images.length) {
                    this.$set(this.info, "pubUrls", this.setImages())
                }
            },
            setImages() {
                let urls = [];
                for (let i of this.form.images) {
                    urls.push(i.name);
                }
                return urls.join(",")
            },
            submitInfo() {
                this.$refs.form.validate().then(valid => {
                    this.checkImages();
                    if (this.isEdit) {
                        this.updateWorkLogRequest()
                    } else {
                        this.addWorkLogRequest()
                    }
                })
            },
            addWorkLogRequest() {
                addCounterfraud(this.info).then(res => {
                    uni.showToast({
                        icon: 'success',
                        title: '提交成功'
                    })
                    setTimeout(() => {
                        uni.navigateBack()
                    }, 300)
                })
            },
            updateWorkLogRequest() {
                addCounterfraud(this.info).then(res => {
                    uni.showToast({
                        icon: 'success',
                        title: '提交成功',
                    })
                    setTimeout(() => {
                        this.reLoadPrePage()
                    }, 300)
                })
            },
            //刷新上一页数据后返回
            reLoadPrePage() {
                let pages = getCurrentPages();
                let prePage = pages[pages.length - 2];
                prePage.$vm.resetParams();
                prePage.$vm.getList();
                uni.navigateBack();
            },
            //扫一扫
            onScan() {
                uni.scanCode({
                    success: (res) => {
                        let obj = this.getUrlParams(res.result);
                        this.getHouseType(obj.stdId);
                    }
                })
            },
            getUrlParams(url) {
                let urlStr = url.split('?')[1]
                let obj = {};
                let paramsArr = urlStr.split('&')
                for (let i = 0, len = paramsArr.length; i < len; i++) {
                    let arr = paramsArr[i].split('=')
                    obj[arr[0]] = arr[1];
                }
                return obj
            },
            getHouseType(code) {
                getQrCodeDetail({
                    roleName: uni.getStorageSync("activeRole").roleName,
                    addressCode: code
                }).then(res => {
                    let {
                        isJur,
                        doorplateType,
                        addressLevel
                    } = res.data;
                    if (isJur == 1) {
                        if (doorplateType == "户室牌") {
                            if (res.data.addressType) {
                                this.addressType = res.data.addressType
                            }
                            this.addressName = res.data.addressName;
                            this.houseCode = code;
                            this.info.houseCode = code;
                            this.info.address = res.data.addressName;
                            this.info.lat = res.data.x;
                            this.info.lng = res.data.y;
                            this.isScan = true;
                            this.getHouseInfo(code)
                        }
                    } else {
                        uni.showModal({
                            title: "提示!",
                            content: "该区域不是您管辖范围",
                            showCancel: false
                        })
                    }
                })
            },
            navToHouse() {
                uni.navigateTo({
                    url: `/subPackage/house/roomDetails/index?code=${this.info.houseCode}`
                })
            }
        }
    }
</script>
<style lang="less">
    page {
        background-color: #F5F5F5;
    }
    .content {
        margin: 20rpx 30rpx;
        padding: 0 30rpx;
    }
    .row {
        padding: 20rpx 0;
        border-bottom: 1px solid
    }
    .location-btn {
        width: 116rpx;
        height: 46rpx;
        line-height: 46rpx;
        border-radius: 4rpx;
        border: 1px solid currentColor;
        padding: 0;
        background-color: #fff;
        text-align: center;
    }
    .upload {
        margin: 0 30rpx;
        padding: 30rpx;
        .upload-item {
            width: 140rpx;
            height: 140rpx;
            border: 1px solid #EEEEEE;
        }
    }
    .footer {
        width: 100%;
        padding: 30rpx;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 10;
        box-sizing: border-box;
        .footer-btn {
            width: 100%;
            height: 78rpx;
            line-height: 78rpx;
            background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
            border-radius: 8rpx;
            color: #fff;
            font-size: 32rpx;
        }
    }
    .popup-content {
        width: 100%;
        padding: 0 30rpx 30rpx;
        box-sizing: border-box;
        .popup-title {
            padding: 30rpx 0;
            text-align: center;
            font-weight: bold;
        }
        .popup-list {
            height: 650rpx;
        }
        .popup-list-item {
            padding: 20rpx 0;
            border-bottom: 1px solid #f1f1f1;
            position: relative;
        }
        .check-icon {
            position: absolute;
            right: 20rpx;
            top: 20rpx;
        }
    }
    .address-content {
        flex: 1;
        // background-color: #F5F5F5;
        font-size: 28rpx;
        padding: 2rpx 10rpx;
    }
    .top {
        margin: 20rpx;
        padding: 20rpx;
    }
    .footer {
        width: 100%;
        padding: 20rpx 30rpx;
        background-color: #fff;
        z-index: 999;
        position: fixed;
        bottom: 0;
        left: 0;
        box-shadow: 0rpx 0rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
        padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
        box-sizing: border-box;
        .footer-item {
            width: 48%;
            height: 78rpx;
            font-size: 32rpx;
        }
        .footer-left {
            border: 1px solid currentColor;
        }
        .footer-right {
            background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
        }
    }
</style>
subPackage/counterfraud/dispose.vue
New file
@@ -0,0 +1,630 @@
<template>
    <view>
        <view class="top item flex j-c-s-b a-i-c bgc-ff" @click="onScan()" v-if="!currentId">
            <view class="flex a-i-c">
                <u-icon name="/static/icon/nav-05.png" width="90rpx" height="90rpx"></u-icon>
                <text class="f-28 ml-10">扫码获取房屋信息</text>
            </view>
            <u-icon name="arrow-right" size="20"></u-icon>
        </view>
        <view class="content bgc-ff">
            <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90"
                :labelStyle="{fontSize:'28rpx'}">
                <u-form-item label="地址" prop="address" :borderBottom="false" v-if="!isScan">
                    <view class="address-row flex">
                        <view class="address-content f-28" v-if="info.address">
                            {{info.address}}
                        </view>
                        <view class="address-content f-28 c-99" v-if="!info.address">
                            请选择地址
                        </view>
                        <view class="location-btn c-main f-24" @click="getLocation()">
                            获取地址
                        </view>
                    </view>
                    <!-- <u-input v-model="info.address" border="none"  placeholderClass="f-28 c-99"
                        inputAlign="right"    disabled  disabledColor="#fff">
                        <template slot="suffix">
                            <button class="location-btn c-main f-24"   @click="getLocation()">获取地址</button>
                        </template>
                    </u-input> -->
                </u-form-item>
                <u-form-item label="地址" borderBottom required v-if="isScan">
                    <u-textarea v-model="info.address" border="none" disabled disabledColor="#fff"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-textarea>
                </u-form-item>
                <u-form-item label="业主姓名" borderBottom required v-if="isScan">
                    <u-input v-model="houseHoldInfo.name" border="none" disabled disabledColor="#fff"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="业主电话" borderBottom required v-if="isScan">
                    <u-input v-model="houseHoldInfo.phoneNumber" border="none" disabled disabledColor="#fff"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                </u-form-item>
                <!--                 <u-form-item label="地址" borderBottom required>
                    <u-input v-model="address" border="none" disabled disabledColor="#fff" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                </u-form-item> -->
                <u-form-item label="记录内容" borderBottom required prop="recContent">
                    <u-textarea type="textarea" v-model="info.recContent" border="none" placeholderClass="f-28 c-99"
                        inputAlign="right" placeholder="请输入记录内容">
                    </u-textarea>
                </u-form-item>
                <!-- <u-form-item label="走访时间" prop="workTime" :borderBottom="false" required @click="showSelectDate = true">
                    <u-input v-model="info.workTime" disabled disabledColor="#ffffff" border="none" placeholder="请选择"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item> -->
                <!-- <u-form-item label="房屋" prop="houseCode" :borderBottom="false"  required
                    @click="isShowScStatus = true">
                    <u-input v-model="info.scStatus" disabled disabledColor="#fff" border="none" placeholder="请选择"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item> -->
            </u-form>
        </view>
        <view class="upload bgc-ff">
            <view class="f-28">现场照片</view>
            <view class="mt-20">
                <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
                    :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
                    :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
                    <view class="upload-item upload-icon flex_base">
                        <u-icon name="/static/icon/upload.png" width="60rpx" height="60rpx"></u-icon>
                    </view>
                </u-upload>
            </view>
        </view>
        <view class="footer flex a-i-c j-c-s-b" v-if="isScan">
            <view class="footer-item  footer-left c-main" @click="navToHouse">
                查看更多
            </view>
            <view class="footer-item footer-right c-ff" @click="submitInfo">
                提交
            </view>
        </view>
        <footer-btn v-if="!isScan" @click="submitInfo" :text="isEdit?'保存':'提交'" />
    </view>
</template>
<script>
    import {
        addWorkLog,
        getWorkLogDetail,
        updateWorkLog
    } from "@/api/workLog/workLog.js"
    import uploadMixin from "@/mixin/uploadMixin";
    import {
        bizDictionary,
        update
    } from '@/api/system/dict.js'
    import {
        getLabelListByParentId
    } from "@/api/label/label.js";
    import {
        fetchHousehold
    } from "@/api/house/household.js"
    import {
        getHouseholdDetail
    } from '@/api/house/household.js'
    import {
        getQrCodeDetail
    } from "@/api/system/index"
    import {
        getHouseRentInfo
    } from "@/api/doorplateAddress/doorplateAddress";
    import {
        setCounterfraudDisopes
    } from "@/api/counterfraud/counterfraud.js"
    export default {
        mixins: [uploadMixin],
        data() {
            return {
                form: {
                    images: []
                },
                info: {
                    // name: "",
                    // phone: "",
                    address: "",
                    houseCode: "",
                    lng: "",
                    lat: "",
                    recContent: ""
                },
                rules: {
                    // 'name': {
                    //     type: 'string',
                    //     required: true,
                    //     message: '请输入姓名',
                    //     trigger: ['blur', 'change']
                    // },
                    // 'phone': {
                    //     type: 'string',
                    //     required: true,
                    //     message: '请输入手机号',
                    //     trigger: ['blur', 'change']
                    // },
                    type: [{
                        type: 'number',
                        required: true,
                        message: '请选择走访类型',
                        trigger: ['blur', 'change']
                    }],
                    // peopleType: [{
                    //     type: 'number',
                    //     required: true,
                    //     message: '请选择重点人群类型',
                    //     trigger: ['blur', 'change']
                    // }],
                    householdId: [{
                        type: 'string',
                        required: true,
                        message: '请选择被访问人',
                        trigger: ['blur', 'change']
                    }],
                    context: [{
                        type: 'string',
                        required: true,
                        message: '请输入工作内容',
                        trigger: ['blur', 'change']
                    }],
                },
                showSelectDate: false,
                workTime: Number(new Date()),
                isShowPicker: false,
                houseIndex: [0],
                typeList: [],
                typeName: "",
                typeIndex: [0],
                isShowTypePicker: false,
                isShowLabelPicker: false,
                labelList: [],
                labelIndex: [0],
                labelName: "",
                keyword: "",
                houseHoldList: [],
                selectedHousehold: {},
                isShowPopup: false,
                address: "",
                isEdit: false,
                id: "",
                isScan: false, //是否扫码
                houseHoldInfo: {}
            }
        },
        // onLoad() {
        //     let userInfo = uni.getStorageSync("userInfo");
        //     this.$set(this.info, "name", userInfo.real_name);
        //     this.$set(this.info, "phone", userInfo.phone);
        // },
        async onLoad(option) {
            await this.getTypeList();
            await this.getLabelList();
            if (option.id) {
                this.isEdit = true;
                this.id = option.id;
                setTimeout(() => {
                    this.getDetail(option.id)
                }, 200)
            }
        },
        onReady() {
            //onReady 为uni-app支持的生命周期之一
            this.$refs.form.setRules(this.rules)
        },
        methods: {
            getLocation() {
                uni.chooseLocation({
                    success: (res) => {
                        this.$set(this.info, "address", res.address);
                        this.$set(this.info, "lat", res.latitude);
                        this.$set(this.info, "lng", res.longitude)
                    }
                })
            },
            getHouseInfo(code) {
                getHouseRentInfo(code).then(res => {
                    console.log(res)
                    if (res.code == 200 && res.data.householdList.length) {
                        this.houseHoldInfo = res.data.houseHoldList[0]
                    }
                })
            },
            getDetail(id) {
                getWorkLogDetail({
                    id
                }).then(res => {
                    console.log(res);
                    if (res.code == 200) {
                        let data = res.data
                        this.tyepIndex = this.$getIndex(this.typeList[0], data.type, "dictKey", "dictValue").index;
                        this.typeName = this.$getIndex(this.typeList[0], data.type, "dictKey", "dictValue").name;
                        if (data.workTime) {
                            this.workTime = Number(new Date(data.workTime))
                        }
                        // this.info.type = data.type;
                        // this.info.workTime = data.workTime;
                        // this.info.context = data.context;
                        // this.info.householdId = data.householdId;
                        // this.info.personType = data.personType;
                        console.log(typeof data.personType)
                        this.labelIndex = this.$getIndex(this.labelList[0], data.personType, "id", "name").index;
                        this.labelName = this.$getIndex(this.labelList[0], data.personType, "id", "name").name;
                        this.getHouseholdList();
                        this.getHousehold(data.householdId);
                        this.form.images = this.$setImageUrl(data.url, 2);
                        this.info.id = data.id;
                        for (let i in this.info) {
                            this.$set(this.info, i, data[i])
                        }
                    }
                })
            },
            getTypeList() {
                bizDictionary({
                    code: "haveType"
                }).then(res => {
                    console.log(res)
                    this.typeList = [res.data];
                })
            },
            getLabelList() {
                getLabelListByParentId({
                    parentId: 100
                }).then(res => {
                    this.labelList = [res.data];
                })
            },
            getHousehold(id) {
                getHouseholdDetail({
                    id
                }).then(res => {
                    console.log(res);
                    this.address = res.data.currentAddress;
                    this.selectedHousehold = res.data;
                })
            },
            getHouseholdList() {
                fetchHousehold({
                    labelId: this.info.personType,
                    searchKey: this.keyword,
                    limit: 20
                }).then(res => {
                    this.houseHoldList = res.data;
                })
            },
            confirmDate(e) {
                this.showSelectDate = false;
                this.info.workTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
            },
            confirmHouse(e) {
                this.houseIndex = e.indexs;
                this.info.houseCode = e.value[0];
                this.isShowPicker = false;
            },
            //选择走访类型
            confirmType(e) {
                console.log("type==>", e);
                this.typeIndex = e.indexs;
                this.info.type = e.value[0].dictKey;
                this.typeName = e.value[0].dictValue;
                if (e.value[0].dictKey == 1) {
                    this.info.personType = "";
                    this.keyword = "";
                    this.getHouseholdList();
                }
                this.isShowTypePicker = false;
            },
            //选择重点人群类型
            confirmLabelType(e) {
                this.labelIndex = e.indexs;
                this.info.personType = e.value[0].id;
                this.labelName = e.value[0].name;
                this.isShowLabelPicker = false;
                this.getHouseholdList();
            },
            //搜索住户
            searchHousehold() {
                this.getHouseholdList()
            },
            clearKeyword() {
                this.keyword = "";
                this.getHouseholdList()
            },
            //选择住户
            selectHousehold(item) {
                this.selectedHousehold = item;
                this.info.householdId = item.id;
                this.address = `${item.townStreetName}${item.neiName}${item.aoiName}${item.address || ""}`
                this.isShowPopup = false;
            },
            checkImages() {
                if (this.form.images.length) {
                    this.$set(this.info, "sceUrls", this.setImages())
                }
            },
            setImages() {
                let urls = [];
                for (let i of this.form.images) {
                    urls.push(i.name);
                }
                return urls.join(",")
            },
            submitInfo() {
                this.$refs.form.validate().then(valid => {
                    this.checkImages();
                    if (this.isEdit) {
                        this.updateWorkLogRequest()
                    } else {
                        this.addWorkLogRequest()
                    }
                })
            },
            addWorkLogRequest() {
                setCounterfraudDisopes(this.info).then(res => {
                    uni.showToast({
                        icon: 'success',
                        title: '提交成功'
                    })
                    setTimeout(() => {
                        uni.navigateBack()
                    }, 300)
                })
            },
            updateWorkLogRequest() {
                setCounterfraudDisopes(this.info).then(res => {
                    uni.showToast({
                        icon: 'success',
                        title: '提交成功',
                    })
                    setTimeout(() => {
                        this.reLoadPrePage()
                    }, 300)
                })
            },
            //刷新上一页数据后返回
            reLoadPrePage() {
                let pages = getCurrentPages();
                let prePage = pages[pages.length - 2];
                prePage.$vm.resetParams();
                prePage.$vm.getList();
                uni.navigateBack();
            },
            //扫一扫
            onScan() {
                uni.scanCode({
                    success: (res) => {
                        let obj = this.getUrlParams(res.result);
                        this.getHouseType(obj.stdId);
                    }
                })
            },
            getUrlParams(url) {
                let urlStr = url.split('?')[1]
                let obj = {};
                let paramsArr = urlStr.split('&')
                for (let i = 0, len = paramsArr.length; i < len; i++) {
                    let arr = paramsArr[i].split('=')
                    obj[arr[0]] = arr[1];
                }
                return obj
            },
            getHouseType(code) {
                getQrCodeDetail({
                    roleName: uni.getStorageSync("activeRole").roleName,
                    addressCode: code
                }).then(res => {
                    let {
                        isJur,
                        doorplateType,
                        addressLevel
                    } = res.data;
                    if (isJur == 1) {
                        if (doorplateType == "户室牌") {
                            if (res.data.addressType) {
                                this.addressType = res.data.addressType
                            }
                            this.addressName = res.data.addressName;
                            this.houseCode = code;
                            this.info.houseCode = code;
                            this.info.address = res.data.addressName;
                            this.info.lat = res.data.x;
                            this.info.lng = res.data.y;
                            this.isScan = true;
                            this.getHouseInfo(code)
                        }
                    } else {
                        uni.showModal({
                            title: "提示!",
                            content: "该区域不是您管辖范围",
                            showCancel: false
                        })
                    }
                })
            },
            navToHouse() {
                uni.navigateTo({
                    url: `/subPackage/house/roomDetails/index?code=${this.info.houseCode}`
                })
            }
        }
    }
</script>
<style lang="less">
    page {
        background-color: #F5F5F5;
    }
    .content {
        margin: 20rpx 30rpx;
        padding: 0 30rpx;
    }
    .row {
        padding: 20rpx 0;
        border-bottom: 1px solid
    }
    .location-btn {
        width: 116rpx;
        height: 46rpx;
        line-height: 46rpx;
        border-radius: 4rpx;
        border: 1px solid currentColor;
        padding: 0;
        background-color: #fff;
        text-align: center;
    }
    .upload {
        margin: 0 30rpx;
        padding: 30rpx;
        .upload-item {
            width: 140rpx;
            height: 140rpx;
            border: 1px solid #EEEEEE;
        }
    }
    .footer {
        width: 100%;
        padding: 30rpx;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 10;
        box-sizing: border-box;
        .footer-btn {
            width: 100%;
            height: 78rpx;
            line-height: 78rpx;
            background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
            border-radius: 8rpx;
            color: #fff;
            font-size: 32rpx;
        }
    }
    .popup-content {
        width: 100%;
        padding: 0 30rpx 30rpx;
        box-sizing: border-box;
        .popup-title {
            padding: 30rpx 0;
            text-align: center;
            font-weight: bold;
        }
        .popup-list {
            height: 650rpx;
        }
        .popup-list-item {
            padding: 20rpx 0;
            border-bottom: 1px solid #f1f1f1;
            position: relative;
        }
        .check-icon {
            position: absolute;
            right: 20rpx;
            top: 20rpx;
        }
    }
    .address-content {
        flex: 1;
        // background-color: #F5F5F5;
        font-size: 28rpx;
        padding: 2rpx 10rpx;
    }
    .top {
        margin: 20rpx;
        padding: 20rpx;
    }
    .footer {
        width: 100%;
        padding: 20rpx 30rpx;
        background-color: #fff;
        z-index: 999;
        position: fixed;
        bottom: 0;
        left: 0;
        box-shadow: 0rpx 0rpx 10rpx 1rpx rgba(0, 0, 0, 0.1);
        padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
        box-sizing: border-box;
        .footer-item {
            width: 48%;
            height: 78rpx;
            font-size: 32rpx;
        }
        .footer-left {
            border: 1px solid currentColor;
        }
        .footer-right {
            background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
        }
    }
</style>
subPackage/user/test.vue
New file
@@ -0,0 +1,21 @@
<template>
</template>
<script>
    ↵
    # # # Error updating database.Cause: java.sql.SQLSyntaxErrorException: Table 'jczz.jczz_backblast_pub_record'
    doesn 't exist↵
    # # # The error may exist in org / springblade / modules / backblast / mapper / BackblastPubRecordMapper.java(
            best guess)↵ # # # The error may involve org.springblade.modules.backblast.mapper.BackblastPubRecordMapper
        .insert - Inline↵ # # # The error occurred
    while setting parameters↵ # # # SQL: INSERT INTO jczz_backblast_pub_record(id, house_code, policeman, policeman_phone,
            pub_content, pub_urls, grid_code, jw_grid_code, lng, lat, address, create_time) VALUES( ? , ? , ? , ? , ? , ?
            , ? , ? , ? , ? , ? , ? )↵ # # # Cause: java.sql.SQLSyntaxErrorException:
        Table 'jczz.jczz_backblast_pub_record'
    doesn 't exist↵; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table '
    jczz.jczz_backblast_pub_record ' doesn'
    t exist "
</script>
<style>
</style>