Ver Fonte

temp save

liujq há 4 anos atrás
pai
commit
6bf64a3c49

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/index.html


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.c31c6857.css


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/chunk-13990f24.ee2c0ad0.css


+ 1 - 0
dist/static/css/chunk-69c14fb4.546db214.css

@@ -0,0 +1 @@
+.lib-edit[data-v-3c34ae07]{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-3c34ae07],.lib-edit[data-v-3c34ae07] .el-form-item__error{padding-top:0}.lib-edit.t2[data-v-3c34ae07] .el-form-item{margin-bottom:10px}.lib-edit.t2[data-v-3c34ae07] .el-form-item__error{padding-top:0}.lib-edit[data-v-3c34ae07] .el-form-item{width:100%}.lib-edit[data-v-3c34ae07] .el-form-item.c-2{width:50%}.lib-edit[data-v-3c34ae07] .el-form-item.c-3{width:33.33%}.lib-edit[data-v-3c34ae07] .el-form-item.c-3s{width:66.66%}.lib-edit[data-v-3c34ae07] .el-form-item.is-error .el-input-group--append{border-color:#f56c6c}.lib-edit[data-v-3c34ae07] .el-input-group--append{border:1px solid #dcdcdc;position:relative}.lib-edit[data-v-3c34ae07] .el-input-group--append .el-input-group__append{min-width:40px;text-align:right;padding-right:5px}.lib-edit[data-v-3c34ae07] .el-input-group--append .el-input__inner{border:none;padding-right:10px}.lib-edit[data-v-3c34ae07] .el-input-group--append .el-select{margin:0;position:absolute;right:0;top:0}.lib-edit[data-v-3c34ae07] .el-input-group--append .el-select .el-input__inner{text-align:right;color:#333}.lib-edit[data-v-3c34ae07] .el-input-group--prepend{border:1px solid #dcdcdc;position:relative}.lib-edit[data-v-3c34ae07] .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-3c34ae07] .el-input-group--prepend .el-input__inner{border:none;padding-right:10px;padding-left:0}.lib-edit[data-v-3c34ae07] .el-input-group--prepend .el-select{margin:0;position:absolute;right:0;top:0}.lib-edit[data-v-3c34ae07] .el-input-group--prepend .el-select .el-input__inner{text-align:left;color:#333}.lib-edit[data-v-3c34ae07]{padding-top:0}.lib-edit[data-v-3c34ae07] .el-form-item{margin-bottom:10px}.lib-edit[data-v-3c34ae07] .el-date-editor.el-input{width:100%}

+ 0 - 0
dist/static/css/chunk-238c903c.3c7f5ad9.css → dist/static/css/chunk-76cea4de.3c7f5ad9.css


BIN
dist/static/img/ex_test.9c19f92a.jpg


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.05bb0d65.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.f1cea3b1.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-13990f24.07de08c8.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-69c14fb4.2aea2c8a.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-6d2aa384.0e19ab64.js


+ 1 - 1
dist/static/js/chunk-238c903c.4e161b68.js → dist/static/js/chunk-76cea4de.0490ca2d.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-238c903c"],{"26fc":function(t,s,e){t.exports=e.p+"static/img/404_cloud.0f4bc32b.png"},"8cdb":function(t,s,e){"use strict";e.r(s);var a=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"wscn-http404-container"},[e("div",{staticClass:"wscn-http404"},[t._m(0),e("div",{staticClass:"bullshit"},[e("div",{staticClass:"bullshit__oops"},[t._v("OOPS!")]),t._m(1),e("div",{staticClass:"bullshit__headline"},[t._v(t._s(t.message))]),e("div",{staticClass:"bullshit__info"},[t._v("Please check that the URL you entered is correct, or click the button below to return to the homepage.")]),e("a",{staticClass:"bullshit__return-home",attrs:{href:""}},[t._v("Back to home")])])])])},c=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"pic-404"},[a("img",{staticClass:"pic-404__parent",attrs:{src:e("a36b"),alt:"404"}}),a("img",{staticClass:"pic-404__child left",attrs:{src:e("26fc"),alt:"404"}}),a("img",{staticClass:"pic-404__child mid",attrs:{src:e("26fc"),alt:"404"}}),a("img",{staticClass:"pic-404__child right",attrs:{src:e("26fc"),alt:"404"}})])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"bullshit__info"},[t._v("All rights reserved "),e("a",{staticStyle:{color:"#20a0ff"},attrs:{href:"https://wallstreetcn.com",target:"_blank"}},[t._v("wallstreetcn")])])}],i={name:"Page404",computed:{message:function(){return"The webmaster said that you can not enter this page..."}}},l=i,n=(e("97ef"),e("2877")),r=Object(n["a"])(l,a,c,!1,null,"c095f994",null);s["default"]=r.exports},"97ef":function(t,s,e){"use strict";e("ed94")},a36b:function(t,s,e){t.exports=e.p+"static/img/404.a57b6f31.png"},ed94:function(t,s,e){}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-76cea4de"],{"26fc":function(t,s,e){t.exports=e.p+"static/img/404_cloud.0f4bc32b.png"},"8cdb":function(t,s,e){"use strict";e.r(s);var a=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"wscn-http404-container"},[e("div",{staticClass:"wscn-http404"},[t._m(0),e("div",{staticClass:"bullshit"},[e("div",{staticClass:"bullshit__oops"},[t._v("OOPS!")]),t._m(1),e("div",{staticClass:"bullshit__headline"},[t._v(t._s(t.message))]),e("div",{staticClass:"bullshit__info"},[t._v("Please check that the URL you entered is correct, or click the button below to return to the homepage.")]),e("a",{staticClass:"bullshit__return-home",attrs:{href:""}},[t._v("Back to home")])])])])},c=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"pic-404"},[a("img",{staticClass:"pic-404__parent",attrs:{src:e("a36b"),alt:"404"}}),a("img",{staticClass:"pic-404__child left",attrs:{src:e("26fc"),alt:"404"}}),a("img",{staticClass:"pic-404__child mid",attrs:{src:e("26fc"),alt:"404"}}),a("img",{staticClass:"pic-404__child right",attrs:{src:e("26fc"),alt:"404"}})])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"bullshit__info"},[t._v("All rights reserved "),e("a",{staticStyle:{color:"#20a0ff"},attrs:{href:"https://wallstreetcn.com",target:"_blank"}},[t._v("wallstreetcn")])])}],i={name:"Page404",computed:{message:function(){return"The webmaster said that you can not enter this page..."}}},l=i,n=(e("97ef"),e("2877")),r=Object(n["a"])(l,a,c,!1,null,"c095f994",null);s["default"]=r.exports},"97ef":function(t,s,e){"use strict";e("ed94")},a36b:function(t,s,e){t.exports=e.p+"static/img/404.a57b6f31.png"},ed94:function(t,s,e){}}]);

+ 15 - 0
src/api/house.js

@@ -34,4 +34,19 @@ export default {
   admschooldel: params => { // 学校删除
     return getRequestNoSort('/adm/school/del', params, 'loading')
   },
+  adminformationlist: params => { // 洪楼文章列表接口
+    return getRequest('/adm/information/list', params)
+  },
+  adminformationadd: params => { // 洪楼文章添加
+    return getRequestNoSort('/adm/information/add', params, 'loading')
+  },
+  adminformationedit: params => { // 洪楼文章编辑
+    return getRequestNoSort('/adm/information/edit', params, 'loading')
+  },
+  adminformationdetail: params => { // 洪楼文章详情
+    return getRequestNoSort('/adm/information/detail', params, 'loading')
+  },
+  adminformationdel: params => { // 洪楼文章删除
+    return getRequestNoSort('/adm/information/del', params, 'loading')
+  },
 }

BIN
src/assets/ex_news.png


+ 16 - 0
src/components/Common/TableList.vue

@@ -150,6 +150,22 @@
             <span v-else>-</span>
           </template>
         </el-table-column>
+        <el-table-column
+          v-else-if="column.type === 'img2'"
+          :key="index"
+          :label="column.label"
+          :prop="column.prop"
+          :align="column.align || 'center'"
+          :width="column.width || 100"
+          :min-width="column.minWidth"
+        >
+          <template slot-scope="scope">
+            <div v-if="noEmpty(scope.row[column.prop])" class="img-box" @click="bigImgHandle(scope.row[column.prop])">
+              <img :src="`${scope.row[column.prop]}`" class="s-img">
+            </div>
+            <span v-else>-</span>
+          </template>
+        </el-table-column>
         <el-table-column
           v-else-if="column.type === 'handle'"
           :key="index"

+ 11 - 0
src/router/index.js

@@ -77,6 +77,17 @@ export const moreRoutes = [
       meta: { title: '学校管理', icon: 'dashboard', affix: true }
     }]
   },
+  {
+    path: '/news',
+    component: Layout,
+    redirect: '/news/index',
+    children: [{
+      path: 'index',
+      name: 'newsIndex',
+      component: () => import('@/views/news/index'),
+      meta: { title: '测评资讯', icon: 'dashboard', affix: true }
+    }]
+  },
   {
     path: '/user',
     component: Layout,

+ 138 - 0
src/views/news/components/popup/IndexEdit.vue

@@ -0,0 +1,138 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="'编辑资讯'"
+      :fullscreen="false"
+      width="700px"
+      custom-class="xl-dialog"
+      center
+    >
+      <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>
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      cObj: {},
+      isShowMap: false
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        if (val) {
+          if (this.curObj.id) {
+            this.$api.house.adminformationdetail({id: this.curObj.id}).then(res => {
+              let curData = res || {}
+              if (curData.pri_image) curData.pri_image = `${curData.domain}${curData.pri_image}?url=${curData.pri_image}`
+              this.cObj = curData || {}
+              this.getDef()
+            })
+          } else {
+            this.cObj = this.curObj
+            this.getDef()
+          }
+        }
+      }
+    },
+  },
+  methods: {
+    getDef() {
+      const params = { ...this.cObj }
+      const disabled = false
+      const remoteOptionsIds = []
+      if (params.estate_list) {
+        params.estate_id_list = params.estate_list.map(item => {
+          remoteOptionsIds.push({ keyRO: item.estate_name, valRO: item.id })
+          return item.id
+        })
+      } else {
+        params.estate_id_list = []
+      }
+      // if (params.id) disabled = true
+      this.formData = [
+        { label: '标题', key: 'title' },
+        { label: '链接', key: 'link' },
+        { label: '分类', key: 'information_category', type: 'select', class: 'c-2', options: this.$dictData.information_category },
+        { label: '作者', key: 'author', class: 'c-2' },
+        { label: '状态', key: 'hide_status', type: 'select', class: 'c-2', options: this.$dictData.hide_status },
+        { label: '主图', key: 'pri_image', type: 'upload', class: 'c-2' },
+        { label: '关联楼盘', key: 'estate_id_list', type: 'selectRemote', multiple: true, changeHandle: this.deviceChange,
+          remoteParams: { skey: 'estate_name', api: `house.admestatelist?search_EQ_status=1`, opKey: 'estate_name', opVal: 'id' },
+          remoteOptions: remoteOptionsIds
+        },
+      ]
+      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 }
+            if (this.curObj.id) newForm.id = this.curObj.id
+            if (newForm.estate_id_list && newForm.estate_id_list.length > 0) {
+              newForm.estate_id_list = newForm.estate_id_list.join(',')
+            } else {
+              newForm.estate_id_list = ''
+            }
+            if (newForm.pri_image && newForm.pri_image.indexOf('?') > -1) {
+              const imgArr = newForm.pri_image.split('?')
+              const queryArr = imgArr[1].split('&')
+              queryArr.forEach(q =>{
+                const curQArr = q.split('=')
+                if (curQArr[0] === 'url') {
+                  newForm.pri_image = curQArr[1]
+                }
+              })
+            } else {
+              delete newForm.pri_image
+            }
+            let apiStr = 'adminformationadd'
+            if (newForm.id) apiStr = 'adminformationedit'
+            this.$api.house[apiStr](newForm).then(data => {
+              this.$msgs(newForm.id ? '编辑成功' : '新增成功')
+              this.$emit('close', newForm)
+            })
+          }
+        })
+      } 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%;
+  }
+}
+</style>

+ 34 - 0
src/views/news/components/searchForm/Index.vue

@@ -0,0 +1,34 @@
+<template>
+  <header-collapse>
+    <base-form slot="content" ref="ruleForm" :data="searchData">
+      <div slot="footer">
+        <el-button :loading="listLoading" icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">查询</el-button>
+        <!-- <el-button :loading="listLoading" icon="el-icon-document" class="xl-form-btn bgc2" @click="toExportExcel">导出{{ this.$route.meta.title }}信息</el-button> -->
+      </div>
+    </base-form>
+  </header-collapse>
+</template>
+<script>
+export default {
+  props: {
+    listLoading: Boolean
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      searchData: [
+        { label: '标题', key: 'title' },
+        { label: '分类', key: 'information_category', type: 'select', options: this.$dictData.information_category},
+        { label: '状态', key: 'hide_status', type: 'select', class: 'c-3', options: this.$dictData.hide_status },
+      ]
+    }
+  },
+  methods: {
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

BIN
src/views/news/img/icon_g_close.png


+ 110 - 0
src/views/news/index.vue

@@ -0,0 +1,110 @@
+<template>
+  <div class="app-container">
+    <search-form
+      :list-loading="listLoading"
+      @change="searchHandle"
+    />
+    <table-list
+      :list-loading="listLoading"
+      :data="tableData2"
+      :columns="listConfig"
+      :current-page="currentPage"
+      :page-size="pageSize"
+      :total-records="totalRecords"
+      @currentChange="pageHandle"
+      :isAdd="true"
+      @add="openPopup"
+    />
+    <popup-edit
+      :isShow="isDtlShow"
+      :curObj="curObj"
+      @close="closePopup"
+    />
+  </div>
+</template>
+<script>
+import { arrToObj } from '@/utils'
+import SearchForm from './components/searchForm/Index'
+import PopupEdit from './components/popup/IndexEdit'
+import baseTable from '_m/baseTable.js'
+import xData from './mixin'
+export default {
+  name: 'index',
+  components: {
+    SearchForm,
+    PopupEdit,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'house.adminformationlist',
+      searchForm: null,
+      isDtlShow: false,
+      curObj: {},
+      ...xData
+    }
+  },
+  computed: {
+    tableData2() {
+      const defaultImg = require('@/assets/ex_test.jpg')
+      const arr = [...this.tableData]
+      arr.map(item => {
+        item.pri_image = item.pri_image || defaultImg
+      })
+      return arr
+    }
+  },
+  created() {},
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '标题', prop: 'title', fullShow: true, minWidth: 300 }, 
+        { label: '分类', prop: 'information_category', type: 'flag', flags: arrToObj(this.$dictData.information_category) }, 
+        { label: '主图', prop: 'pri_image', type: 'img' },
+        { label: '链接', prop: 'link' },
+        { label: '作者', prop: 'author' },
+        { label: '状态', prop: 'hide_status', type: 'tag', tags: arrToObj(this.$dictData.hide_status) }, 
+        { label: '更新人', prop: 'update_by' },
+        { label: '更新时间', prop: 'update_at' },
+        { label: '操作', width: 120, type: 'handle2', operations:
+          [
+            { label: '编辑', func: this.openPopup, btnType: 'primary' },
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    delHandle(row) {
+      this.$msg(`您确定要删除该文章吗?`, 'confirm', () => {
+        this.$api.house.adminformationdel({
+          id: row.id,
+        }).then(data => {
+          this.$msgs(`已删除!`)
+          this.fetchData()
+        })
+      }, null, true)
+    },
+    openPopup(row) {
+      if (row && row.id) {
+        this.curObj = row
+      } else {
+        this.curObj = {}
+      }
+      this.isDtlShow = true
+    },
+    closePopup(obj) {
+      this.isDtlShow = false
+      if (obj) {
+        this.fetchData() 
+      }
+    }
+  }
+}
+</script>

+ 6 - 0
src/views/news/mixin.js

@@ -0,0 +1,6 @@
+export default {
+  enabledStateArr: [
+    { key: '启用', val: '1' },
+    { key: '禁用', val: '2' }
+  ],
+}

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff