zhangqiOMG 3 years ago
parent
commit
f1b9210f6d

+ 72 - 0
src/HManagement/siteManage/advertisement_mag/index.vue

@@ -0,0 +1,72 @@
+<template>
+  <div style="padding:0 20px">
+    <el-row :gutter="20">
+      <el-col :span="8" v-for="card in list" :key="card.index" style="margin:20px 0">
+        <el-card shadow="none" >
+          <el-carousel :interval="5000" arrow="always">
+            <el-carousel-item v-for="item in card.ads" :key="item.index">
+              <img style="width:100%" :src="item.attinfos[0]?item.attinfos[0].url:''" alt="">
+              <!-- <previewImage style="width:100%" :image="item.attinfos[0]?item.attinfos[0]:''"></previewImage> -->
+            </el-carousel-item>
+          </el-carousel>
+          <div>
+            <p>{{card.notes}} <small style="float:right;color:#999">{{card.dimensional}}</small></p>
+            <div class="flex">
+              <div>
+                <el-tag style="margin:10px 10px 0 0">{{card.systemclient}}</el-tag>
+                <el-tag>{{card.location}}</el-tag>
+              </div>
+              <setting :banner="card.ads" :sys_adspaceid="card.sys_adspaceid " @onSuccess="listData"></setting>
+              <!-- <i style="font-size:16px;color:#666" class="el-icon-setting"></i> -->
+            </div>
+          </div>
+        </el-card>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import previewImage from '@/components/previewImage/index.vue'
+import setting from './modules/setting.vue'
+export default {
+  components:{
+    setting,
+    previewImage
+  },
+  data () {
+    return {
+      list:[]
+    }
+  },
+  methods:{
+    listData () {
+      this.$api.requested({
+        "classname": "webmanage.adspace.adspace",
+        "method": "query_adspacelist",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+        }
+      }).then(res=>{
+        this.list = res.data
+      })
+    }
+  },
+  mounted () {
+    this.listData()
+  }
+}
+
+</script>
+<style>
+
+</style>
+<style scoped>
+.flex{
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  /* cursor: pointer; */
+}
+</style>

+ 183 - 0
src/HManagement/siteManage/advertisement_mag/modules/setting.vue

@@ -0,0 +1,183 @@
+<template>
+  <div>
+    <el-button type="text" icon="el-icon-setting" @click="drawer = true">设 置</el-button>
+    <el-drawer
+      title="设置宣传图"
+      :visible.sync="drawer"
+      direction="rtl"
+      size="424px">
+      <div style="padding:20px">
+        <uploadImg btntype="limage" :folderid="folderid" accept=".JPG,.PNG" :bindData="{ownertable:'sys_ad',ownerid:sys_adspaceid,usetype:'default'}" @onSuccess="onSuccess"></uploadImg>
+        <div v-for="(item,index) in banner" :key="index" class="banner_item">
+          <img style="width:100%" :src="item.attinfos[0]?item.attinfos[0].url:''" alt="">
+          <!-- <previewImage :image="item.attinfos[0]?item.attinfos[0]:''"></previewImage> -->
+          <div class="model">
+            <i class="el-icon-edit" style="font-size:36px;" @click="onEdit(item,index)"></i>
+            <i class="el-icon-delete" style="font-size:36px" @click="deleteData(item,index)"></i>
+          </div>
+        </div>
+      </div>
+    </el-drawer>
+    <el-dialog title="图片设置" :visible.sync="dialogFormVisible" width="500px">
+      <el-form label-width="100px" label-position	="left" size="small" :model="form" :rules="rules" ref="ruleForm">
+        <el-form-item label="链接地址" prop="hyperlink">
+          <el-input v-model="form.hyperlink" autocomplete="off" placeholder="输入链接地址" clearable></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false" size="small">取 消</el-button>
+        <el-button type="primary" @click="insertormodify_bannermag('ruleForm')" size="small">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import previewImage from '@/components/previewImage/index.vue'
+
+import uploadImg from '@/components/upload/hw_obs_upload.vue'
+export default {
+  props:['sys_adspaceid','banner'],
+  components:{
+    uploadImg,
+    previewImage
+  },
+  data () {
+    return {
+      rules: {
+        hyperlink: [
+          { required: true, message: '输入链接地址', trigger: 'blur' },
+        ]
+      },
+      drawer:false,
+      dialogFormVisible:false,
+      form:{},
+      date: function () {
+        let date = (new Date()).getTime()
+        return date
+      },
+      selectBanner:{},
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
+    }
+  },
+  methods:{
+    async onSuccess(res){
+      const bindata = await this.create()
+      this.bindFileData(bindata,res)
+    },
+    // 创建一条banner记录
+    create () {
+      return new Promise((reslove,reject)=>{
+        this.$api.requested({
+         "classname": "webmanage.adspace.adspace",
+          "method": "insertormodify_ad",
+          "content": {
+            "sys_adspaceid": this.sys_adspaceid,
+            "sys_adid": 0,
+            "hyperlink":"",
+            "isused": 1
+          }
+        }).then(res=>{
+          reslove(res.data)
+        })
+      })
+    },
+    // 绑定附件信息
+    async bindFileData(bindata,fileData) {
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "createFileLink",
+        "content": {
+          "ownertable": 'sys_ad',
+          "ownerid": bindata.sys_adid,
+          "usetype": "default",
+          "attachmentids": [
+            fileData.data.attachmentids[0]
+          ]
+        }
+      })
+      res.code === 1?this.$emit('onSuccess'):""
+    },
+    deleteData (item,index) {
+       this.$api.requested({
+        "classname": "webmanage.adspace.adspace",
+        "method": "delete_ad",
+        "content": {
+            "sys_adspaceid": this.sys_adspaceid,
+            "sys_adid": item.sys_adid
+        }
+      }).then(res=>{
+        this.tool.showMessage(res,(e=>{
+          this.$emit('onSuccess')
+          this.banner.splice(index,1)
+        }))
+      })
+    },
+    onEdit (item,index) {
+      this.form = {
+        "sys_adspaceid": item.sys_adspaceid,
+        "sys_adid": item.sys_adid,
+        "hyperlink":item.hyperlink,
+        "isused": item.isused
+      }
+      this.selectBanner = item
+      this.dialogFormVisible = true
+      this.drawer = false
+    },
+    insertormodify_bannermag (formName) {
+      let param = {
+        "classname": "webmanage.adspace.adspace",
+        "method": "insertormodify_ad",
+        "content": {
+            "sys_adspaceid": this.form.sys_adspaceid,
+            "sys_adid": this.form.sys_adid,
+            "hyperlink":this.form.hyperlink,
+            "isused": this.form.isused
+        }
+      }
+      this.$refs[formName].validate((valid) => {
+        if (!valid) return false;
+        this.$api.requested(param).then(res=>{
+          this.tool.showMessage(res,(e=>{
+            this.dialogFormVisible = false
+            this.drawer = true
+            this.$emit('onSuccess')
+          }))
+        })
+      })
+    }
+  }
+}
+
+</script>
+<style>
+</style>
+<style scoped>
+.banner_item{
+  position: relative;
+  min-height: 200px;
+  /* width: 100%; */
+  border: 1px solid #999;
+  border-radius:5px;
+  margin: 15px 0;
+  overflow: hidden;
+  cursor: pointer;
+  
+}
+.model{
+  
+  position: absolute;
+  display: none;
+  align-items: center;
+  justify-content: space-around;
+  width:100%;
+  height: 100%;
+  top:0;
+  left:0;
+  color: #fff;
+  background: rgba(0,0,0,0.5);
+}
+.banner_item:hover .model{
+ display: flex;
+}
+</style>

+ 1 - 0
yos/css/250.39364e34.css

@@ -0,0 +1 @@
+.title[data-v-0e4e8f4b]{height:20px;line-height:20px;font-size:14px;text-indent:7px;font-weight:700;color:#333;margin-bottom:20px;border-left:4px solid #3874f6}.mb-40[data-v-0e4e8f4b]{margin-bottom:40px}

+ 1 - 0
yos/css/380.39364e34.css

@@ -0,0 +1 @@
+.title[data-v-0e4e8f4b]{height:20px;line-height:20px;font-size:14px;text-indent:7px;font-weight:700;color:#333;margin-bottom:20px;border-left:4px solid #3874f6}.mb-40[data-v-0e4e8f4b]{margin-bottom:40px}

+ 1 - 0
yos/css/388.146b4ad1.css

@@ -0,0 +1 @@
+.el-input-group__append,.el-input-group__prepend{background-color:#4f7bfd;color:#fff;border:1px solid #4f7bfd;cursor:pointer}.search-panel p[data-v-30b891b2]{flex:1 0 auto;width:40px;font-size:14px}.dialog-footer[data-v-2aabbbe0],.dialog-footer[data-v-48c8820a]{margin-top:32px;text-align:center}.role_panel{padding:10px;border:1px solid #ebe3e3;font-size:.875rem;cursor:pointer;border-radius:4px;color:#666;transition:.2s linear}.on[data-v-0096b51c]{border:1px solid #4f7bfd;background:#4f7bfd;color:#fff}.title[data-v-0e4e8f4b]{height:20px;line-height:20px;font-size:14px;text-indent:7px;font-weight:700;color:#333;margin-bottom:20px;border-left:4px solid #3874f6}.mb-40[data-v-0e4e8f4b]{margin-bottom:40px}.borderRight[data-v-4cff6729]{border-right:1px solid #ccc}

File diff suppressed because it is too large
+ 0 - 0
yos/css/about.16b9f500.css


File diff suppressed because it is too large
+ 0 - 0
yos/css/app.ab7948cf.css


BIN
yos/favicon.ico


BIN
yos/fonts/element-icons.f1a45d74.ttf


BIN
yos/fonts/element-icons.ff18efd1.woff


BIN
yos/fonts/iconfont.25db8086.woff2


BIN
yos/fonts/iconfont.9fd356c2.woff


BIN
yos/fonts/iconfont.ba590032.ttf


BIN
yos/img/bg.e258adac.png


File diff suppressed because it is too large
+ 34 - 0
yos/img/iconfont.69177fb1.svg


+ 1 - 0
yos/img/more.58cd973b.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22"><defs><style>.a{fill:none;}.b{fill:#fff;}</style></defs><g transform="translate(-262.326 -384.891)"><rect class="a" width="22" height="22" transform="translate(262.326 384.891)"/><g transform="translate(63.177 -349.635)"><rect class="b" width="22" height="2" rx="1" transform="translate(199.149 735.525)"/><rect class="b" width="22" height="2" rx="1" transform="translate(199.149 744.166)"/><rect class="b" width="22" height="2" rx="1" transform="translate(199.149 752.806)"/></g></g></svg>

+ 1 - 0
yos/img/work_station.550df9c4.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"><defs><style>.a{fill:none;}.b{fill:#fff;}</style></defs><g transform="translate(80 -466)"><rect class="a" width="30" height="30" transform="translate(-80 466)"/><path class="b" d="M86.087,724.24l-4.151,4.15a2.607,2.607,0,0,1-3.688,0L74.1,724.24a2.608,2.608,0,0,1,0-3.689l4.151-4.151a2.607,2.607,0,0,1,3.688,0l4.151,4.151a2.608,2.608,0,0,1,0,3.689Zm-16.757,17.4H63.46a2.608,2.608,0,0,1-2.609-2.609v-5.87a2.609,2.609,0,0,1,2.609-2.609h5.87a2.609,2.609,0,0,1,2.609,2.609v5.87a2.608,2.608,0,0,1-2.609,2.609Zm0-13.7H63.46a2.609,2.609,0,0,1-2.609-2.609v-5.87a2.608,2.608,0,0,1,2.609-2.609h5.87a2.609,2.609,0,0,1,2.609,2.609v5.87a2.609,2.609,0,0,1-2.609,2.609Zm7.827,2.609h5.87a2.609,2.609,0,0,1,2.609,2.609v5.87a2.608,2.608,0,0,1-2.609,2.609h-5.87a2.608,2.608,0,0,1-2.609-2.609v-5.87a2.609,2.609,0,0,1,2.609-2.609Zm0,0" transform="translate(-138.851 -247.636)"/></g></svg>

+ 1 - 0
yos/index.html

@@ -0,0 +1 @@
+<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>yos_manage</title><script defer="defer" type="module" src="js/chunk-vendors.c9090366.js"></script><script defer="defer" type="module" src="js/app.13346b41.js"></script><link href="css/app.ab7948cf.css" rel="stylesheet"><script defer="defer" src="js/chunk-vendors-legacy.7ae3c426.js" nomodule></script><script defer="defer" src="js/app-legacy.050e9680.js" nomodule></script></head><body><noscript><strong>We're sorry but yos_manage doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

File diff suppressed because it is too large
+ 0 - 0
yos/js/250.501b3292.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/380-legacy.2fdd55da.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/388-legacy.fe6a2bf3.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/388.cb9ca86c.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/457-legacy.a811cd1d.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/457.ba340fac.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/774.28633773.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/about-legacy.5e5f4464.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/about.589beedc.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/app-legacy.050e9680.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/app.13346b41.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/chunk-vendors-legacy.7ae3c426.js


File diff suppressed because it is too large
+ 0 - 0
yos/js/chunk-vendors.c9090366.js


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