shuishen
2024-01-06 ee34f371441861cbef42fc1ee934d79383088d4c
走访人员页面相关调整
1 files modified
163 ■■■■■ changed files
src/views/cGovernance/gridWorkLog.vue 163 ●●●●● patch | view | raw | blame | history
src/views/cGovernance/gridWorkLog.vue
@@ -35,6 +35,8 @@
            datetime: "",
            selectionList: [],
            option: {
                labelWidth: 120,
                searchLabelWidth: 96,
                height: "auto",
                calcHeight: 54,
                dialogWidth: 950,
@@ -54,8 +56,6 @@
                        label: "走访类型",
                        prop: "type",
                        span: 12,
                        labelWidth: 120,
                        searchLabelWidth: 120,
                        searchSpan: 4,
                        search: true,
                        type: "select",
@@ -73,8 +73,10 @@
                            },
                        ],
                    },
                    {
                        label: "重点人员类型",
                        overHidden: true,
                        label: "重点人群",
                        prop: "personType",
                        span: 12,
                        type: "tree",
@@ -83,42 +85,33 @@
                            label: "name",
                            value: "id"
                        },
                        labelWidth: 120,
                        searchLabelWidth: 120,
                        searchSpan: 5,
                        searchSpan: 4,
                        search: true,
                        rules: [
                            {
                                required: true,
                                message: "请选择重点人员类型",
                                message: "请选择重点人群",
                                trigger: "blur",
                            },
                        ],
                    },
                    // {
                    //     label: "人员姓名",
                    //     prop: "name",
                    //     span: 12,
                    //     labelWidth: 120,
                    //     searchSpan: 4,
                    //     search: true,
                    //     rules: [
                    //         {
                    //             required: true,
                    //             message: "请输入人员姓名",
                    //             trigger: "blur",
                    //         },
                    //     ],
                    // },
                    {
                        label: "人员姓名",
                        width: 110,
                        display: false,
                        label: "被访人姓名",
                        prop: "name",
                        searchLabelWidth: 120,
                        searchSpan: 5,
                        search: true,
                    },
                    {
                        label: "被访人姓名",
                        prop: "householdId",
                        hide: true,
                        type: "table",
                        span: 12,
                        labelWidth: 120,
                        searchSpan: 4,
                        search: true,
                        children: {
                            border: true,
                            height: 400,
@@ -127,6 +120,7 @@
                            submitText: "确定",
                            column: [
                                {
                                    width: 110,
                                    label: "姓名",
                                    prop: "name",
                                    search: true,
@@ -140,6 +134,7 @@
                                    ],
                                },
                                {
                                    width: 120,
                                    label: "联系方式",
                                    prop: "phoneNumber",
                                    search: true,
@@ -167,7 +162,9 @@
                            total: 0
                        },
                        formatter: (row) => {
                            this.form.phoneNumber = row.phoneNumber
                            this.form.phone = row.phoneNumber
                            this.form.address = row.currentAddress
                            return row.name
                        },
                        onLoad: ({
@@ -210,26 +207,81 @@
                        }
                    },
                    {
                        width: 120,
                        label: "联系方式",
                        prop: "phone",
                        span: 12,
                        disabled: true,
                        labelWidth: 120,
                        searchSpan: 4,
                        search: true,
                    },
                    {
                        width: 156,
                        overHidden: true,
                        label: "走访地址",
                        prop: "address",
                        span: 24,
                        labelWidth: 120,
                        disabled: true,
                    },
                    {
                        width: 110,
                        label: "所属街道",
                        display: false,
                        prop: "townName",
                    },
                    {
                        width: 156,
                        overHidden: true,
                        label: "所属社区",
                        display: false,
                        prop: "neiName",
                        search: true,
                        searchSpan: 4
                    },
                    {
                        width: 110,
                        overHidden: true,
                        label: "所属网格",
                        display: false,
                        prop: "gridName",
                    },
                    {
                        overHidden: true,
                        label: "走访内容",
                        prop: "context",
                        type: "textarea",
                        span: 24,
                    },
                    {
                        width: 110,
                        label: "走访取证",
                        prop: "url",
                        type: "upload",
                        listType: "picture-img",
                        action: "/api/blade-resource/oss/endpoint/put-file",
                        propsHttp: {
                            res: "data",
                            name: 'name',
                            url: "link",
                        },
                        span: 24,
                    },
                    {
                        width: 110,
                        label: "录入人",
                        prop: "createUserName",
                    },
                    {
                        width: 144,
                        label: "走访时间",
                        prop: "workTime",
                        width: 160,
                        labelWidth: 120,
                        searchLabelWidth: 120,
                        type: "date",
                        format: "yyyy-MM-dd HH:mm:ss",
@@ -242,49 +294,30 @@
                            },
                        ],
                    },
                    {
                        label: "内容",
                        labelWidth: 120,
                        prop: "context",
                        type: "textarea",
                        span: 24,
                        width: 144,
                        label: "上报时间",
                        prop: "createTime",
                        searchLabelWidth: 120,
                        type: "date",
                        format: "yyyy-MM-dd HH:mm:ss",
                        valueFormat: "yyyy-MM-dd HH:mm:ss",
                        rules: [
                            {
                                required: true,
                                message: "请输入上报时间",
                                trigger: "blur",
                            },
                        ],
                    },
                    {
                        width: 110,
                        label: "走访取证",
                        prop: "url",
                        type: "upload",
                        labelWidth: 120,
                        listType: "picture-img",
                        action: "/api/blade-resource/oss/endpoint/put-file",
                        propsHttp: {
                            res: "data",
                            name: 'name',
                            url: "link",
                        },
                        span: 24,
                    }
                ],
            },
            data: [],
        }
    },
    watch: {
        "form.householdId": {
            // form是表单或者表格绑定的数据集,v-model='form'
            handler (val) {
                this.$nextTick(() => {
                    console.log(this.$refs, 66666)
                    getHouseholdDetail(val).then(res => {
                        const data = res.data.data
                        this.form.phoneNumber = data.phoneNumber
                        this.form.currentAddress = data.currentAddress
                    })
                })
            },
            immediate: true,
        },
    },
    computed: {
        ...mapGetters(["permission", "userInfo"]),