Browse Source

temp save

liujq 4 years ago
parent
commit
3f72001a01

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-0f29154e.6e8a3b90.css


+ 1 - 0
dist/static/css/chunk-30c47d5d.37bc9771.css

@@ -0,0 +1 @@
+.lib-edit[data-v-4b465e6e]{padding-top:50px;padding-left:20px;width:600px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.lib-edit.t2[data-v-4b465e6e],.lib-edit[data-v-4b465e6e] .el-form-item__error{padding-top:0}.lib-edit.t2[data-v-4b465e6e] .el-form-item{margin-bottom:10px}.lib-edit.t2[data-v-4b465e6e] .el-form-item__error{padding-top:0}.lib-edit[data-v-4b465e6e] .el-form-item{width:100%}.lib-edit[data-v-4b465e6e] .el-form-item.c-2{width:50%}.lib-edit[data-v-4b465e6e] .el-form-item.c-3{width:33.33%}.lib-edit[data-v-4b465e6e] .el-form-item.c-3s{width:66.66%}.lib-edit[data-v-4b465e6e] .el-form-item.is-error .el-input-group--append{border-color:#f56c6c}.lib-edit[data-v-4b465e6e] .el-input-group--append{border:1px solid #dcdcdc;position:relative}.lib-edit[data-v-4b465e6e] .el-input-group--append .el-input-group__append{min-width:40px;text-align:right;padding-right:5px}.lib-edit[data-v-4b465e6e] .el-input-group--append .el-input__inner{border:none;padding-right:10px}.lib-edit[data-v-4b465e6e] .el-input-group--append .el-select{margin:0;position:absolute;right:0;top:0}.lib-edit[data-v-4b465e6e] .el-input-group--append .el-select .el-input__inner{text-align:right;color:#333}.lib-edit[data-v-4b465e6e] .el-input-group--prepend{border:1px solid #dcdcdc;position:relative}.lib-edit[data-v-4b465e6e] .el-input-group--prepend .el-input-group__prepend{text-align:left;padding-right:5px;background-color:#fff;border:0;padding:0 8px}.lib-edit[data-v-4b465e6e] .el-input-group--prepend .el-input__inner{border:none;padding-right:10px;padding-left:0}.lib-edit[data-v-4b465e6e] .el-input-group--prepend .el-select{margin:0;position:absolute;right:0;top:0}.lib-edit[data-v-4b465e6e] .el-input-group--prepend .el-select .el-input__inner{text-align:left;color:#333}.lib-edit[data-v-4b465e6e]{padding-top:0}.lib-edit[data-v-4b465e6e] .el-form-item{margin-bottom:10px}.lib-edit[data-v-4b465e6e] .el-date-editor.el-input{width:100%}

+ 0 - 1
dist/static/css/chunk-483f2591.0aa8864d.css

@@ -1 +0,0 @@
-.lib-edit[data-v-04576b88]{padding-top:50px;padding-left:20px;width:600px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.lib-edit.t2[data-v-04576b88],.lib-edit[data-v-04576b88] .el-form-item__error{padding-top:0}.lib-edit.t2[data-v-04576b88] .el-form-item{margin-bottom:10px}.lib-edit.t2[data-v-04576b88] .el-form-item__error{padding-top:0}.lib-edit[data-v-04576b88] .el-form-item{width:100%}.lib-edit[data-v-04576b88] .el-form-item.c-2{width:50%}.lib-edit[data-v-04576b88] .el-form-item.c-3{width:33.33%}.lib-edit[data-v-04576b88] .el-form-item.c-3s{width:66.66%}.lib-edit[data-v-04576b88] .el-form-item.is-error .el-input-group--append{border-color:#f56c6c}.lib-edit[data-v-04576b88] .el-input-group--append{border:1px solid #dcdcdc;position:relative}.lib-edit[data-v-04576b88] .el-input-group--append .el-input-group__append{min-width:40px;text-align:right;padding-right:5px}.lib-edit[data-v-04576b88] .el-input-group--append .el-input__inner{border:none;padding-right:10px}.lib-edit[data-v-04576b88] .el-input-group--append .el-select{margin:0;position:absolute;right:0;top:0}.lib-edit[data-v-04576b88] .el-input-group--append .el-select .el-input__inner{text-align:right;color:#333}.lib-edit[data-v-04576b88] .el-input-group--prepend{border:1px solid #dcdcdc;position:relative}.lib-edit[data-v-04576b88] .el-input-group--prepend .el-input-group__prepend{text-align:left;padding-right:5px;background-color:#fff;border:0;padding:0 8px}.lib-edit[data-v-04576b88] .el-input-group--prepend .el-input__inner{border:none;padding-right:10px;padding-left:0}.lib-edit[data-v-04576b88] .el-input-group--prepend .el-select{margin:0;position:absolute;right:0;top:0}.lib-edit[data-v-04576b88] .el-input-group--prepend .el-select .el-input__inner{text-align:left;color:#333}.lib-edit[data-v-04576b88]{padding-top:0}.lib-edit[data-v-04576b88] .el-form-item{margin-bottom:10px}.lib-edit[data-v-04576b88] .el-date-editor.el-input{width:100%}

+ 0 - 0
dist/static/css/chunk-5dd07917.8a4f4c4d.css → dist/static/css/chunk-ee371872.8a4f4c4d.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-ff39d806.f3377827.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.9c066b38.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.b1c0c6d0.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-0f29154e.db045f72.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-30c47d5d.c307387d.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-483f2591.a17b3169.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-5dd07917.8b4ed060.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-ee371872.d85b647f.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-ff39d806.5b7ead6c.js


+ 3 - 0
src/api/house.js

@@ -19,6 +19,9 @@ export default {
   admestatedel: params => { // 楼盘删除
   admestatedel: params => { // 楼盘删除
     return getRequestNoSort('/adm/estate/del', params, 'loading')
     return getRequestNoSort('/adm/estate/del', params, 'loading')
   },
   },
+  admestatemoduleid: params => { // 资讯列表
+    return getRequestNoSort('/adm/estate/module/id', params, 'loading')
+  },
   admestatephotolist: params => { // 楼盘相册接口
   admestatephotolist: params => { // 楼盘相册接口
     return getRequestNoSort('/adm/estate/photo/list', params, 'loading')
     return getRequestNoSort('/adm/estate/photo/list', params, 'loading')
   },
   },

+ 2 - 2
src/views/house/components/popup/IndexEdit.vue

@@ -450,12 +450,12 @@ export default {
     }
     }
     .ri-img-big {
     .ri-img-big {
       position: absolute;
       position: absolute;
-      top: 0;
+      top: 80px;
       left: 0;
       left: 0;
       width: 400px;
       width: 400px;
       height: auto;
       height: auto;
       display: none;
       display: none;
-      box-shadow: 10px 10px 10px #ccc;
+      box-shadow: 0 0 20px #ccc;
       z-index: 99;
       z-index: 99;
     }
     }
     .el-icon-plus {
     .el-icon-plus {

+ 11 - 11
src/views/house/components/popup/ThemeEdit.vue

@@ -40,27 +40,27 @@ export default {
   watch: {
   watch: {
     isShow: function(val) {
     isShow: function(val) {
       if (val) {
       if (val) {
-        if (val) {
-          if (this.curObj.id) {
-            this.$api.house.admestatemoduledetail({id: this.curObj.id}).then(res => {
-              let curData = res || {}
-              this.cObj = curData || {}
-              this.getDef()
-            })
-          } else {
-            this.cObj = this.curObj
+        if (this.curObj.id) {
+          this.$api.house.admestatemoduledetail({id: this.curObj.id}).then(res => {
+            let curData = res || {}
+            this.cObj = curData || {}
             this.getDef()
             this.getDef()
-          }
+          })
+        } else {
+          this.cObj = this.curObj
+          this.getDef()
         }
         }
       }
       }
     },
     },
   },
   },
   methods: {
   methods: {
     getDef() {
     getDef() {
+      let disabled = false
+      if (this.curObj.id) disabled = true
       const params = { ...this.cObj }
       const params = { ...this.cObj }
       params.module_type = this.parentData.curNavVal || ''
       params.module_type = this.parentData.curNavVal || ''
       this.formData = [
       this.formData = [
-        { label: '所属模块', key: 'module_type', rules: 1, type: 'select', options: this.$dictData.module_type },
+        { label: '所属模块', key: 'module_type', disabled, rules: 1, type: 'select', options: this.$dictData.module_type },
         { label: '所属楼盘', key: 'estate_id', rules: 1, type: 'selectRemote', changeHandle: this.deviceChange,
         { label: '所属楼盘', key: 'estate_id', rules: 1, type: 'selectRemote', changeHandle: this.deviceChange,
           remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
           remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },
           remoteOptions: [{ keyRO: params.estate_name, valRO: params.estate_id }]
           remoteOptions: [{ keyRO: params.estate_name, valRO: params.estate_id }]

+ 178 - 0
src/views/house/components/popup/ThemeHouseEdit.vue

@@ -0,0 +1,178 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="curObj.id ? `编辑(${curObj.estate_name})模块主题` : '新增模块主题'"
+      :fullscreen="false"
+      width="700px"
+      custom-class="xl-dialog"
+      center
+    >
+      <div class="scoped-ed">
+        <div class="se-op" v-for="(ed, index) in edList" :key="index">
+          <span class="t">{{ed.mtName}}</span>
+          <span class="s" @click="delHandle(ed)">删除</span>
+        </div>
+      </div>
+      <!-- <table-list
+        :list-loading="listLoading"
+        :data="edList"
+        :columns="listConfig"
+        :currentPage="currentPage"
+        :pageSize="-1"
+      /> -->
+      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="110px">
+        <div slot="footer" style="padding-top: 20px;">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">新增</el-button>
+        </div>
+      </base-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import baseTable from '_m/baseTable.js'
+export default {
+  components: { },
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  mixins: [...mixins, baseTable],
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      noCreated: true,
+      edList: [],
+      unModuleTypeArr: [],
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        this.getEdList()
+      }
+    },
+  },
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '已有模块主题', prop: 'mtName' },
+        { label: '操作', width: 400, type: 'handle2', operations:
+          [
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    getEdList () {
+      this.listLoading = true
+      this.$api.house.admestatemoduleid({estate_id: this.curObj.id}).then(res => {
+        const mtObj = arrToObj(this.$dictData.module_type)
+        this.edList = res.map((item, index) => {
+          return { id: item.id, mtName: mtObj[item.module_type]}
+        })
+        let unMTArr = []
+        let allMTArr = this.$dictData.module_type || []
+        allMTArr.forEach(one => {
+          let inFlag = true
+          res.forEach((item, index) => {
+            if (one.val === item.module_type) {
+              inFlag = false
+            }
+          })
+          if (inFlag) unMTArr.push(one)
+        })
+        this.unModuleTypeArr = [...unMTArr]
+        this.getDef()
+        this.listLoading = false
+      })
+    },
+    delHandle(row) {
+      this.$msg(`您确定要删除该模块主题吗?`, 'confirm', () => {
+        this.$api.house.admestatemoduledel({
+          id: row.id,
+        }).then(data => {
+          this.$msgs(`已删除!`)
+          this.getEdList()
+        })
+      }, null, true)
+    },
+    getDef() {
+      const params = {}
+      this.formData = [
+        { label: '新增模块主题', key: 'module_type', rules: 1, type: 'select', options: this.unModuleTypeArr },
+        { label: '排序', key: 'sort' },
+      ]
+      this.setDefaultValue(params)
+    },
+    close(str) {
+      if (str === 'confirm') {
+        this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
+          if (valid) {
+            const oldform = this.$refs.ruleForm.baseForm
+            const newForm = { ...oldform }
+            newForm.estate_id = this.curObj.id
+            let apiStr = 'admestatemoduleadd'
+            this.$api.house[apiStr](newForm).then(data => {
+              this.$msgs(newForm.id ? '编辑成功' : '新增成功')
+              this.getEdList()
+            })
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.setDefaultValue()
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+@import '../../../../styles/libEdit.scss';
+.lib-edit {
+  padding-top: 0;
+  ::v-deep .el-form-item {
+    margin-bottom: 10px;
+  }
+  ::v-deep .el-date-editor.el-input {
+    width: 100%;
+  }
+}
+.scoped-ed {
+  .se-op {
+    display: inline-block;
+    vertical-align: middle;
+    border: 1px solid #dcdcdc;
+    margin-bottom: 10px;
+    margin-right: 10px;
+    .t {
+      display: inline-block;
+      vertical-align: middle;
+      height: 30px;
+      line-height: 30px;
+      width: 150px;
+      padding: 0 20px;
+      font-weight: bold;
+    }
+    .s {
+      display: inline-block;
+      vertical-align: middle;
+      color: #fff;
+      background: #ff875c;
+      height: 30px;
+      line-height: 30px;
+      padding: 0 10px;
+      cursor: pointer;
+    }
+  }
+}
+</style>

+ 23 - 3
src/views/house/index.vue

@@ -26,6 +26,11 @@
       :curObj="curObj"
       :curObj="curObj"
       @close="closePhotoPopup"
       @close="closePhotoPopup"
     />
     />
+    <theme-house-edit
+      :isShow="isTHEShow"
+      :curObj="curObj"
+      @close="closeTHEPopup"
+    />
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
@@ -33,14 +38,15 @@ import { arrToObj } from '@/utils'
 import SearchForm from './components/searchForm/Index'
 import SearchForm from './components/searchForm/Index'
 import PopupEdit from './components/popup/IndexEdit'
 import PopupEdit from './components/popup/IndexEdit'
 import PhotoEdit from './components/popup/PhotoEdit'
 import PhotoEdit from './components/popup/PhotoEdit'
+import ThemeHouseEdit from './components/popup/ThemeHouseEdit'
 import baseTable from '_m/baseTable.js'
 import baseTable from '_m/baseTable.js'
-import xData from './mixin'
 export default {
 export default {
   name: 'index',
   name: 'index',
   components: {
   components: {
     SearchForm,
     SearchForm,
     PopupEdit,
     PopupEdit,
     PhotoEdit,
     PhotoEdit,
+    ThemeHouseEdit,
   },
   },
   provide() {
   provide() {
     return {
     return {
@@ -56,7 +62,7 @@ export default {
       isPhotoShow: false,
       isPhotoShow: false,
       // noCreated: true,
       // noCreated: true,
       curObj: {},
       curObj: {},
-      ...xData
+      isTHEShow: false,
     }
     }
   },
   },
   computed: {
   computed: {
@@ -105,7 +111,7 @@ export default {
             { label: '编辑信息', func: this.openPopup, btnType: 'primary' },
             { label: '编辑信息', func: this.openPopup, btnType: 'primary' },
             { label: '编辑相册', func: this.openPhotoPopup, btnType: 'success' },
             { label: '编辑相册', func: this.openPhotoPopup, btnType: 'success' },
             { label: '楼盘动态', func: this.openNews, btnType: 'info' },
             { label: '楼盘动态', func: this.openNews, btnType: 'info' },
-            { label: '主题模块', func: this.openNews, btnType: 'info' },
+            { label: '模块主题', func: this.openTHEPopup, btnType: 'info' },
             { label: '删除', func: this.delHandle, btnType: 'danger' },
             { label: '删除', func: this.delHandle, btnType: 'danger' },
           ]
           ]
         }
         }
@@ -154,6 +160,20 @@ export default {
       if (obj) {
       if (obj) {
         this.fetchData()
         this.fetchData()
       }
       }
+    },
+    openTHEPopup(row) {
+      if (row && row.id) {
+        this.curObj = row
+      } else {
+        this.curObj = {}
+      }
+      this.isTHEShow = true
+    },
+    closeTHEPopup(obj) {
+      this.isTHEShow = false
+      if (obj) {
+        this.fetchData()
+      }
     }
     }
   }
   }
 }
 }

Some files were not shown because too many files changed in this diff