liujq 3 years ago
parent
commit
516123baca

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/app.367f5c6a.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-02f27a2f.b2969b5b.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-123a7196.b53a2121.css


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


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


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


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-02f27a2f.e77f4426.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-123a7196.fceabc62.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-68163d8b.b2514084.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-a0634672.8d71e485.js


+ 2 - 2
src/components/Common/CropperImg.vue

@@ -38,7 +38,7 @@
           </vueCropper>
         </div>
         <template v-if="option.autoCropWidth * option.enlarge > preImgOptions.w || option.autoCropHeight * option.enlarge > preImgOptions.h">
-          <div class="su-tips t2">当前上传图片尺寸过小(宽度{{preImgOptions.w}}px,宽度{{preImgOptions.h}}px),最低尺寸(宽度{{option.autoCropWidth * option.enlarge}}px+,宽度{{option.autoCropHeight * option.enlarge}}px+)</div>
+          <div class="su-tips t2">当前上传图片尺寸过小(宽度{{preImgOptions.w}}px,宽度{{preImgOptions.h}}px),最低尺寸(宽度{{option.autoCropWidth * option.enlarge}}px+,宽度{{option.autoCropHeight * option.enlarge}}px+),图片尺寸太小可能导致图片模糊</div>
         </template>
         <template v-else>
           <div class="su-tips">原图尺寸(宽度{{preImgOptions.w}}px,宽度{{preImgOptions.h}}px),最低尺寸(宽度{{option.autoCropWidth * option.enlarge}}px+,宽度{{option.autoCropHeight * option.enlarge}}px+)</div>
@@ -75,7 +75,7 @@ export default {
         canScale: true, // 图片是否允许滚轮缩放
         autoCrop: true, // 是否默认生成截图框
         autoCropWidth: 375, // 默认生成截图框宽度
-        autoCropHeight: 300, // 默认生成截图框高度
+        autoCropHeight: 262, // 默认生成截图框高度
         canMove: true, // 上传图片是否可以移动
         fixedBox: true, // 固定截图框大小 不允许改变
         fixed: false, // 是否开启截图框宽高固定比例

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

@@ -125,6 +125,8 @@ export default {
         selector: `#${this.tinymceId}`,
         language: this.languageTypeList['zh'],
         height: this.height,
+        fontsize_formats: '8px 11px 12px 14px 16px 18px 24px 36px 48px',
+        font_formats: '微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats',
         body_class: 'panel-body ',
         object_resizing: false,
         toolbar: this.toolbar.length > 0 ? this.toolbar : toolbar,

+ 1 - 1
src/components/Tinymce/toolbar.js

@@ -2,6 +2,6 @@
 // Detail list see https://www.tinymce.com/docs/advanced/editor-control-identifiers/#toolbarcontrols
 
 // const toolbar = ['searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent  blockquote undo redo removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap preview anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen']
-const toolbar = [' undo redo searchreplace bold italic underline strikethrough alignleft aligncenter alignright outdent indent  blockquote removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen']
+const toolbar = [' undo redo fontsizeselect fontselect searchreplace bold italic underline strikethrough alignleft aligncenter alignright  blockquote removeformat subscript superscript code codesample', 'hr bullist numlist link image charmap anchor pagebreak insertdatetime media table emoticons forecolor backcolor fullscreen']
 
 export default toolbar

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

@@ -80,8 +80,8 @@ export default {
         { label: '精选文章', key: 'select_status', type: 'select', class: 'c-2', options: this.$dictData.select_status },
         { label: '主图', key: 'pri_image', type: 'cuImg',
           options: {
-            w: 500,
-            h: 350,
+            w: 375,
+            h: 262,
           }, class: 'c-2' },
         { label: '关联楼盘', key: 'estate_id_list', type: 'selectRemote', multiple: true, changeHandle: this.deviceChange,
           remoteParams: { skey: 'estate_name', api: `house.admestatelist`, opKey: 'estate_name', opVal: 'id' },

+ 2 - 2
src/views/news/components/popup/IndexEditSelf.vue

@@ -80,8 +80,8 @@ export default {
         { label: '作者', key: 'author', class: 'c-2' },
         { label: '主图', key: 'pri_image', type: 'cuImg',
           options: {
-            w: 500,
-            h: 350,
+            w: 375,
+            h: 262,
           }, class: 'c-2' },
         { label: '状态', key: 'hide_status', type: 'select', class: 'c-2', options: this.$dictData.hide_status },
         { label: '时间', key: 'create_at', type: 'datePicker', type2: 'date'},

+ 2 - 2
src/views/news/components/popup/OtherEdit.vue

@@ -67,8 +67,8 @@ export default {
         { label: '发布时间', key: 'create_at', class: 'c-2', type: 'datePicker', type2: 'date'},
         { label: '主图', key: 'pri_image', type: 'cuImg',
           options: {
-            w: 500,
-            h: 350,
+            w: 375,
+            h: 262,
           }, class: 'c-2' },
       ]
       this.setDefaultValue(params)

+ 2 - 2
src/views/news/components/popup/SelectImg.vue

@@ -51,8 +51,8 @@ export default {
       this.uploadObj = {
         url,
         options: {
-          w: 500,
-          h: 350,
+          w: 375,
+          h: 262,
         },
       }
       this.isCIShow = true

+ 97 - 8
src/views/news/indexEditSelf.vue

@@ -1,21 +1,34 @@
 <template>
   <div class="app-container">
     <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="60px" :insertSlotArr="[1]">
-      <div class="scoped-textarea"  slot="OI1">
-        <div class="st-text">洪楼科技</div>
-        <tinymce ref="refContent" v-model="content" :height="500" />
+      <div class="scoped-textarea" slot="OI1">
+        <div class="st-top">
+          <div class="t">资讯内容:</div>
+          <div :class="isConShow ? 'r t2' : 'r'" @click="isConShow = !isConShow">{{isConShow ? '收起' : '展开'}}</div>
+        </div>
+        <div :class="isConShow ? 'st-content show' : 'st-content'">
+          <div class="st-text">洪楼科技</div>
+          <tinymce ref="refContent" v-model="content" :height="800" />
+        </div>
       </div>
     </base-form>
     <div class="xl-form scoped-bottom">
+      <el-button class="xl-form-btn t4" @click="openSI">从文中选封面图</el-button>
+      <el-button class="xl-form-btn t1" @click="close('confirm')">保存</el-button>
       <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
-      <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
     </div>
+    <select-img 
+      :isShow="isSIShow"
+      :imgTempArr="imgTempArr"
+      @close="closeSI"
+    />
   </div>
 </template>
 <script>
+import SelectImg from './components/popup/SelectImg'
 import Tinymce from '@/components/Tinymce'
 export default {
-  components: { Tinymce },
+  components: { Tinymce, SelectImg },
   mixins,
   data() {
     return {
@@ -23,6 +36,9 @@ export default {
       loading: true,
       cObj: {},
       content: '',
+      isConShow: false,
+      imgTempArr: [],
+      isSIShow: false,
     }
   },
   created () {
@@ -40,9 +56,33 @@ export default {
     }
   },
   methods: {
+    openSI () {
+      let regex = new RegExp(/src="https:\/\/img2.honglounews.com([^"]*?)(png|jpg)/g)
+      let s = this.content.match(regex)
+      if (!s) {
+        this.$msgw('未找到图片,请先检查~')
+        this.isConShow = true
+        return
+      }
+      let imgTempArr = []
+      for (var i = 0; i < s.length; i++) {
+        imgTempArr.push(s[i].replace('src="', ''))
+      }
+      this.imgTempArr = imgTempArr
+      this.isSIShow = true
+    },
+    closeSI (str) {
+      this.isSIShow = false
+      if (str) {
+        const oldform = this.$refs.ruleForm.baseForm
+        this.setDefaultValue({...oldform, pri_image: str})
+      }
+    },
     getDef() {
       const params = { ...this.cObj }
       const disabled = false
+      if (!params.author) params.author = '洪楼Plus'
+      if (!params.hide_status) params.hide_status = '1'
       const remoteOptionsIds = []
       if (params.estate_list) {
         params.estate_id_list = params.estate_list.map(item => {
@@ -59,8 +99,8 @@ export default {
         { label: '作者', key: 'author', class: 'c-2', rules: 1 },
         { label: '主图', key: 'pri_image', type: 'cuImg', rules: 1,
           options: {
-            w: 500,
-            h: 350,
+            w: 375,
+            h: 262,
           }, class: 'c-2' },
         { label: '状态', key: 'hide_status', rules: 1, type: 'select', class: 'c-2', options: this.$dictData.hide_status },
         { label: '时间', key: 'create_at', rules: 1, type: 'datePicker', type2: 'date', class: 'c-2'},
@@ -156,12 +196,61 @@ export default {
   ::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;
-  margin-bottom: 20px;
+  .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: 0;
+    transition: 1s;
+    overflow: hidden;
+    .st-text {
+      display: none;
+    }
+    &.show {
+      height: 800px;
+      .st-text {
+        display: block;
+      }
+    }
+  }
   .st-text {
     position: absolute;
     bottom: 1px;

+ 2 - 2
src/views/news/indexEditSelf2.vue

@@ -123,8 +123,8 @@ export default {
         { label: '作者', key: 'author', class: 'c-2' },
         { label: '主图', key: 'pri_image', type: 'cuImg',
           options: {
-            w: 500,
-            h: 350,
+            w: 375,
+            h: 262,
           }, class: 'c-2' },
         { label: '状态', key: 'hide_status', type: 'select', class: 'c-2', options: this.$dictData.hide_status },
         { label: '时间', key: 'create_at', type: 'datePicker', type2: 'date'},

+ 8 - 4
src/views/news/otherEdit.vue

@@ -14,8 +14,8 @@
     </base-form>
     <div class="xl-form scoped-bottom">
       <el-button class="xl-form-btn t4" @click="openSI">从文中选封面图</el-button>
+      <el-button class="xl-form-btn t1" @click="close('confirm')">保存</el-button>
       <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
-      <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
     </div>
     <select-img 
       :isShow="isSIShow"
@@ -68,8 +68,8 @@ export default {
         { label: '状态', rules: 1, key: 'hide_status', type: 'select', class: 'c-2', options: this.$dictData.hide_status },
         { label: '封面', key: 'pri_image', rules: 1, type: 'cuImg',
           options: {
-            w: 500,
-            h: 350,
+            w: 375,
+            h: 262,
           }, class: 'c-2' },
       ]
       this.setDefaultValue(params)
@@ -109,7 +109,11 @@ export default {
       // let regex = new RegExp(/<img src="([^"]*?)" \/>/g)
       let regex = new RegExp(/src="https:\/\/img2.honglounews.com([^"]*?)(png|jpg)/g)
       let s = this.content.match(regex)
-      // console.log(s)
+      if (!s) {
+        this.$msgw('未找到图片,请先检查~')
+        this.isConShow = true
+        return
+      }
       let imgTempArr = []
       for (var i = 0; i < s.length; i++) {
         // imgTempArr.push(s[i].replace(regex, '$1'))

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