From 4522ab3fe8bd45ee753ef187448c1e884bbc601f Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 18 Apr 2024 11:09:27 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_web

---
 src/views/place/components/baseAllInfo.vue |  292 +++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 219 insertions(+), 73 deletions(-)

diff --git a/src/views/place/components/baseAllInfo.vue b/src/views/place/components/baseAllInfo.vue
index 30fcea8..558c9d1 100644
--- a/src/views/place/components/baseAllInfo.vue
+++ b/src/views/place/components/baseAllInfo.vue
@@ -4,11 +4,19 @@
       <div class="content-box">
         <box-title class="m10" :classVal="9" :title="'基本信息'"></box-title>
         <avue-form v-if="baseShow" ref="baseForm" :option="option" v-model="form">
+          <template slot-scope="{ row, size, index }" slot="houseCodeBinds">
+            <el-select v-model="form.houseCodeBinds" filterable remote multiple :remote-method="onRemoteMethod"
+              @change="onSelectChange" placeholder="请选择标准地址" reserve-keyword>
+              <el-option v-for="item in standardAddressList" :key="item.addressCode" :label="item.addressName"
+                :value="item.addressCode">
+              </el-option>
+            </el-select>
+          </template>
         </avue-form>
 
 
         <box-title class="m10" :classVal="9" :title="'房东信息'"></box-title>
-        <avue-form v-if="restShow" ref="restForm" :option="houseOwnerOption" v-model="form"></avue-form>
+        <avue-form v-if="restShow" ref="restForm" :option="houseOwnerOption" v-model="placeForm"></avue-form>
 
         <box-title class="m10" :classVal="9" :title="'其他信息'"></box-title>
         <avue-form v-if="restShow" ref="restForm" :option="optionDetail" v-model="placeForm"></avue-form>
@@ -40,6 +48,7 @@
     getHoldList,
     update,
     updatePlaceExt,
+    getPlaceAddressList
   } from "@/api/place/place"
   import {
     getPlaceList
@@ -78,6 +87,7 @@
               span: 12,
               label: "场所名称",
               prop: "placeName",
+              labelWidth: 120,
               rules: [{
                 required: true,
                 message: "请输入场所名称",
@@ -90,6 +100,7 @@
             {
               label: "负责人",
               prop: "principal",
+              labelWidth: 120,
               rules: [{
                 required: false,
                 message: "请输入负责人",
@@ -101,6 +112,7 @@
               width: 96,
               label: "手机号码",
               prop: "principalPhone",
+              labelWidth: 120,
               search: true,
               searchSpan: 4,
               slot: true,
@@ -114,6 +126,7 @@
               width: 120,
               overHidden: true,
               label: "身份证号",
+              labelWidth: 120,
               prop: "principalIdCard",
               search: true,
               searchSpan: 4,
@@ -129,6 +142,7 @@
               hide: true,
               parent: false,
               label: "所属社区",
+              labelWidth: 120,
               prop: "neiCode",
               search: false,
               type: "tree",
@@ -152,6 +166,7 @@
               label: "所属网格",
               prop: "gridCode",
               type: "tree",
+              labelWidth: 120,
               cell: true,
               props: {
                 label: "gridName",
@@ -170,6 +185,7 @@
               span: 7,
               label: "场所标签",
               prop: "label",
+              labelWidth: 120,
               type: "select",
               dicUrl: "/api/blade-category/category/getCategory?level=2",
               cascader: ["smallLabel"],
@@ -205,6 +221,7 @@
               label: "标签颜色",
               prop: "color",
               type: "select",
+              labelWidth: 120,
               dicData: [{
                   label: "绿",
                   value: "green",
@@ -228,6 +245,7 @@
               span: 12,
               label: "九小场所",
               prop: "isNine",
+              labelWidth: 120,
               type: "select",
               dicData: [{
                   label: "是",
@@ -249,6 +267,7 @@
               span: 12,
               label: "九小分类",
               prop: "nineType",
+              labelWidth: 120,
               type: "select",
               display: false,
               dicUrl: "/api/blade-system/dict-biz/dictionary?code=nineType",
@@ -263,6 +282,7 @@
               span: 12,
               label: "阵地",
               prop: "isFront",
+              labelWidth: 120,
               type: "select",
               dicData: [{
                   label: "是",
@@ -285,6 +305,7 @@
               label: "阵地类型",
               prop: "frontType",
               type: "select",
+              labelWidth: 120,
               display: false,
               row: true,
               dicUrl: "/api/blade-system/dict-biz/dictionary?code=frontType",
@@ -296,10 +317,51 @@
               },
             },
             {
+              span: 12,
+              label: "三级消防单位",
+              prop: "threeFireProtection",
+              labelWidth: 120,
+              type: "select",
+              dicData: [{
+                  label: "是",
+                  value: 1,
+                },
+                {
+                  label: "否",
+                  value: 2,
+                }
+              ],
+              hide: true,
+              rules: [{
+                required: false,
+                message: "请选择三级消防单位",
+                trigger: "blur",
+              }],
+            },
+
+            {
+              span: 12,
+              label: "无炸类型",
+              prop: "noExplosionCategory",
+              type: "select",
+              labelWidth: 120,
+              display: true,
+              row: true,
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=noExplosionCategory",
+              dataType: "number",
+              hide: true,
+              props: {
+                label: "dictValue",
+                value: "dictKey",
+              },
+            },
+
+            {
               label: "场所照片",
               prop: "imageUrls",
               width: 80,
               type: "upload",
+              labelWidth: 120,
               listType: "picture-card",
               dataType: "string",
               multiple: true,
@@ -309,7 +371,7 @@
                 name: "name",
                 url: "link",
               },
-              span: 12,
+              span: 24,
             },
             {
               width: 160,
@@ -319,7 +381,8 @@
               prop: "location",
               type: "map",
               dataType: "string",
-              span: 12,
+              labelWidth: 120,
+              span: 24,
               value: [117.96646, 28.431002, ""],
               cascader: ['houseCodeBinds'],
               rules: [{
@@ -332,41 +395,55 @@
               width: 160,
               overHidden: true,
               display: false,
+              labelWidth: 120,
               hide: true,
               label: "地址",
               prop: "addressName",
               span: 12
             },
 
+            // {
+            //   width: 160,
+            //   overHidden: true,
+            //   slot: true,
+            //   label: "标准地址",
+            //   prop: "houseCodeBinds",
+            //   span: 24,
+            //   type: 'select',
+            //   labelWidth:120,
+            //   dataType: "object",
+            //   remote: true,
+            //   multiple: true,
+            //   hide: true,
+            //   display: false,
+            //   filterable:true,
+            //   dicUrl: `/api/blade-doorplateAddress/doorplateAddress/getPlaceList`,
+            //   props: {
+            //     label: 'addressName',
+            //     value: 'addressCode',
+            //   },
+            //   dicData: [],
+            //   rules: [{
+            //     required: false,
+            //     message: "请选择标准地址",
+            //     trigger: "blur",
+            //   }, ]
+            // },
             {
-              width: 160,
-              overHidden: true,
+              span: 24,
+              hide: true,
+              prop: "houseCodeBinds",
               slot: true,
               label: "标准地址",
-              prop: "houseCodeBinds",
-              span: 24,
-              type: 'tree',
-              dataType: "object",
-              remote: true,
-              multiple: true,
-              hide: true,
-              display: false,
-              dicUrl: `/api/blade-doorplateAddress/doorplateAddress/getPlaceList?addressName={{addressName}}`,
-              props: {
-                label: 'addressName',
-                value: 'addressCode',
-              },
-              dicData: [],
-              rules: [{
-                required: false,
-                message: "请选择地址",
-                trigger: "blur",
-              }, ],
+              labelWidth: 120,
+
             },
+
             {
               label: "备注",
               prop: "remark",
               type: 'textarea',
+              labelWidth: 120,
               hide: true,
               span: 24,
               rules: [{
@@ -460,35 +537,6 @@
               searchSpan: 4,
               search: true,
             },
-
-            {
-              labelWidth: 100,
-              label: "电话号码",
-              prop: "telephone",
-              search: true,
-              searchSpan: 4,
-              slot: true,
-              overHidden: true,
-              rules: [{
-                validator: validatorPhone,
-                trigger: "blur",
-              }, ],
-            },
-
-            {
-              labelWidth: 100,
-              label: "身份证号",
-              prop: "idCard",
-            },
-
-            {
-              labelWidth: 100,
-              label: "现居住地",
-              prop: "tempAddress",
-              searchSpan: 4,
-              search: true,
-            },
-
             {
               labelWidth: 100,
               label: "性别",
@@ -508,7 +556,6 @@
                 }
               ],
             },
-
             {
               labelWidth: 100,
               span: 12,
@@ -523,7 +570,33 @@
                 value: "dictKey",
               },
             },
+            {
+              labelWidth: 100,
+              label: "身份证号",
+              prop: "idCard",
+            },
 
+            {
+              labelWidth: 100,
+              label: "电话号码",
+              prop: "telephone",
+              search: true,
+              searchSpan: 4,
+              slot: true,
+              overHidden: true,
+              rules: [{
+                validator: validatorPhone,
+                trigger: "blur",
+              }, ],
+            },
+
+            {
+              labelWidth: 100,
+              label: "现居住地",
+              prop: "tempAddress",
+              searchSpan: 4,
+              search: true,
+            },
             {
               labelWidth: 100,
               label: "岗位",
@@ -532,11 +605,63 @@
             },
 
             {
+              label: "从业人员照片",
+              prop: "employerImg",
+              labelWidth: 100,
+              type: "upload",
+              listType: "picture-card",
+              dataType: "string",
+              multiple: true,
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              propsHttp: {
+                res: "data",
+                name: "name",
+                url: "link",
+              },
+              span: 24,
+              hide: true
+            },
+            {
+              label: "入职时间",
+              labelWidth: 100,
+              hide: true,
+              row: true,
+              prop: "resignationTime",
+              type: "datetime",
+              format: "yyyy-MM-dd",
+              valueFormat: "yyyy-MM-dd",
+              // format: "yyyy-MM-dd hh:mm:ss",
+              // valueFormat: "yyyy-MM-dd hh:mm:ss",
+              rules: [{
+                required: false,
+                message: "请选择入职时间",
+                trigger: "blur",
+              }]
+            },
+            {
+              label: "离职时间",
+              labelWidth: 100,
+              hide: true,
+              row: true,
+              prop: "employmentTime",
+              type: "datetime",
+              format: "yyyy-MM-dd",
+              valueFormat: "yyyy-MM-dd",
+              // format: "yyyy-MM-dd hh:mm:ss",
+              // valueFormat: "yyyy-MM-dd hh:mm:ss",
+              rules: [{
+                required: false,
+                message: "请选择离职时间",
+                trigger: "blur",
+              }]
+            },
+            {
               labelWidth: 100,
               label: "状态",
               prop: "resignationFlag",
               // hide: true
               type: "select",
+              display: false,
               dicData: [{
                   label: "在职",
                   value: 1
@@ -579,7 +704,7 @@
               slot: true,
               overHidden: true,
               rules: [{
-                validator: validatorPhone,
+                // validator: validatorPhone,
                 trigger: "blur",
               }, ],
             },
@@ -596,22 +721,6 @@
                 trigger: "blur",
               }, ],
             },
-            {
-              width: 96,
-              label: "微信号",
-              prop: "legalTel",
-              search: true,
-              searchSpan: 4,
-              slot: true,
-              overHidden: true,
-              rules: [{
-                validator: validatorPhone,
-                trigger: "blur",
-              }, ],
-            },
-
-
-
           ],
         },
         userOption: {
@@ -650,6 +759,10 @@
 
           ],
         },
+
+        standardAddressList: [], //标准地址数据
+        standardAddress: "",
+        standardAddressSearchKey: ""
       }
     },
 
@@ -729,6 +842,7 @@
           }), getPlaceList()])
           .then(
             that.$axios.spread(function(baseInfo, restInfo) {
+              console.log("houseCodeBinds===>", baseInfo.data.data.houseCodeBinds)
               that.form = baseInfo.data.data
               that.form.addressName = that.form.location;
               that.form.location = [
@@ -736,6 +850,10 @@
                 that.form.lat,
                 that.form.location,
               ].join(",")
+              if (baseInfo.data.data.houseCodeBinds) {
+                that.standardAddressList = baseInfo.data.data.houseBindList;
+                that.form.houseCodeBinds = baseInfo.data.data.houseCodeBinds.split(",")
+              }
 
               if (that.form.imageUrls && that.form.imageUrls.length) {
                 that.form.imageUrls = that.form.imageUrls
@@ -765,6 +883,9 @@
               that.baseShow = true
               const data = restInfo.data.data
 
+
+
+
               if (data) {
                 let imageUrls = data.imageUrls
                 let planImageUrls = data.planImageUrls
@@ -789,12 +910,16 @@
                   ...data,
                   imageUrls,
                   planImageUrls,
+
+
                 }
               }
 
               that.restShow = true
             })
           )
+
+        that.getPlaceAddressListRequest()
       },
 
       locationDispose(data) {
@@ -936,7 +1061,7 @@
           this.form.houseCodeBinds = this.form.houseCodeBinds.join(",")
         }
 
-
+        this.form.placeExtEntity = null
         this.$refs.baseForm.validate((valid, done, msg) => {
           if (valid) {
             that.$axios
@@ -988,6 +1113,27 @@
         this.restShow = false
         this.roleBox = false
       },
+
+      getPlaceAddressListRequest(query) {
+        getPlaceAddressList({
+          addressName: query
+        }).then(res => {
+          this.standardAddressList = res.data.data;
+        })
+      },
+
+      onSelectChange(e) {
+        console.log("selectChange===>", e);
+        // this.getPlaceAddressListRequest()
+      },
+
+      onRemoteMethod(query) {
+        console.log("remote===>", query)
+        this.getPlaceAddressListRequest(query)
+      },
+
+
+
     },
   }
 </script>
@@ -1015,4 +1161,4 @@
       justify-content: center;
     }
   }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3