Hwt před 2 roky
rodič
revize
87da973c07

+ 77 - 77
commandCenter/src/views/videoSurveillance/myVideoPlayer.vue

@@ -1,22 +1,22 @@
 <template>
-    <video-player
-        class="video-player vjs-custom-skin"
-        :ref="uid"
-        :playsinline="true"
-        :options="playerOption"
-        @play="onPlayerPlay($event)"
-        @pause="onPlayerPause($event)"
-        @ended="onPlayerEnded($event)"
-        @waiting="onPlayerWaiting($event)"
-        @playing="onPlayerPlaying($event)"
-        @loadeddata="onPlayerLoadeddata($event)"
-        @timeupdate="onPlayerTimeupdate($event)"
-        @canplay="onPlayerCanplay($event)"
-        @canplaythrough="onPlayerCanplaythrough($event)"
-        @statechanged="playerStateChanged($event)"
-        @ready="playerReadied"
-    >
-    </video-player>
+  <video-player
+    class="video-player vjs-custom-skin"
+    :ref="uid"
+    :playsinline="true"
+    :options="playerOption"
+    @play="onPlayerPlay($event)"
+    @pause="onPlayerPause($event)"
+    @ended="onPlayerEnded($event)"
+    @waiting="onPlayerWaiting($event)"
+    @playing="onPlayerPlaying($event)"
+    @loadeddata="onPlayerLoadeddata($event)"
+    @timeupdate="onPlayerTimeupdate($event)"
+    @canplay="onPlayerCanplay($event)"
+    @canplaythrough="onPlayerCanplaythrough($event)"
+    @statechanged="playerStateChanged($event)"
+    @ready="playerReadied"
+  >
+  </video-player>
 </template>
 <script >
 import { videoPlayer } from 'vue-video-player';
@@ -25,76 +25,76 @@ import 'vue-video-player/src/custom-theme.css';
 import 'videojs-contrib-hls';
 
 export default {
-    components: {
-        videoPlayer
-    },
-    props: {
-        videoData: Array
-    },
-    data() {
-        return {
-            uid: `videoPlayer_${this._uid}`
-        };
-    },
-    computed: {
-        playerOption() {
-            return {
-                playbackRates: [0.5, 1.0, 1.5, 2.0], // 可选的播放速度
-                autoplay: false, // 如果为true,浏览器准备好时开始回放。
-                muted: false, // 默认情况下将会消除任何音频。
-                loop: false, // 是否视频一结束就重新开始。
-                preload: 'auto', // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
-                language: 'zh-CN',
-                aspectRatio: '16:9', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
-                fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
-                sources: this.videoData,
-                hls: true,
-                poster: '', // 封面地址
-                notSupportedMessage: '此视频暂无法播放,请稍后再试', // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
-                controlBar: {
-                    timeDivider: true, // 当前时间和持续时间的分隔符
-                    durationDisplay: true, // 显示持续时间
-                    remainingTimeDisplay: false, // 是否显示剩余时间功能
-                    fullscreenToggle: true // 是否显示全屏按钮
-                }
-            };
+  components: {
+    videoPlayer
+  },
+  props: {
+    videoData: Array
+  },
+  data () {
+    return {
+      uid: `videoPlayer_${this._uid}`
+    };
+  },
+  computed: {
+    playerOption () {
+      return {
+        playbackRates: [0.5, 1.0, 1.5, 2.0], // 可选的播放速度
+        autoplay: false, // 如果为true,浏览器准备好时开始回放。
+        muted: false, // 默认情况下将会消除任何音频。
+        loop: false, // 是否视频一结束就重新开始。
+        preload: 'auto', // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
+        language: 'zh-CN',
+        aspectRatio: '16:9', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
+        fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
+        sources: this.videoData,
+        hls: true,
+        poster: '', // 封面地址
+        notSupportedMessage: '此视频暂无法播放,请稍后再试', // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
+        controlBar: {
+          timeDivider: true, // 当前时间和持续时间的分隔符
+          durationDisplay: true, // 显示持续时间
+          remainingTimeDisplay: false, // 是否显示剩余时间功能
+          fullscreenToggle: true // 是否显示全屏按钮
         }
+      };
+    }
+  },
+  methods: {
+    // 播放回调
+    onPlayerPlay (player) {
+      this.$refs[this.uid].player.play();
     },
-    methods: {
-        // 播放回调
-        onPlayerPlay(player) {
-            this.$refs[this.uid].player.play();
-        },
 
-        // 暂停回调
-        onPlayerPause(player) {},
+    // 暂停回调
+    onPlayerPause (player) { },
 
-        // 视频播完回调
-        onPlayerEnded($event) {},
+    // 视频播完回调
+    onPlayerEnded ($event) { },
 
-        // DOM元素上的readyState更改导致播放停止
-        onPlayerWaiting($event) {},
+    // DOM元素上的readyState更改导致播放停止
+    onPlayerWaiting ($event) { },
 
-        // 已开始播放回调
-        onPlayerPlaying($event) {},
+    // 已开始播放回调
+    onPlayerPlaying ($event) { },
 
-        // 当播放器在当前播放位置下载数据时触发
-        onPlayerLoadeddata($event) {},
+    // 当播放器在当前播放位置下载数据时触发
+    onPlayerLoadeddata ($event) { },
 
-        // 当前播放位置发生变化时触发。
-        onPlayerTimeupdate($event) {},
+    // 当前播放位置发生变化时触发。
+    onPlayerTimeupdate ($event) { },
 
-        //媒体的readyState为HAVE_FUTURE_DATA或更高
-        onPlayerCanplay(player) {},
+    //媒体的readyState为HAVE_FUTURE_DATA或更高
+    onPlayerCanplay (player) { },
 
-        //媒体的readyState为HAVE_ENOUGH_DATA或更高。这意味着可以在不缓冲的情况下播放整个媒体文件。
-        onPlayerCanplaythrough(player) {},
+    //媒体的readyState为HAVE_ENOUGH_DATA或更高。这意味着可以在不缓冲的情况下播放整个媒体文件。
+    onPlayerCanplaythrough (player) { },
 
-        //播放状态改变回调
-        playerStateChanged(playerCurrentState) {},
+    //播放状态改变回调
+    playerStateChanged (playerCurrentState) { },
 
-        //将侦听器绑定到组件的就绪状态。与事件监听器的不同之处在于,如果ready事件已经发生,它将立即触发该函数。。
-        playerReadied(player) {}
-    }
+    //将侦听器绑定到组件的就绪状态。与事件监听器的不同之处在于,如果ready事件已经发生,它将立即触发该函数。。
+    playerReadied (player) { }
+  }
 };
 </script>

+ 49 - 44
commandCenter/src/views/videoSurveillance/video.vue

@@ -1,60 +1,65 @@
 <template>
-    <div class="videoContent" :class="`content${urlArr.length > 1 ? '_most' : ''}`">
-        <div class="videoList" v-for="(item, index) in urlArr" :key="index">
-            <my-video-playerVue
-                :videoData="[
+  <div
+    class="videoContent"
+    :class="`content${urlArr.length > 1 ? '_most' : ''}`"
+  >
+    <div
+      class="videoList"
+      v-for="(item, index) in urlArr"
+      :key="index"
+    >
+      <my-video-playerVue :videoData="[
                     {
                         type: 'application/x-mpegURL', // 类型
                         withCredentials: false,
                         src: item
                     }
-                ]"
-            ></my-video-playerVue>
-        </div>
+                ]"></my-video-playerVue>
     </div>
+  </div>
 </template>
 <script >
 import myVideoPlayerVue from './myVideoPlayer.vue';
 
 export default {
-    components: {
-        myVideoPlayerVue
-    },
-    props: {
-        videoUrlList: []
-    },
-    computed: {},
-    watch: {
-        videoUrlList(news) {
-            if (!!news.length) {
-                news.map((item) => {
-                    this.getVideo(item);
-                });
+  components: {
+    myVideoPlayerVue
+  },
+  props: {
+    videoUrlList: []
+  },
+  computed: {},
+  watch: {
+    videoUrlList (news) {
+      if (!!news.length) {
+        news.map((item) => {
+          this.getVideo(item);
+        });
+      }
+    }
+  },
+  data () {
+    return {
+      urlArr: [
+        // 'http://cmgw-vpc.lechange.com:8888/LCO/7D100C2PAZ6C590/0/0/20220112T081910/051edef3559a8eca65febb70e504acdb.m3u8',
+      ]
+    };
+  },
+  methods: {
+    getVideo (urlId) {
+      this.$http
+        .post('/sc-community/dahuaDevice/getRealTimeUrl', { channelId: urlId, streamType: '1', type: 'hls' })
+        .then(({ status, data, msg }) => {
+          if (status === 0 && data) {
+            if (data.indexOf('10.35.239.168:7086') != -1) {
+              let newUrl = data.replace('10.35.239.168:7086', '60.191.94.122:20046');
+              this.urlArr.push(newUrl);
             }
-        }
-    },
-    data() {
-        return {
-            urlArr: [
-                // 'http://cmgw-vpc.lechange.com:8888/LCO/7D100C2PAZ6C590/0/0/20220112T081910/051edef3559a8eca65febb70e504acdb.m3u8',
-            ]
-        };
-    },
-    methods: {
-        getVideo(urlId) {
-            this.$http
-                .post('/sc-community/dahuaDevice/getRealTimeUrl', { channelId: urlId, streamType: '1', type: 'hls' })
-                .then(({ status, data, msg }) => {
-                    if (status === 0 && data) {
-                        if (data.indexOf('10.35.239.168:7086') != -1) {
-                            let newUrl = data.replace('10.35.239.168:7086', '60.191.94.122:20046');
-                            this.urlArr.push(newUrl);
-                        }
-                    }
-                });
-        }
-    },
-    mounted() {}
+          }
+        });
+    }
+  },
+  mounted () { }
 };
 </script>
 <style lang="scss" scoped>

+ 53 - 53
operationSupport/src/views/assetManagement/housPublic.js

@@ -1,54 +1,54 @@
 export const residenceTypeArr = {
-  residence: [
-    {
-      label: '高档住宅',
-      value: 1
-    },
-    {
-      label: '普通住宅',
-      value: 2
-    },
-    {
-      label: '公寓',
-      value: 3
-    },
-    {
-      label: '别墅',
-      value: 4
-    },
-    {
-      label: '复式',
-      value: 5
-    },
-  ],
-  shops: [
-    {
-      label: '办公',
-      value: 6
-    },
-    {
-      label: '酒店',
-      value: 7
-    },
-    {
-      label: '厂房',
-      value: 8
-    },
-    {
-      label: '商场',
-      value: 9
-    },
-    {
-      label: '综合体',
-      value: 10
-    },
-    {
-      label: '仓库',
-      value: 11
-    },
-    {
-      label: '广告位',
-      value: 12
-    }
-  ]
-}
+    residence: [
+        {
+            label: '高档住宅',
+            value: 1
+        },
+        {
+            label: '普通住宅',
+            value: 2
+        },
+        {
+            label: '公寓',
+            value: 3
+        },
+        {
+            label: '别墅',
+            value: 4
+        },
+        {
+            label: '复式',
+            value: 5
+        }
+    ],
+    shops: [
+        {
+            label: '办公',
+            value: 6
+        },
+        {
+            label: '酒店',
+            value: 7
+        },
+        {
+            label: '厂房',
+            value: 8
+        },
+        {
+            label: '商场',
+            value: 9
+        },
+        {
+            label: '综合体',
+            value: 10
+        },
+        {
+            label: '仓库',
+            value: 11
+        },
+        {
+            label: '广告位',
+            value: 12
+        }
+    ]
+};

+ 474 - 278
operationSupport/src/views/assetManagement/housingManagement/saveEdits.vue

@@ -1,302 +1,498 @@
 <template>
-    <div class="main">
-        <div class="blockName">{{ !isAdd ? '编辑' : '新增' }}房屋(<span class="show-required-icon-star"></span>为必填项)</div>
-        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px">
-            <div class="formContent">
-                <div class="formContent-item">
-                    <el-form-item label="社区名称" prop="communityId">
-                        <el-select v-model="ruleForm.communityId" placeholder="请选择社区名称" class="width100">
-                            <el-option
-                                v-for="(item, index) in communityList"
-                                :label="item.communityName"
-                                :value="item.id"
-                                :key="index"
-                            ></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="单元">
-                        <el-select v-model="ruleForm.unitName" placeholder="请选择单元" class="width100">
-                            <el-option
-                                v-for="(item, index) in unitList"
-                                :label="item.unitName"
-                                :value="item.unitName"
-                                :key="index"
-                            ></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="房屋号" prop="roomNumber">
-                        <el-input v-model="ruleForm.roomNumber" placeholder="请输入房屋号"></el-input>
-                    </el-form-item>
-                    <el-form-item label="住宅类型" prop="residenceType">
-                        <el-select v-model="ruleForm.residenceType" placeholder="请选择住宅类型" class="width100">
-                            <el-option
-                                v-for="(item, index) in residenceTypeArr"
-                                :label="item.label"
-                                :value="item.value"
-                                :key="index"
-                            ></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="房屋编号">
-                        <el-input v-model="ruleForm.assetNumber" placeholder="请输入房屋编号"></el-input>
-                    </el-form-item>
-                    <el-form-item label="使用面积">
-                        <el-input v-model="ruleForm.useArea" placeholder="请输入使用面积"></el-input>
-                    </el-form-item>
-                    <el-form-item label="房屋朝向">
-                        <el-select v-model="ruleForm.orientationOfRoom" placeholder="请选择房屋朝向" class="width100">
-                            <el-option label="东" :value="1"></el-option>
-                            <el-option label="南" :value="2"></el-option>
-                            <el-option label="西" :value="3"></el-option>
-                            <el-option label="北" :value="4"></el-option>
-                            <el-option label="东南" :value="5"></el-option>
-                            <el-option label="西南" :value="6"></el-option>
-                            <el-option label="西北" :value="7"></el-option>
-                            <el-option label="东北" :value="8"></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="房屋户型">
-                        <el-input v-model="housingType.roomNumber" placeholder="请输入" style="width: 80px; margin-right: 10px"></el-input
-                        >室
-                        <el-input v-model="housingType.officeNumber" placeholder="请输入" style="width: 80px; margin: 0 10px"></el-input>厅
-                        <el-input v-model="housingType.guardNumber" placeholder="请输入" style="width: 80px; margin: 0 10px"></el-input>卫
-                    </el-form-item>
-                </div>
-                <div class="formContent-item">
-                    <el-form-item label="楼栋" prop="buildingId">
-                        <el-select v-model="ruleForm.buildingId" placeholder="请选择楼栋" class="width100">
-                            <el-option
-                                v-for="(item, index) in buildingList"
-                                :label="item.buildingName"
-                                :value="item.id"
-                                :key="index"
-                            ></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="楼层" prop="floorNumber">
-                        <el-select v-model="ruleForm.floorNumber" placeholder="请选择楼层" class="width100">
-                            <el-option
-                                v-for="(item, index) in floorNumberList"
-                                :label="item.floorNumber"
-                                :value="item.floorNumber"
-                                :key="index"
-                            ></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="房屋类型" prop="buildingType">
-                        <el-select v-model="ruleForm.buildingType" disabled placeholder="请选择房屋类型" class="width100">
-                            <el-option label="住宅" :value="1"></el-option>
-                            <el-option label="商用" :value="2"></el-option>
-                        </el-select>
-                    </el-form-item>
+  <div class="main">
+    <div class="blockName">{{ !isAdd ? '编辑' : '新增' }}房屋(<span class="show-required-icon-star"></span>为必填项)</div>
+    <el-form
+      :model="ruleForm"
+      :rules="rules"
+      ref="ruleForm"
+      label-width="130px"
+    >
+      <div class="formContent">
+        <div class="formContent-item">
+          <el-form-item
+            label="社区名称"
+            prop="communityId"
+          >
+            <el-select
+              v-model="ruleForm.communityId"
+              placeholder="请选择社区名称"
+              class="width100"
+            >
+              <el-option
+                v-for="(item, index) in communityList"
+                :label="item.communityName"
+                :value="item.id"
+                :key="index"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="单元">
+            <el-select
+              v-model="ruleForm.unitName"
+              placeholder="请选择单元"
+              class="width100"
+            >
+              <el-option
+                v-for="(item, index) in unitList"
+                :label="item.unitName"
+                :value="item.unitName"
+                :key="index"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="房屋号"
+            prop="roomNumber"
+          >
+            <el-input
+              v-model="ruleForm.roomNumber"
+              placeholder="请输入房屋号"
+            ></el-input>
+          </el-form-item>
+          <el-form-item
+            label="住宅类型"
+            prop="residenceType"
+          >
+            <el-select
+              v-model="ruleForm.residenceType"
+              placeholder="请选择住宅类型"
+              class="width100"
+            >
+              <el-option
+                v-for="(item, index) in residenceTypeArr"
+                :label="item.label"
+                :value="item.value"
+                :key="index"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="房屋编号">
+            <el-input
+              v-model="ruleForm.assetNumber"
+              placeholder="请输入房屋编号"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="使用面积">
+            <el-input
+              v-model="ruleForm.useArea"
+              placeholder="请输入使用面积"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="房屋朝向">
+            <el-select
+              v-model="ruleForm.orientationOfRoom"
+              placeholder="请选择房屋朝向"
+              class="width100"
+            >
+              <el-option
+                label="东"
+                :value="1"
+              ></el-option>
+              <el-option
+                label="南"
+                :value="2"
+              ></el-option>
+              <el-option
+                label="西"
+                :value="3"
+              ></el-option>
+              <el-option
+                label="北"
+                :value="4"
+              ></el-option>
+              <el-option
+                label="东南"
+                :value="5"
+              ></el-option>
+              <el-option
+                label="西南"
+                :value="6"
+              ></el-option>
+              <el-option
+                label="西北"
+                :value="7"
+              ></el-option>
+              <el-option
+                label="东北"
+                :value="8"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="房屋户型">
+            <el-input
+              v-model="housingType.roomNumber"
+              placeholder="请输入"
+              style="width: 80px; margin-right: 10px"
+            ></el-input>室
+            <el-input
+              v-model="housingType.officeNumber"
+              placeholder="请输入"
+              style="width: 80px; margin: 0 10px"
+            ></el-input>厅
+            <el-input
+              v-model="housingType.guardNumber"
+              placeholder="请输入"
+              style="width: 80px; margin: 0 10px"
+            ></el-input>卫
+          </el-form-item>
+        </div>
+        <div class="formContent-item">
+          <el-form-item
+            label="楼栋"
+            prop="buildingId"
+          >
+            <el-select
+              v-model="ruleForm.buildingId"
+              placeholder="请选择楼栋"
+              class="width100"
+            >
+              <el-option
+                v-for="(item, index) in buildingList"
+                :label="item.buildingName"
+                :value="item.id"
+                :key="index"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="楼层"
+            prop="floorNumber"
+          >
+            <el-select
+              v-model="ruleForm.floorNumber"
+              placeholder="请选择楼层"
+              class="width100"
+            >
+              <el-option
+                v-for="(item, index) in floorNumberList"
+                :label="item.floorNumber"
+                :value="item.floorNumber"
+                :key="index"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="房屋类型"
+            prop="buildingType"
+          >
+            <el-select
+              v-model="ruleForm.buildingType"
+              disabled
+              placeholder="请选择房屋类型"
+              class="width100"
+            >
+              <el-option
+                label="住宅"
+                :value="1"
+              ></el-option>
+              <el-option
+                label="商用"
+                :value="2"
+              ></el-option>
+            </el-select>
+          </el-form-item>
 
-                    <el-form-item label="租售类型" prop="salesType">
-                        <el-select v-model="ruleForm.salesType" placeholder="请选择租售类型" class="width100">
-                            <el-option label="可租可售" :value="1"></el-option>
-                            <el-option label="只租" :value="2"></el-option>
-                            <el-option label="只售" :value="3"></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="租售状态" prop="salesStatus">
-                        <el-select v-model="ruleForm.salesStatus" placeholder="请选择租售状态" class="width100">
-                            <el-option label="未租售" :value="0"></el-option>
-                            <el-option label="已售" :value="1"></el-option>
-                            <el-option label="已租" :value="2"></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="建筑面积">
-                        <el-input v-model="ruleForm.buildingArea" placeholder="请输入建筑面积"></el-input>
-                    </el-form-item>
-                    <el-form-item label="公摊面积">
-                        <el-input v-model="ruleForm.publicArea" placeholder="请输入公摊面积"></el-input>
-                    </el-form-item>
-                    <el-form-item label="装修性质">
-                        <el-select v-model="ruleForm.decorateProperties" placeholder="请选择装修性质" class="width100">
-                            <el-option label="毛胚" :value="1"></el-option>
-                            <el-option label="简单装修" :value="2"></el-option>
-                            <el-option label="中等装修" :value="3"></el-option>
-                            <el-option label="精装修" :value="4"></el-option>
-                            <el-option label="豪华装修" :value="5"></el-option>
-                        </el-select>
-                    </el-form-item>
-                </div>
-            </div>
-            <el-form-item label="备注信息">
-                <el-input type="textarea" :rows="4" placeholder="请输入备注信息" v-model="ruleForm.remarks" maxlength="300" show-word-limit>
-                </el-input>
-            </el-form-item>
-        </el-form>
-        <div style="text-align: right">
-            <el-button @click="cancelSaving">取消</el-button>
-            <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
+          <el-form-item
+            label="租售类型"
+            prop="salesType"
+          >
+            <el-select
+              v-model="ruleForm.salesType"
+              placeholder="请选择租售类型"
+              class="width100"
+            >
+              <el-option
+                label="可租可售"
+                :value="1"
+              ></el-option>
+              <el-option
+                label="只租"
+                :value="2"
+              ></el-option>
+              <el-option
+                label="只售"
+                :value="3"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="租售状态"
+            prop="salesStatus"
+          >
+            <el-select
+              v-model="ruleForm.salesStatus"
+              placeholder="请选择租售状态"
+              class="width100"
+            >
+              <el-option
+                label="未租售"
+                :value="0"
+              ></el-option>
+              <el-option
+                label="已售"
+                :value="1"
+              ></el-option>
+              <el-option
+                label="已租"
+                :value="2"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="建筑面积">
+            <el-input
+              v-model="ruleForm.buildingArea"
+              placeholder="请输入建筑面积"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="公摊面积">
+            <el-input
+              v-model="ruleForm.publicArea"
+              placeholder="请输入公摊面积"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="装修性质">
+            <el-select
+              v-model="ruleForm.decorateProperties"
+              placeholder="请选择装修性质"
+              class="width100"
+            >
+              <el-option
+                label="毛胚"
+                :value="1"
+              ></el-option>
+              <el-option
+                label="简单装修"
+                :value="2"
+              ></el-option>
+              <el-option
+                label="中等装修"
+                :value="3"
+              ></el-option>
+              <el-option
+                label="精装修"
+                :value="4"
+              ></el-option>
+              <el-option
+                label="豪华装修"
+                :value="5"
+              ></el-option>
+            </el-select>
+          </el-form-item>
         </div>
+      </div>
+      <el-form-item label="备注信息">
+        <el-input
+          type="textarea"
+          :rows="4"
+          placeholder="请输入备注信息"
+          v-model="ruleForm.remarks"
+          maxlength="300"
+          show-word-limit
+        >
+        </el-input>
+      </el-form-item>
+    </el-form>
+    <div style="text-align: right">
+      <el-button @click="cancelSaving">取消</el-button>
+      <el-button
+        type="primary"
+        @click="submitForm('ruleForm')"
+      >保存</el-button>
     </div>
+  </div>
 </template>
 <script>
 import { residenceTypeArr } from '../housPublic';
 export default {
-    props: {
-        params: {
-            type: Object
-        },
-        isAdd: {
-            type: Boolean,
-            default: true
+  props: {
+    params: {
+      type: Object
+    },
+    isAdd: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data () {
+    return {
+      buildingList: [], //楼栋下拉选择列表
+      unitList: [], //单元下拉选择列表
+      addEditState: '',
+      housingType: {
+        //房屋户型,roomNumber为室,officeNumber为厅,guardNumber为卫
+        roomNumber: '',
+        officeNumber: '',
+        guardNumber: ''
+      },
+      ruleForm: {
+        communityId: '', //社区id
+        buildingId: '', //楼栋id
+        unitName: '', //单元
+        floorNumber: '', //单元楼层
+        roomNumber: '', //房屋号
+        assetNumber: '',
+        buildingType: 1, //房屋类型
+        useArea: '', //使用面积
+        buildingArea: '', //建筑面积
+        orientationOfRoom: '', //房屋朝向
+        publicArea: '', //公摊面积
+        housingType: '', //房屋户型
+        decorateProperties: '', //装修性质
+        salesStatus: '', //租售状态
+        residenceType: '', //商业住户类型
+        salesType: '', //租售类型
+        remarks: '' //备注
+      },
+      rules: {
+        communityId: [this.$valid.selectRequired('社区')],
+        roomNumber: [this.$valid.inputRequired('房屋号')],
+        buildingId: [this.$valid.selectRequired('楼栋')],
+        floorNumber: [this.$valid.selectRequired('楼层')],
+        buildingType: [this.$valid.selectRequired('房屋类型')],
+        residenceType: [this.$valid.selectRequired('住宅类型')],
+        salesStatus: [this.$valid.selectRequired('租售状态')],
+        salesType: [this.$valid.selectRequired('租售类型')]
+      },
+      //   residenceTypeArr: residenceTypeArr.residence
+      residenceTypeArr: [],
+    };
+  },
+  components: {},
+
+  computed: {
+    communityList () {
+      return this.$store.getters['getCommunityArray'];
+    }
+  },
+  watch: {
+    'ruleForm.communityId' (newValue, oldValue) {
+      if (newValue !== oldValue) {
+        this.buildingNameList();
+      }
+    },
+    'ruleForm.buildingId' (newValue, oldValue) {
+      if (newValue !== oldValue) {
+        this.unitNameList();
+      }
+    },
+    'ruleForm.unitName' (newValue, oldValue) {
+      if (newValue !== oldValue) {
+        this.unitChoice(newValue);
+      }
+    },
+    unitList (val) {
+      if (val.length !== 0) {
+        this.unitChoice(this.ruleForm.unitName);
+      }
+    }
+  },
+  methods: {
+    // SC_RESIDENCE_TYPE
+    // 住宅类型 
+    async residence () {
+      var datavehicleColors = {};
+
+      datavehicleColors = await this.$http.get('/sc-user-center/dict/selectListByPCodes', { parentDictCodes: 'SC_RESIDENCE_TYPE' });
+
+      for (var k in datavehicleColors) {
+
+        this.residenceTypeArr.push({
+          label: datavehicleColors[k],
+          value: Number(k)
+        })
+
+      }
+
+
+    },
+
+
+
+
+    submitForm (formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.ruleForm.housingType =
+            this.housingType.roomNumber + ':' + this.housingType.officeNumber + ':' + this.housingType.guardNumber;
+          let url = '/sc-community/assets/house/add';
+          if (!this.isAdd) {
+            url = '/sc-community/assets/house/update';
+          }
+          this.$http
+            .post(url, this.ruleForm)
+            .then(({ status, msg }) => {
+              if (status == 0) {
+                this.$message.success(msg);
+                this.cancelSaving();
+              } else {
+                this.$message.error(msg);
+              }
+            })
+            .catch(() => { });
         }
+      });
+    },
+    cancelSaving () {
+      this.$emit('clerOwnerStatus');
     },
-    data() {
-        return {
-            buildingList: [], //楼栋下拉选择列表
-            unitList: [], //单元下拉选择列表
-            addEditState: '',
-            housingType: {
-                //房屋户型,roomNumber为室,officeNumber为厅,guardNumber为卫
-                roomNumber: '',
-                officeNumber: '',
-                guardNumber: ''
-            },
-            ruleForm: {
-                communityId: '', //社区id
-                buildingId: '', //楼栋id
-                unitName: '', //单元
-                floorNumber: '', //单元楼层
-                roomNumber: '', //房屋号
-                assetNumber: '',
-                buildingType: 1, //房屋类型
-                useArea: '', //使用面积
-                buildingArea: '', //建筑面积
-                orientationOfRoom: '', //房屋朝向
-                publicArea: '', //公摊面积
-                housingType: '', //房屋户型
-                decorateProperties: '', //装修性质
-                salesStatus: '', //租售状态
-                residenceType: '', //商业住户类型
-                salesType: '', //租售类型
-                remarks: '' //备注
-            },
-            rules: {
-                communityId: [this.$valid.selectRequired('社区')],
-                roomNumber: [this.$valid.inputRequired('房屋号')],
-                buildingId: [this.$valid.selectRequired('楼栋')],
-                floorNumber: [this.$valid.selectRequired('楼层')],
-                buildingType: [this.$valid.selectRequired('房屋类型')],
-                residenceType: [this.$valid.selectRequired('住宅类型')],
-                salesStatus: [this.$valid.selectRequired('租售状态')],
-                salesType: [this.$valid.selectRequired('租售类型')]
-            },
-            residenceTypeArr: residenceTypeArr.residence
-        };
+    resetForm (formName) {
+      this.$refs[formName].resetFields();
     },
-    components: {},
 
-    computed: {
-        communityList() {
-            return this.$store.getters['getCommunityArray'];
+    //查询楼栋下拉列表
+    buildingNameList () {
+      this.buildingList = [];
+      this.$http
+        .post('/sc-community/assets/building/list/building', { communityId: this.ruleForm.communityId })
+        .then(({ data, status, msg }) => {
+          if (0 === status) {
+            this.buildingList = data;
+          }
+        });
+    },
+    unitNameList () {
+      this.unitList = [];
+      this.$http.get('/sc-community/assets/building/house/find', { id: this.ruleForm.buildingId }).then((res) => {
+        if (res.status == 0) {
+          if (res.data.buildingUnitList.length != 0) {
+            this.unitList = res.data.buildingUnitList;
+          }
         }
+      });
     },
-    watch: {
-        'ruleForm.communityId'(newValue, oldValue) {
-            if (newValue !== oldValue) {
-                this.buildingNameList();
-            }
-        },
-        'ruleForm.buildingId'(newValue, oldValue) {
-            if (newValue !== oldValue) {
-                this.unitNameList();
-            }
-        },
-        'ruleForm.unitName'(newValue, oldValue) {
-            if (newValue !== oldValue) {
-                this.unitChoice(newValue);
-            }
-        },
-        unitList(val) {
-            if (val.length !== 0) {
-                this.unitChoice(this.ruleForm.unitName);
-            }
+
+    unitChoice (e) {
+      this.floorNumberList = [];
+      this.unitList.map((item) => {
+        if (item.unitName == e) {
+          this.floorNumberList = item.unitFloorList;
         }
+      });
     },
-    methods: {
-        submitForm(formName) {
-            this.$refs[formName].validate((valid) => {
-                if (valid) {
-                    this.ruleForm.housingType =
-                        this.housingType.roomNumber + ':' + this.housingType.officeNumber + ':' + this.housingType.guardNumber;
-                    let url = '/sc-community/assets/house/add';
-                    if (!this.isAdd) {
-                        url = '/sc-community/assets/house/update';
-                    }
-                    this.$http
-                        .post(url, this.ruleForm)
-                        .then(({ status, msg }) => {
-                            if (status == 0) {
-                                this.$message.success(msg);
-                                this.cancelSaving();
-                            } else {
-                                this.$message.error(msg);
-                            }
-                        })
-                        .catch(() => {});
-                }
-            });
-        },
-        cancelSaving() {
-            this.$emit('clerOwnerStatus');
-        },
-        resetForm(formName) {
-            this.$refs[formName].resetFields();
-        },
 
-        //查询楼栋下拉列表
-        buildingNameList() {
-            this.buildingList = [];
-            this.$http
-                .post('/sc-community/assets/building/list/building', { communityId: this.ruleForm.communityId })
-                .then(({ data, status, msg }) => {
-                    if (0 === status) {
-                        this.buildingList = data;
-                    }
-                });
-        },
-        unitNameList() {
-            this.unitList = [];
-            this.$http.get('/sc-community/assets/building/house/find', { id: this.ruleForm.buildingId }).then((res) => {
-                if (res.status == 0) {
-                    if (res.data.buildingUnitList.length != 0) {
-                        this.unitList = res.data.buildingUnitList;
-                    }
-                }
-            });
-        },
+    getDetails (id) {
+      this.$http.get('/sc-community/assets/house/find/' + id, {}).then((res) => {
+        if (res.status == 0) {
+          this.ruleForm = res.data;
+          if (!!this.ruleForm.housingType) {
+            var housingTypes = this.ruleForm.housingType.split(':');
+            this.housingType.roomNumber = housingTypes[0];
+            this.housingType.officeNumber = housingTypes[1];
+            this.housingType.guardNumber = housingTypes[2];
+          }
 
-        unitChoice(e) {
-            this.floorNumberList = [];
-            this.unitList.map((item) => {
-                if (item.unitName == e) {
-                    this.floorNumberList = item.unitFloorList;
-                }
-            });
-        },
 
-        getDetails(id) {
-            this.$http.get('/sc-community/assets/house/find/' + id, {}).then((res) => {
-                if (res.status == 0) {
-                    this.ruleForm = res.data;
-                    if (!!this.ruleForm.housingType) {
-                        var housingTypes = this.ruleForm.housingType.split(':');
-                        this.housingType.roomNumber = housingTypes[0];
-                        this.housingType.officeNumber = housingTypes[1];
-                        this.housingType.guardNumber = housingTypes[2];
-                    }
-                }
-            });
-        }
-    },
-    created() {
-        if (!!this.params.id) {
-            this.getDetails(this.params.id);
         }
+      });
+    }
+  },
+  created () {
+    if (!!this.params.id) {
+      this.getDetails(this.params.id);
     }
+    this.residence();
+
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 364 - 242
operationSupport/src/views/assetManagement/shopManagement/saveEdits.vue

@@ -1,110 +1,206 @@
 <template>
-    <div class="main">
-        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px">
-            <div class="formContent">
-                <div class="formContent-item">
-                    <el-form-item label="社区名称" prop="communityId">
-                        <el-select v-model="ruleForm.communityId" placeholder="请选择社区名称">
-                            <el-option
-                                v-for="(item, index) in communityList"
-                                :label="item.communityName"
-                                :value="item.id"
-                                :key="index"
-                            ></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="单元">
-                        <el-select v-model="ruleForm.unitName" placeholder="请选择单元">
-                            <el-option
-                                v-for="(item, index) in unitList"
-                                :label="item.unitName"
-                                :value="item.unitName"
-                                :key="index"
-                            ></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="房屋号" prop="roomNumber">
-                        <el-input v-model="ruleForm.roomNumber" placeholder="请输入房屋号"></el-input>
-                    </el-form-item>
-                    <el-form-item label="商业类型" prop="residenceType">
-                        <el-select v-model="ruleForm.residenceType" placeholder="请选择住宅类型" class="width100">
-                            <el-option
-                                v-for="(item, index) in residenceTypeArr"
-                                :label="item.label"
-                                :value="item.value"
-                                :key="index"
-                            ></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="房屋编号">
-                        <el-input v-model="ruleForm.assetNumber" placeholder="请输入房屋编号"></el-input>
-                    </el-form-item>
-                    <el-form-item label="使用面积">
-                        <el-input v-model="ruleForm.useArea" placeholder="请输入使用面积"></el-input>
-                    </el-form-item>
-                    <el-form-item label="公摊面积">
-                        <el-input v-model="ruleForm.publicArea" placeholder="请输入公摊面积"></el-input>
-                    </el-form-item>
-                </div>
-                <div class="formContent-item">
-                    <el-form-item label="楼栋" prop="buildingId">
-                        <el-select v-model="ruleForm.buildingId" placeholder="请选择楼栋">
-                            <el-option
-                                v-for="(item, index) in buildingList"
-                                :label="item.buildingName"
-                                :value="item.id"
-                                :key="index"
-                            ></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="楼层" prop="floorNumber">
-                        <el-select v-model="ruleForm.floorNumber" placeholder="请选择楼层">
-                            <el-option
-                                v-for="(item, index) in floorNumberList"
-                                :label="item.floorNumber"
-                                :value="item.floorNumber"
-                                :key="index"
-                            ></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="房屋类型" prop="buildingType">
-                        <el-select v-model="ruleForm.buildingType" disabled placeholder="请选择房屋类型">
-                            <el-option label="住宅" :value="1"></el-option>
-                            <el-option label="商用" :value="2"></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="租售类型" prop="salesType">
-                        <el-select v-model="ruleForm.salesType" placeholder="请选择租售类型" class="width100">
-                            <el-option label="可租可售" :value="1"></el-option>
-                            <el-option label="只租" :value="2"></el-option>
-                            <el-option label="只售" :value="3"></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="租售状态" prop="salesStatus">
-                        <el-select v-model="ruleForm.salesStatus" placeholder="请选择租售状态" class="width100">
-                            <el-option label="未租售" :value="0"></el-option>
-                            <el-option label="已售" :value="1"></el-option>
-                            <el-option label="已租" :value="2"></el-option>
-                        </el-select>
-                    </el-form-item>
-                    <el-form-item label="建筑面积">
-                        <el-input v-model="ruleForm.buildingArea" placeholder="请输入建筑面积"></el-input>
-                    </el-form-item>
-                    <el-form-item label="备注信息">
-                        <el-input
-                            type="textarea"
-                            resize="none"
-                            :rows="3"
-                            v-model="ruleForm.remarks"
-                            maxlength="300"
-                            show-word-limit
-                            placeholder="请输入备注信息"
-                        >
-                        </el-input>
-                    </el-form-item>
-                </div>
-            </div>
-            <!-- <el-row>
+  <div class="main">
+    <el-form
+      :model="ruleForm"
+      :rules="rules"
+      ref="ruleForm"
+      label-width="130px"
+    >
+      <div class="formContent">
+        <div class="formContent-item">
+          <el-form-item
+            label="社区名称"
+            prop="communityId"
+          >
+            <el-select
+              v-model="ruleForm.communityId"
+              placeholder="请选择社区名称"
+            >
+              <el-option
+                v-for="(item, index) in communityList"
+                :label="item.communityName"
+                :value="item.id"
+                :key="index"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="单元">
+            <el-select
+              v-model="ruleForm.unitName"
+              placeholder="请选择单元"
+            >
+              <el-option
+                v-for="(item, index) in unitList"
+                :label="item.unitName"
+                :value="item.unitName"
+                :key="index"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="房屋号"
+            prop="roomNumber"
+          >
+            <el-input
+              v-model="ruleForm.roomNumber"
+              placeholder="请输入房屋号"
+            ></el-input>
+          </el-form-item>
+          <el-form-item
+            label="商业类型"
+            prop="residenceType"
+          >
+            <el-select
+              v-model="ruleForm.residenceType"
+              placeholder="请选择住宅类型"
+              class="width100"
+            >
+              <el-option
+                v-for="(item, index) in residenceTypeArr"
+                :label="item.label"
+                :value="item.value"
+                :key="index"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="房屋编号">
+            <el-input
+              v-model="ruleForm.assetNumber"
+              placeholder="请输入房屋编号"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="使用面积">
+            <el-input
+              v-model="ruleForm.useArea"
+              placeholder="请输入使用面积"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="公摊面积">
+            <el-input
+              v-model="ruleForm.publicArea"
+              placeholder="请输入公摊面积"
+            ></el-input>
+          </el-form-item>
+        </div>
+        <div class="formContent-item">
+          <el-form-item
+            label="楼栋"
+            prop="buildingId"
+          >
+            <el-select
+              v-model="ruleForm.buildingId"
+              placeholder="请选择楼栋"
+            >
+              <el-option
+                v-for="(item, index) in buildingList"
+                :label="item.buildingName"
+                :value="item.id"
+                :key="index"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="楼层"
+            prop="floorNumber"
+          >
+            <el-select
+              v-model="ruleForm.floorNumber"
+              placeholder="请选择楼层"
+            >
+              <el-option
+                v-for="(item, index) in floorNumberList"
+                :label="item.floorNumber"
+                :value="item.floorNumber"
+                :key="index"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="房屋类型"
+            prop="buildingType"
+          >
+            <el-select
+              v-model="ruleForm.buildingType"
+              disabled
+              placeholder="请选择房屋类型"
+            >
+              <el-option
+                label="住宅"
+                :value="1"
+              ></el-option>
+              <el-option
+                label="商用"
+                :value="2"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="租售类型"
+            prop="salesType"
+          >
+            <el-select
+              v-model="ruleForm.salesType"
+              placeholder="请选择租售类型"
+              class="width100"
+            >
+              <el-option
+                label="可租可售"
+                :value="1"
+              ></el-option>
+              <el-option
+                label="只租"
+                :value="2"
+              ></el-option>
+              <el-option
+                label="只售"
+                :value="3"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            label="租售状态"
+            prop="salesStatus"
+          >
+            <el-select
+              v-model="ruleForm.salesStatus"
+              placeholder="请选择租售状态"
+              class="width100"
+            >
+              <el-option
+                label="未租售"
+                :value="0"
+              ></el-option>
+              <el-option
+                label="已售"
+                :value="1"
+              ></el-option>
+              <el-option
+                label="已租"
+                :value="2"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="建筑面积">
+            <el-input
+              v-model="ruleForm.buildingArea"
+              placeholder="请输入建筑面积"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="备注信息">
+            <el-input
+              type="textarea"
+              resize="none"
+              :rows="3"
+              v-model="ruleForm.remarks"
+              maxlength="300"
+              show-word-limit
+              placeholder="请输入备注信息"
+            >
+            </el-input>
+          </el-form-item>
+        </div>
+      </div>
+      <!-- <el-row>
                 <el-col :span="12">
                     <el-form-item label="备注信息">
                         <el-input
@@ -120,160 +216,186 @@
                     </el-form-item>
                 </el-col>
             </el-row> -->
-        </el-form>
-        <!-- <div style="text-align: right">
+    </el-form>
+    <!-- <div style="text-align: right">
             <el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>
             <el-button @click="cancelSaving">取消</el-button>
         </div> -->
-    </div>
+  </div>
 </template>
 <script>
 import { residenceTypeArr } from '../housPublic';
 export default {
-    props: ['params'],
-    data() {
-        return {
-            buildingList: [], //楼栋下拉选择列表
-            unitList: [], //单元下拉选择列表
-            addEditState: '',
-            ruleForm: {
-                communityId: '', //社区id
-                buildingId: '', //楼栋id
-                unitName: '', //单元
-                floorNumber: '', //单元楼层
-                roomNumber: '', //房屋号
-                assetNumber: '', //编号
-                buildingType: 2, //房屋类型
-                useArea: '', //使用面积
-                buildingArea: '', //建筑面积
-                publicArea: '', //公摊面积
-                salesStatus: '', //租售状态
-                residenceType: '', //商业住户类型
-                salesType: '', //租售类型
-                remarks: '' //备注
-            },
-            rules: {
-                communityId: [this.$valid.selectRequired('社区')],
-                roomNumber: [this.$valid.inputRequired('房屋号')],
-                buildingId: [this.$valid.selectRequired('楼栋')],
-                floorNumber: [this.$valid.selectRequired('楼层')],
-                buildingType: [this.$valid.selectRequired('房屋类型')],
-                residenceType: [this.$valid.selectRequired('住宅类型')],
-                salesStatus: [this.$valid.selectRequired('租售状态')],
-                salesType: [this.$valid.selectRequired('租售类型')]
-            },
-            residenceTypeArr: residenceTypeArr.shops
-        };
+  props: ['params'],
+  data () {
+    return {
+      buildingList: [], //楼栋下拉选择列表
+      unitList: [], //单元下拉选择列表
+      addEditState: '',
+      ruleForm: {
+        communityId: '', //社区id
+        buildingId: '', //楼栋id
+        unitName: '', //单元
+        floorNumber: '', //单元楼层
+        roomNumber: '', //房屋号
+        assetNumber: '', //编号
+        buildingType: 2, //房屋类型
+        useArea: '', //使用面积
+        buildingArea: '', //建筑面积
+        publicArea: '', //公摊面积
+        salesStatus: '', //租售状态
+        residenceType: '', //商业住户类型
+        salesType: '', //租售类型
+        remarks: '' //备注
+      },
+      rules: {
+        communityId: [this.$valid.selectRequired('社区')],
+        roomNumber: [this.$valid.inputRequired('房屋号')],
+        buildingId: [this.$valid.selectRequired('楼栋')],
+        floorNumber: [this.$valid.selectRequired('楼层')],
+        buildingType: [this.$valid.selectRequired('房屋类型')],
+        residenceType: [this.$valid.selectRequired('住宅类型')],
+        salesStatus: [this.$valid.selectRequired('租售状态')],
+        salesType: [this.$valid.selectRequired('租售类型')]
+      },
+      // residenceTypeArr: residenceTypeArr.shops
+      residenceTypeArr: []
+    };
+  },
+  components: {},
+
+  computed: {
+    communityList () {
+      return this.$store.getters['getCommunityArray'];
+    }
+  },
+  watch: {
+    'ruleForm.communityId' (newValue, oldValue) {
+      if (newValue !== oldValue) {
+        this.buildingNameList();
+        // this.ruleForm.buildingId = '';
+        // this.ruleForm.unitName = '';
+        // this.ruleForm.floorNumber = '';
+      }
     },
-    components: {},
+    'ruleForm.buildingId' (newValue, oldValue) {
+      if (newValue !== oldValue) {
+        this.unitNameList();
+        // this.ruleForm.unitName = '';
+        // this.ruleForm.floorNumber = '';
+      }
+    },
+    'ruleForm.unitName' (newValue, oldValue) {
+      if (newValue !== oldValue) {
+        this.unitChoice(newValue);
+        // this.ruleForm.floorNumber = '';
+      }
+    },
+    unitList (val) {
+      if (val.length !== 0) {
+        this.unitChoice(this.ruleForm.unitName);
+      }
+    }
+  },
+  methods: {
+
+    // SC_RESIDENCE_TYPE
+    // 住宅类型 
+    async residence () {
+      var datavehicleColors = {};
+
+      datavehicleColors = await this.$http.get('/sc-user-center/dict/selectListByPCodes', { parentDictCodes: 'SC_BUSINESS_TYPE' });
+
+      for (var k in datavehicleColors) {
+
+        this.residenceTypeArr.push({
+          label: datavehicleColors[k],
+          value: Number(k)
+        })
+        console.log('7777', this.residenceTypeArr)
+
+      }
+
 
-    computed: {
-        communityList() {
-            return this.$store.getters['getCommunityArray'];
-        }
     },
-    watch: {
-        'ruleForm.communityId'(newValue, oldValue) {
-            if (newValue !== oldValue) {
-                this.buildingNameList();
-                // this.ruleForm.buildingId = '';
-                // this.ruleForm.unitName = '';
-                // this.ruleForm.floorNumber = '';
-            }
-        },
-        'ruleForm.buildingId'(newValue, oldValue) {
-            if (newValue !== oldValue) {
-                this.unitNameList();
-                // this.ruleForm.unitName = '';
-                // this.ruleForm.floorNumber = '';
-            }
-        },
-        'ruleForm.unitName'(newValue, oldValue) {
-            if (newValue !== oldValue) {
-                this.unitChoice(newValue);
-                // this.ruleForm.floorNumber = '';
-            }
-        },
-        unitList(val) {
-            if (val.length !== 0) {
-                this.unitChoice(this.ruleForm.unitName);
-            }
+
+
+
+
+    submit () {
+      this.$refs['ruleForm'].validate((valid) => {
+        if (valid) {
+          let url = '/sc-community/assets/house/add';
+          if (this.params.todo == 'edit') {
+            url = '/sc-community/assets/house/update';
+          }
+          this.$http
+            .post(url, this.ruleForm)
+            .then(({ status, msg }) => {
+              if (status == 0) {
+                this.$message.success(msg);
+                this.params.callback();
+                this.$emit('close');
+              } else {
+                this.$message.error(msg);
+              }
+            })
+            .catch(() => { });
         }
+      });
     },
-    methods: {
-        submit() {
-            this.$refs['ruleForm'].validate((valid) => {
-                if (valid) {
-                    let url = '/sc-community/assets/house/add';
-                    if (this.params.todo == 'edit') {
-                        url = '/sc-community/assets/house/update';
-                    }
-                    this.$http
-                        .post(url, this.ruleForm)
-                        .then(({ status, msg }) => {
-                            if (status == 0) {
-                                this.$message.success(msg);
-                                this.params.callback();
-                                this.$emit('close');
-                            } else {
-                                this.$message.error(msg);
-                            }
-                        })
-                        .catch(() => {});
-                }
-            });
-        },
-        // cancelSaving() {
-        //     this.$emit('clerOwnerStatus');
-        // },
-        // resetForm(formName) {
-        //     this.$refs[formName].resetFields();
-        // },
-
-        //查询楼栋下拉列表
-        buildingNameList() {
-            this.buildingList = [];
-            this.$http
-                .post('/sc-community/assets/building/list/building', { communityId: this.ruleForm.communityId })
-                .then(({ data, status, msg }) => {
-                    if (0 === status) {
-                        this.buildingList = data;
-                    }
-                });
-        },
-        unitNameList() {
-            this.unitList = [];
-            this.$http.get('/sc-community/assets/building/house/find', { id: this.ruleForm.buildingId }).then((res) => {
-                if (res.status == 0) {
-                    if (res.data.buildingUnitList.length != 0) {
-                        this.unitList = res.data.buildingUnitList;
-                    }
-                }
-            });
-        },
+    // cancelSaving() {
+    //     this.$emit('clerOwnerStatus');
+    // },
+    // resetForm(formName) {
+    //     this.$refs[formName].resetFields();
+    // },
 
-        unitChoice(e) {
-            this.floorNumberList = [];
-            this.unitList.map((item) => {
-                if (item.unitName == e) {
-                    this.floorNumberList = item.unitFloorList;
-                }
-            });
-        },
+    //查询楼栋下拉列表
+    buildingNameList () {
+      this.buildingList = [];
+      this.$http
+        .post('/sc-community/assets/building/list/building', { communityId: this.ruleForm.communityId })
+        .then(({ data, status, msg }) => {
+          if (0 === status) {
+            this.buildingList = data;
+          }
+        });
+    },
+    unitNameList () {
+      this.unitList = [];
+      this.$http.get('/sc-community/assets/building/house/find', { id: this.ruleForm.buildingId }).then((res) => {
+        if (res.status == 0) {
+          if (res.data.buildingUnitList.length != 0) {
+            this.unitList = res.data.buildingUnitList;
+          }
+        }
+      });
+    },
 
-        getDetails(id) {
-            this.$http.get('/sc-community/assets/house/find/' + id, {}).then((res) => {
-                if (res.status == 0) {
-                    this.ruleForm = res.data;
-                }
-            });
+    unitChoice (e) {
+      this.floorNumberList = [];
+      this.unitList.map((item) => {
+        if (item.unitName == e) {
+          this.floorNumberList = item.unitFloorList;
         }
+      });
     },
-    created() {
-        if (!!this.params.data.id) {
-            this.getDetails(this.params.data.id);
+
+    getDetails (id) {
+      this.$http.get('/sc-community/assets/house/find/' + id, {}).then((res) => {
+        if (res.status == 0) {
+          this.ruleForm = res.data;
         }
+      });
+    }
+  },
+  created () {
+    if (!!this.params.data.id) {
+      this.getDetails(this.params.data.id);
     }
+    this.residence();
+  }
 };
 </script>
 <style lang="scss" scoped>