liujq пре 3 година
родитељ
комит
c9bbd46830

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/index.html


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/css/chunk-2a19f0a9.122df454.css


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/css/chunk-56ce15b9.8c2c2b49.css


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/app.d8ce5090.js


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/chunk-2a19f0a9.216ce733.js


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/chunk-56ce15b9.a5d6f4bf.js


+ 15 - 0
src/api/other.js

@@ -103,4 +103,19 @@ export default {
   admareainfodetail: params => { // 区域管理 - 详情
     return getRequestNoSort('/adm/area/info/detail', params, 'loading')
   },
+  admchannelslist: params => { // 短视频管理 - 列表
+    return getRequest('/adm/channels/list', params)
+  },
+  admchannelsedit: params => { // 短视频管理 - 编辑
+    return getRequestNoSort('/adm/channels/edit', params, 'loading')
+  },
+  admchannelsadd: params => { // 短视频管理 - 添加
+    return getRequestNoSort('/adm/channels/add', params, 'loading')
+  },
+  admchannelsdel: params => { // 短视频管理 - 删除
+    return getRequestNoSort('/adm/channels/del', params, 'loading')
+  },
+  admchannelsdetail: params => { // 短视频管理 - 详情
+    return getRequestNoSort('/adm/channels/detail', params, 'loading')
+  },
 }

+ 116 - 0
src/views/channel/components/popup/IndexEdit.vue

@@ -0,0 +1,116 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="curObj.id ? '编辑房源' : '新增房源'"
+      :fullscreen="false"
+      width="760px"
+      custom-class="xl-dialog"
+      center
+    >
+      <base-form ref="ruleForm" class="lib-edit" :data="formData" :is-inline="false" label-width="110px">
+        <div slot="footer">
+          <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'
+export default {
+  components: { },
+  mixins,
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      loading: false,
+      formData: [],
+      cObj: {},
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        if (this.curObj.id) {
+          this.$api.other.admchannelsdetail({id: this.curObj.id}).then(res => {
+            this.cObj = res || {}
+            this.getDef()
+          })
+        } else {
+          this.getDef()
+        }
+      }
+    },
+  },
+  methods: {
+    getDef (str) {
+      let params = {}
+      params = { ...this.cObj }
+      if (str === 'edit') {
+        params = {...this.$refs.ruleForm.baseForm, ...params}
+      }
+      this.formData = [
+        { label: '发布时间', key: 'publish_at', type: 'datePicker', type2: 'date'},
+        { label: '标题', key: 'title'},
+        { label: '视频分类', key: 'channels_type', class: 'c-2', type: 'select', options: this.$dictData.channels_type},
+        { label: '状态', key: 'hide_status', class: 'c-2', type: 'select', options: this.$dictData.hide_status},
+        { label: '封面图', key: 'cover', class: 'c-2', type: 'cuImg',
+          options: {
+            w: 375,
+            h: 250,
+          }
+        },
+        { label: '自定义标签', class: 'c-2', key: 'custom_tag', type: 'textarea' },
+        { label: '视频ID', key: 'feed_id', type: 'textarea' },
+      ]
+      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
+            newForm.custom_tag = newForm.custom_tag.replace(/,|、|\/|\\/g, ',')
+            let apiStr = 'admchannelsadd'
+            if (this.curObj.id) apiStr = 'admchannelsedit'
+            this.$api.other[apiStr](newForm).then(data => {
+              this.$msgs(newForm.id ? '编辑成功' : '新增成功')
+              this.cObj = {}
+              this.$emit('close', newForm)
+            })
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.cObj = {}
+        this.setDefaultValue()
+      }
+    },
+  }
+}
+</script>
+<style lang="scss" scoped>
+@import '../../../../styles/libEdit.scss';
+.lib-edit {
+  padding-top: 0;
+  padding-left: 0;
+  padding-bottom: 40px;
+  ::v-deep .el-form-item {
+    margin-bottom: 10px;
+  }
+  ::v-deep .el-date-editor.el-input {
+    width: 100%;
+  }
+}
+</style>

+ 51 - 0
src/views/channel/components/searchForm/Index.vue

@@ -0,0 +1,51 @@
+<template>
+  <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>
+</template>
+<script>
+export default {
+  props: {
+    listLoading: Boolean
+  },
+  inject: ['parentData'],
+  mixins,
+  data() {
+    return {
+      searchData: []
+    }
+  },
+  mounted () {
+    this.getDef()
+  },
+  methods: {
+    subwayLineChange (val) {
+      this.getDef('change')
+    },
+    getDef (str) {
+      let params = { ...this.$refs.ruleForm.baseForm }
+      this.searchData = [
+        { label: '发布时间', label2: '开始时间', label3: '结束时间', key: 'startEndTime', type: 'datePicker'},
+        { label: '标题', key: 'title' },
+        { label: '自定义标签', key: 'custom_tag' },
+        { label: '分类', key: 'channels_type', type: 'select', options: this.$dictData.channels_type},
+        { label: '状态', key: 'hide_status', type: 'select', options: this.$dictData.hide_status},
+      ]
+      this.setDefaultValue(params, 'searchData')
+    },
+    searchHandle() {
+      const oldform = this.$refs.ruleForm.baseForm
+      const newForm = { ...oldform }
+      if (newForm.startEndTime) {
+        newForm.start_at = newForm.startEndTime[0]
+        newForm.end_at = newForm.startEndTime[1]
+        delete newForm.startEndTime
+      }
+      this.$emit('change', newForm)
+    }
+  }
+}
+</script>

+ 116 - 0
src/views/channel/index.vue

@@ -0,0 +1,116 @@
+<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"
+      :operationsDefaultLength="5"
+    />
+    <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'
+export default {
+  name: 'Index',
+  components: {
+    SearchForm,
+    PopupEdit,
+  },
+  provide() {
+    return {
+      parentData: this
+    }
+  },
+  mixins: [baseTable],
+  data() {
+    return {
+      apiStr: 'other.admchannelslist',
+      searchForm: null,
+      isDtlShow: false,
+      // noCreated: true,
+      curObj: {},
+    }
+  },
+  computed: {
+    tableData2() {
+      const arr = [...this.tableData]
+      arr.map(item => {})
+      return arr
+    }
+  },
+  created() {},
+  mounted() {
+    this.listConfig = {
+      rows: [
+        { label: '发布时间', prop: 'publish_at' },
+        { label: '封面图', prop: 'cover', type: 'img' },
+        { label: '标题', prop: 'title' },
+        { label: '视频分类', prop: 'channels_type', type: 'flag', flags: arrToObj(this.$dictData.channels_type	) },
+        { label: '自定义标签', prop: 'custom_tag' },
+        { label: '状态', prop: 'hide_status', type: 'tag', tags: arrToObj(this.$dictData.hide_status), tagTypeObj: {'1': 'success', '2': 'danger'} },
+        { label: '视频ID', prop: 'feed_id' },
+        { label: '操作', width: 120, type: 'handle2', operations:
+          [
+            { label: '编辑', func: this.openPopup, btnType: 'primary' },
+            { label: '删除', func: this.delHandle, btnType: 'danger' },
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    saveHandle (row) {
+      this.$api.house.admoldhousesortedit({
+        id: row.id,
+        sort: row.sort,
+      }).then(data => {
+        this.$msgs(`已保存!`)
+        this.fetchData()
+      })
+    },
+    delHandle(row) {
+      this.$msg(`您确定要删除该楼盘吗?`, 'confirm', () => {
+        this.$api.other.admchannelsdel({
+          id: row.id,
+          status: 2
+        }).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>

Неке датотеке нису приказане због велике количине промена