Commit 6c917da7 authored by 罗超's avatar 罗超

1

parent 9eb7ee7d
......@@ -21,6 +21,7 @@
"html2canvas": "^1.0.0-rc.7",
"js-md5": "^0.7.3",
"lockr": "^0.8.5",
"lrz": "^4.9.41",
"mavon-editor": "^2.9.1",
"print-js": "^1.6.0",
"qrcodejs2": "0.0.2",
......
......@@ -124,6 +124,18 @@
border-radius: 4px;
font-size: 12px;
}
.advmanager-box .content .label-box{
top: 40px;
left: 15px;
position: absolute;
background:rgba(0,0,0,.5);
color: #f5f5f5;
padding:0px 5px;
border-radius: 4px;
font-size: 12px;
display: inline-block;
width: 200px;
}
.advmanager-box .query-box ul .el-input{
width: 150px;
}
......@@ -138,6 +150,7 @@
font-size: 12px;
display: inline-block;
}
.advmanager-box .content .img-box .star-box .star{
color: #eb3b5a
}
......
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import Erpindex from '../utils/erpindex'
import Erpindex from '../utils/erpindex'
import axios from 'axios'
import 'vue-easytable/libs/themes-base/index.css'
import {VTable,VPagination} from 'vue-easytable'
import { VTable, VPagination } from 'vue-easytable'
import commonUtils from '../pages/financial/utils/commonUtils'
import 'viewerjs/dist/viewer.css'
import Viewer from 'v-viewer'
import AuthCode from '../pages/financial/utils/AuthCode' //权限编码JS
Vue.http = Vue.prototype.$http = axios
Vue.commonUtils = Vue.prototype.$commonUtils=commonUtils
Vue.AuthCode=Vue.prototype.$AuthCode=AuthCode
Vue.commonUtils = Vue.prototype.$commonUtils = commonUtils
Vue.AuthCode = Vue.prototype.$AuthCode = AuthCode
import lrz from 'lrz'
// 时间扩展格式化
Date.prototype.Format = function (fmt) {
var o = {
......@@ -22,14 +22,15 @@ Date.prototype.Format = function (fmt) {
"m+": this.getMinutes(), //分
"s+": this.getSeconds() //秒
};
if (/(y+)/.test(fmt)){ //根据y的长度来截取年
if (/(y+)/.test(fmt)) { //根据y的长度来截取年
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
}
for (var k in o){
for (var k in o) {
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
}
return fmt;
};
Vue.prototype.lrz = lrz
Vue.use(ElementUI)
Vue.use(Erpindex)
......
......@@ -125,7 +125,7 @@ import {
statusOpts:[
{
label: "收费",
value: 0
value: 1
},
{
label: "免费",
......@@ -135,6 +135,7 @@ import {
}
},
mounted() {
console.log(this.saveObj)
if (this.saveObj&&this.saveObj.ID>0) {
this.addMsg.ID=this.saveObj.ID
this.addMsg.IsFee=this.saveObj.IsFee
......@@ -196,10 +197,16 @@ import {
}
// this.$refs.Name.validate();
// if (!this.$refs.Name.hasError) {
// this.addMsg.LableList = this.dynamicTags;
// SetAdvertising(this.addMsg).then(res=>{
// console.log('179',res)
// })
this.addMsg.LableList = this.dynamicTags;
SetAdvertising(this.addMsg).then(res=>{
if(res.Code===1){
this.Success("操作成功");
this.closeRuleForm();
this.$emit('success');
}else {
this.Error(res.Message);
}
})
// }
},
//关闭窗口
......
......@@ -202,7 +202,8 @@
msg: {
pageIndex: 1,
pageSize: 10,
ActivityName:""
ActivityName:"",
ActivityId:0
},
pageCount: 0,
columns: [
......@@ -287,9 +288,11 @@
},
mounted() {
if(this.$route.query.ActivityName){
if(this.$route.query.name){
this.msg.ActivityName = this.$route.query.name;
}
this.msg.ActivityId = this.$route.query.Id;
this.getList();
},
methods: {
......
......@@ -117,17 +117,63 @@
float: left;
margin-right: 8px;
}
.Sysuser_Date .el-input {
width: 100%;
border: none;
background-color: transparent;
}
.Sysuser_Date .el-input__inner {
width: 100%;
border: none;
background-color: transparent;
}
.syster_qDropdown .q-btn__wrapper {
padding: 0 3px;
min-height: 0 !important;
}
</style>
<template>
<div class="page-body activeType">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<div class="col-12">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.ActivityName" label="活动名称"
@clear="resetSearch" maxlength="20" />
</div>
</div>
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-12 Sysuser_Date">
<q-field filled>
 <template v-slot:control>
<el-date-picker
v-model="msg.SelectStartTimeStr"
type="date"
placeholder="选择开始日期"
value-format="yyyy-MM-dd"
@change="resetSearch">
</el-date-picker>    
</template>
</q-field>
</div>
</div>
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-12 Sysuser_Date">
<q-field filled>
 <template v-slot:control>
<el-date-picker
v-model="msg.SelectEndTimeStr"
type="date"
placeholder="选择结束日期"
value-format="yyyy-MM-dd"
@change="resetSearch"
>
</el-date-picker>    
</template>
</q-field>
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-tow-column-table sticky-right-column-table"
......@@ -211,7 +257,7 @@
<q-item-label>删除</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="goUrl('/activity/activeSignUpList',props.row,1)">
<q-item clickable v-close-popup @click="goUrl('/activity/activeSignUpList',props.row)">
<q-item-section>
<q-item-label>报名列表</q-item-label>
</q-item-section>
......@@ -299,6 +345,8 @@ import ActiveForm from '../../components/activity/active-from'
pageIndex: 1,
pageSize: 5,
ActivityName: '',
SelectStartTimeStr:"",
SelectEndTimeStr:"",
},
pageCount: 0,
activityTypeList:[],
......
......@@ -20,6 +20,11 @@
<div class="star-box">
<i class="iconfont icon-star star"></i>&nbsp; {{props.value.AdvertisingCount}}
</div>
<div class="label-box" v-if="props.value.LableList.length>0">
<div v-for="(item,index) in props.value.LableList" :key="index">
{{ item }}
</div>
</div>
<div class="zezhao">
<i class="el-icon-edit" :title="$t('pub.updateMsg')" @click="update(props.value)"></i>
<i class="el-icon-delete" :title="$t('system.table_delete')" @click="delAD(props.value.ID)" ></i>
......@@ -90,6 +95,7 @@ export default {
}
},
update(x){
console.log(x)
this.showForm=true
this.model=x
},
......
......@@ -283,7 +283,8 @@
checkList: [],
checkAllList: [],
checkAll: false,
imgSrc: ""
imgSrc: "",
scLoad:false
}
},
created() {
......@@ -306,12 +307,11 @@
goBack() {
this.$router.go(-1)
},
//登录后获取上传配置
getUpConfig() {
this.apipostDS("/api/MallBase/GetDefaultFileStore", {}, res => {
if (res.data.resultCode == 1) {
console.log(312, res)
var upData = res.data.data;
localStorage.uploadInfo = JSON.stringify(upData);
} else {
......@@ -540,17 +540,32 @@
})
},
//上传视频
// UploadVideo(file) {
// var that = this;
// UploadViittoFile('Edu/Video', file.file, res => {
// console.log("res",res);
// if (res.Code == 1) {
// this.Success('上传成功')
// that.addpageMsg.Image = res.VideoCoverImg;
// that.addpageMsg.Path = res.FileUrl;
// that.addpageMsg.Name = res.FileName;
// that.addPageList();
// that.$forceUpdate();
// }
// })
// },
UploadVideo(file) {
var that = this;
UploadViittoFile('Edu/Video', file.file, res => {
console.log("res",res);
if (res.Code == 1) {
this.Success('上传成功')
that.addpageMsg.Image = res.VideoCoverImg;
that.addpageMsg.Path = res.FileUrl;
that.addpageMsg.Name = res.FileName;
that.addPageList();
that.$forceUpdate();
this.UploadFileToTencent(this.FileType().Video, file.file, res => {
if (res.resultCode == 1) {
this.Success('上传成功')
console.log(561,res)
// if (this.addpageMsg.Type == 2) {
// this.addpageMsg.Image = res.FileUrl;
// }
// this.addpageMsg.Path = res.FileUrl;
// this.addpageMsg.Name = res.FileName;
// this.addPageList();
}
})
},
......@@ -750,6 +765,7 @@
data.forEach(item => {
this.checkAllList.push(item.Id)
item.Selected = false;
console.log(768,item)
})
this.PageList = data;
this.$forceUpdate();
......@@ -783,7 +799,16 @@
num = 3
}
return num;
}
},
captureImage(video) {
let canvas = document.createElement('canvas')
// canvas.width = video.videoWidth
// canvas.height = video.videoHeight
canvas.width = '140px'
canvas.height = '140px'
canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height)
return canvas.toDataURL('image/png')
}
},
}
......
......@@ -11,12 +11,12 @@ export default {
Vue.prototype.MsgBus = MsgBus;
//消息成功提示
Vue.prototype.Success = function (msg) {
this.$message({
message: msg,
duration: 2000,
type: "success"
});
},
this.$message({
message: msg,
duration: 2000,
type: "success"
});
},
//错误提示
Vue.prototype.Error = function (msg) {
this.$message({
......@@ -45,10 +45,10 @@ export default {
//Confirm
Vue.prototype.Confirm = function (msg, callback) {
this.$confirm(msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
if (typeof callback === 'function') {
callback();
......@@ -71,13 +71,13 @@ export default {
Vue.prototype.md5 = md5;
//ERP本地缓存
Vue.prototype.getLocalStorage = function () {
var localStorageData = window.localStorage["loginUserInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') {
return JSON.parse(localStorageData).data;
} else {
return null;
}
},
var localStorageData = window.localStorage["loginUserInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') {
return JSON.parse(localStorageData).data;
} else {
return null;
}
},
//域名管理对象
Vue.prototype.domainManager = function () {
let domainUrl = 'http://192.168.20.24';
......@@ -156,7 +156,7 @@ export default {
document.body.appendChild(link);
link.click();
successCall(res);
}).catch(function (res) {});
}).catch(function (res) { });
},
//HTTP提交数据
......@@ -197,11 +197,11 @@ export default {
"uName": uName //用户名称
}
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
......@@ -263,13 +263,13 @@ export default {
var apiurl = this.domainManager().mallUrl + cmd;
var postData = this.GetPostDataDS(cmd, msg, "");
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {} else if (res.resultCode == 10005) {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) { } else if (res.resultCode == 10005) {
this.$router.go(-1);
} else {
successCall(res);
......@@ -279,17 +279,17 @@ export default {
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue.prototype.moneyFormat = function (value) {
let nStr = Number(value).toFixed(2)
nStr += '';
let x = nStr.split('.');
let x1 = x[0];
let x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
},
let nStr = Number(value).toFixed(2)
nStr += '';
let x = nStr.split('.');
let x1 = x[0];
let x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
},
//验证只能输入整数【负数:isMinus传true】
Vue.prototype.checkInteger = function (item, filed, isMinus) {
var value = "" + item[filed]; //转字符串
......@@ -418,9 +418,9 @@ export default {
if ((fileObj.type == "image/png" || fileObj.type == "image/jpeg") && fileObj.size > maxSize) {
let that = this
lrz(fileObj, {
width: 750,
quality: 0.8
})
width: 750,
quality: 0.8
})
.then(function (rst) {
//成功时执行
var arr = rst.base64.split(',');
......@@ -502,7 +502,7 @@ export default {
Key: newFileName, //文件名
StorageClass: 'STANDARD',
Body: fileObj, // 上传文件对象
onProgress: function (progressData) {}
onProgress: function (progressData) { }
}, function (err, data) {
if (data && data.statusCode == 200) {
var uploadResult = {
......@@ -541,7 +541,7 @@ export default {
var newFileName = str + '/Upload/' + path + "/" + timestamp1 + "" + suffix;
this.Info('上传中...')
var result = oss.multipartUpload(newFileName, fileObj, {
progress: function* (p) {}
progress: function* (p) { }
}).then(res => {
var uploadResult = {
resultCode: 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment