liujq 2 lat temu
rodzic
commit
ac5d2ca015

Plik diff jest za duży
+ 0 - 0
dist/index.html


Plik diff jest za duży
+ 0 - 0
dist/static/css/chunk-51eddf6c.1ae9fbd8.css


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.bf8cd5a5.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.f3cdba63.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-077cbcc8.5576807e.js


+ 0 - 0
dist/static/js/chunk-37b583ca.6e44d42d.js → dist/static/js/chunk-37b583ca.9dc41711.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/chunk-51eddf6c.e3f996a2.js


+ 6 - 0
src/api/house.js

@@ -19,4 +19,10 @@ export default {
   admestatedel: params => { // 楼盘删除
     return getRequestNoSort('/adm/estate/del', params, 'loading')
   },
+  admestatecontentedit: params => { // 楼盘介绍内容 编辑
+    return getRequestNoSort('/adm/estate/content/edit', params, 'loading')
+  },
+  admestatecontentdetail: params => { //  楼盘介绍内容 详情
+    return getRequestNoSort('/adm/estate/content/detail', params, 'loading')
+  },
 }

+ 1 - 1
src/components/Tinymce/components/EditorImage.vue

@@ -12,7 +12,7 @@
         :before-upload="beforeUpload"
         action="https://httpbin.org/post" -->
       <el-upload
-        :action="`${domainUrl}/adm/upload/cloudpub`"
+        :action="`${domainUrl}/adm/upload/cloud`"
         :data="{logic_type: 'textcontent', token}"
         name="upload"
         :file-list="fileList"

+ 2 - 2
src/components/Tinymce/index.vue

@@ -163,14 +163,14 @@ export default {
         powerpaste_html_import: 'propmt',// propmt, merge, clear
         powerpaste_allow_local_images: true,
         paste_data_images: true,
-        images_upload_url: `${_this.domainUrl}/adm/upload/cloudpub`,
+        images_upload_url: `${_this.domainUrl}/adm/upload/cloud`,
         automatic_uploads: true,
         images_upload_handler: (blobInfo, success, failure) => {
           const formData = new FormData();
           formData.append('upload', blobInfo.blob())
           formData.append('token', this.token)
           formData.append('logic_type', 'textcontent')
-          axios.post(`${this.domainUrl}/adm/upload/cloudpub`, formData)
+          axios.post(`${this.domainUrl}/adm/upload/cloud`, formData)
           .then(function (res) {
               if (res.data.errno == 0) {
                 let file = res.data.data

+ 2 - 2
src/components/Tinymce2/index.vue

@@ -159,14 +159,14 @@ export default {
         // https://stackoverflow.com/questions/5196205/disable-tinymce-absolute-to-relative-url-conversions
         convert_urls: false,
         paste_data_images: true,
-        images_upload_url: `${this.domainUrl}/adm/upload/cloudpub`,
+        images_upload_url: `${this.domainUrl}/adm/upload/cloud`,
         automatic_uploads: false,
         images_upload_handler: (blobInfo, success, failure) => {
           const formData = new FormData();
           formData.append('upload', blobInfo.blob())
           formData.append('token', this.token)
           formData.append('logic_type', 'textcontent')
-          axios.post(`${this.domainUrl}/adm/upload/cloudpub`, formData)
+          axios.post(`${this.domainUrl}/adm/upload/cloud`, formData)
           .then(function (res) {
               if (res.data.errno == 0) {
                 let file = res.data.data

+ 170 - 0
src/views/house/contentEdit.vue

@@ -0,0 +1,170 @@
+<template>
+  <div class="app-container">
+    <div :class="'st-content'">
+      <tinymce ref="refContent" v-model="content" :height="800" />
+    </div>
+    <div class="xl-form scoped-bottom">
+      <el-button class="xl-form-btn t1" @click="close('confirm')">保存</el-button>
+      <el-button class="xl-form-btn t2" @click="close">返回楼盘页</el-button>
+    </div>
+  </div>
+</template>
+<script>
+import Tinymce from '@/components/Tinymce'
+export default {
+  components: { Tinymce },
+  mixins,
+  data() {
+    return {
+      cObj: {},
+      content: '',
+    }
+  },
+  mounted () {
+    const query = this.$route.query
+    if (query.id) {
+      this.$api.house.admestatecontentdetail({id: query.id}).then(res => {
+        let curData = res || {}
+        this.cObj = curData || {}
+        this.content = curData.content || '点击这里请输入楼盘介绍'
+        this.$refs.refContent.hasChange = false
+        console.log(this.content)
+      })
+    }
+  },
+  methods: {
+    fileChange (file) {
+      let reader = new FileReader();
+      let rs = reader.readAsArrayBuffer(file);
+      let blob = null;
+      reader.onload = (e) => {
+        if (typeof e.target.result === 'object') {
+          blob = new Blob([e.target.result])
+        } else {
+          blob = e.target.result
+        }
+        console.log(Object.prototype.toString.call(blob));
+      }
+    },
+    close(str) {
+      if (str === 'confirm') {
+        const query = this.$route.query
+        let newForm = {
+          id: query.id
+        }
+        if (this.content) {
+          newForm.content = this.content
+        } else {
+          this.$msg('请输入介绍内容')
+          return
+        }
+        this.$api.house.admestatecontentedit(newForm).then(data => {
+          this.$msgs(newForm.id ? '编辑成功' : '新增成功')
+          this.$refs.refContent.hasChange = false
+          this.$emit('close', newForm)
+        })
+      } else {
+        this.$refs.refContent.hasChange = false
+        this.$router.push('/house/index')
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+@import '../../styles/libEdit.scss';
+.app-container {
+  background: #f9f9f9;
+}
+.lib-edit {
+  width: 900px;
+  padding: 20px;
+  margin: 0 auto;
+  background: #fff;
+  ::v-deep .el-form-item {
+    margin-bottom: 10px;
+  }
+  ::v-deep .el-date-editor.el-input {
+    width: 100%;
+  }
+
+  ::v-deep .img-upload {
+    height: 180px;
+    overflow: hidden;
+    .icon {
+      width: 280px;
+    }
+    .img {
+      width: 280px;
+    }
+  }
+}
+
+.scoped-textarea {
+  width: 100%;
+  position: relative;
+  .st-top {
+    padding-bottom: 10px;
+    user-select: none;
+    .t {
+      display: inline-block;
+      vertical-align: middle;
+      font-size: 14px;
+      color: #2d8cf0;
+      font-weight: bold;
+    }
+    .r {
+      display: inline-block;
+      vertical-align: middle;
+      color: #fff;
+      padding: 4px 10px;
+      border-radius: 6px;
+      background: #2d8cf0;
+      font-weight: bold;
+      font-size: 12px;
+      cursor: pointer;
+      &.t2 {
+        background: #19be6b;
+      }
+    }
+  }
+  .st-content {
+    height: 800px;
+    .st-text {
+      display: none;
+    }
+  }
+  .st-text {
+    position: absolute;
+    bottom: 1px;
+    right: 14px;
+    background: #fff;
+    font-size: 12px;
+    z-index: 9;
+    height: 16px;
+    line-height: 16px;
+    padding-left: 10px;
+    padding-right: 10px;
+    color: #595959;
+    user-select: none;
+  }
+}
+
+.scoped-bottom {
+  position: fixed;
+  bottom: 0;
+  right: 0;
+  background: #fff;
+  width: 100%;
+  box-sizing: border-box;
+  padding-left: 50%;
+  padding-bottom: 20px;
+  padding-top: 20px;
+  border-top: 1px solid #dcdcdc;
+  z-index: 10;
+}
+
+::v-deep .el-drawer__body {
+  padding-bottom: 30px;
+}
+</style>

+ 5 - 2
src/views/house/index.vue

@@ -79,17 +79,20 @@ export default {
         { label: '带看保护期', prop: 'lead_lock' },
         { label: '所属区域', prop: 'area_type', type: 'flag', flags: arrToObj(this.$dictData.area_type) },
         { label: '更新时间', prop: 'update_at' },
-        { label: '操作', width: 140, type: 'handle2', operations:
+        { label: '操作', width: 220, type: 'handle2', operations:
           [
-            // { label: '保存排序', func: this.saveHandle, btnType: 'success' },
             { label: '编辑信息', func: this.openPopup, btnType: 'primary' },
             { label: '删除', func: this.delHandle, btnType: 'danger' },
+            { label: '楼盘介绍', func: this.linkDesc, btnType: 'success' },
           ]
         }
       ]
     }
   },
   methods: {
+    linkDesc (row) {
+      this.$router.push(`/house/contentEdit?id=${row.id}`)
+    },
     // saveHandle (row) {
     //   this.$api.house.admestatesortedit({
     //     id: row.id,

+ 0 - 1
src/views/user/index.vue

@@ -53,7 +53,6 @@ export default {
     tableData2() {
       const arr = [...this.tableData]
       arr.map(item => {
-        let roleName = ''
         if (!item.role_name) item.role_name = '---'
         let GTObj = arrToObj(this.$dictData.group_type)
         item.roleName = `${GTObj[item.group_type]}/${item.role_name}`

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików