Commit 7374f700 authored by 黄奎's avatar 黄奎

页面修改

parent 1b3f93c2
......@@ -82,7 +82,8 @@
<p>{{detailsData.SurName + detailsData.Name}}</p>
</div>
<div class="right" v-if="!hiddenMenu">
<el-button class="crm-btn query-btn" @click="editCust">编辑</el-button>
<el-button class="crm-btn query-btn" @click="editCust" v-if="detailsData.IsCreate==1||detailsData.IsRead==1">编辑
</el-button>
<el-dropdown @command="handleCommand" style="top: 1px;" v-if="detailsData.IsCreate==1">
<el-button class="crm-btn crm-btn-more easy-btn margin-right0">
<i class="iconfont icongengduo"></i>
......
......@@ -16,56 +16,39 @@ import languageUtils from './assets/utils/languageUtils' //引入语言转换帮
import moment from 'moment'
import co from 'co'
import MsgBus from './plugins/event-bus'
import { location } from "./assets/utils/getLocation"
import {
location
} from "./assets/utils/getLocation"
import 'xe-utils'
import vueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import pinyin from 'pinyin'
Vue.prototype.pinyin = pinyin
// import VXETable from 'vxe-table'
// import 'vxe-table/lib/index.css'
// import tinymce from 'tinymce/tinymce'
// import Editor from '@tinymce/tinymce-vue'
// import 'tinymce/themes/silver'
// 使用Vue.use()方法就会调用工具方法中的install方法
Vue.use(htmlToPdf)
Vue.use(VueLazyload)
// Vue.use(VXETable)
Vue.use(vueQuillEditor)
// Vue.use(VueLazyload, {
// preLoad: 1.3,
// error: '../src/assets/img/banner@3x.png',
// loading: '../src/assets/img/loader.gif',
// attempt: 1
// })
Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(plug)
Vue.http = Vue.prototype.$http = axios
Vue.commonUtils = Vue.prototype.$commonUtils=commonUtils
Vue.languageUtils=Vue.prototype.$languageUtils=languageUtils
Vue.commonUtils = Vue.prototype.$commonUtils = commonUtils
Vue.languageUtils = Vue.prototype.$languageUtils = languageUtils
Vue.prototype.MsgBus = MsgBus
Vue.prototype.$echarts = echarts
String.prototype.IsPicture = function() {
String.prototype.IsPicture = function () {
//判断是否是图片 - strFilter必须是小写列举
var strFilter=".jpeg|.gif|.jpg|.png|.bmp|.pic|"
if(this.indexOf(".")>-1)
{
var strFilter = ".jpeg|.gif|.jpg|.png|.bmp|.pic|"
if (this.indexOf(".") > -1) {
var p = this.lastIndexOf(".");
//alert(p);
//alert(this.length);
var strPostfix=this.substring(p,this.length) + '|';
var strPostfix = this.substring(p, this.length) + '|';
strPostfix = strPostfix.toLowerCase();
//alert(strPostfix);
if(strFilter.indexOf(strPostfix)>-1)
{
//alert("True");
if (strFilter.indexOf(strPostfix) > -1) {
return true;
}
}
//alert('False');
return false;
}
router.beforeEach((to, from, next) => {
......@@ -75,12 +58,12 @@ router.beforeEach((to, from, next) => {
}
sessionStorage.setItem("FromPath", JSON.stringify(msg));
if (to.meta.title) {
if(localStorage.g && localStorage.g!='undefined'){
if(JSON.parse(localStorage.g).i!=2)
document.title = to.meta.title.split('-')[0]+'-'+JSON.parse(localStorage.g).n
if (localStorage.g && localStorage.g != 'undefined') {
if (JSON.parse(localStorage.g).i != 2)
document.title = to.meta.title.split('-')[0] + '-' + JSON.parse(localStorage.g).n
else
document.title = to.meta.title
}else{
} else {
document.title = to.meta.title
}
}
......@@ -107,9 +90,9 @@ Vue.prototype.getNowDate = function () {
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
+ " " + date.getHours() + seperator2 + date.getMinutes()
+ seperator2 + date.getSeconds();
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate +
" " + date.getHours() + seperator2 + date.getMinutes() +
seperator2 + date.getSeconds();
return currentdate;
}
Vue.prototype.DateDiff = function (sDate1, sDate2) {
......@@ -118,10 +101,10 @@ Vue.prototype.DateDiff = function (sDate1, sDate2) {
oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])
aDate = sDate2.split("-")
oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])
iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 /24) //把相差的毫秒数转换为天数
iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24) //把相差的毫秒数转换为天数
return iDays
}
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue.prototype.moneyFormat = function (value) {
if (!value) {
return 0.00
......@@ -138,7 +121,7 @@ Vue.prototype.moneyFormat = function (value) {
return x1 + x2;
},
// 注册
Vue.filter('priceFormat', function (value) {
Vue.filter('priceFormat', function (value) {
if (value == null) {
return 0.00;
}
......@@ -152,16 +135,15 @@ Vue.filter('priceFormat', function (value) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
})
// 不要小数点
Vue.filter('NoDesnum', function (value) {
})
// 不要小数点
Vue.filter('NoDesnum', function (value) {
if (value == null) {
return 0.00;
}
else if(value<1){
} else if (value < 1) {
return value;
}
else{
} else {
let nStr = Number(value).toFixed(0)
nStr += '';
let x = nStr.split('.');
......@@ -177,15 +159,17 @@ Vue.filter('priceFormat', function (value) {
})
// 时间格式YYYY-MM-DD
Vue.filter("YMD", function (date) {
return moment(date).format("YYYY-MM-DD");
})
Vue.filter("MD", function (date) {
return moment(date).format("MM月DD日");
})
Vue.filter("YMDHMS", function (date) {
return moment(date).format("YYYY-MM-DD HH:mm:ss");
})
Vue.prototype.random_string = function (len) {
len = len || 32;
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
......@@ -195,9 +179,9 @@ Vue.prototype.random_string = function (len) {
pwd += chars.charAt(Math.floor(Math.random() * maxPos));
}
return pwd;
},
//上传文件到本地服务器
Vue.prototype.UploadSelfFileT = function (path, files, successCall) {
},
//上传文件到本地服务器
Vue.prototype.UploadSelfFileT = function (path, files, successCall) {
if (files && files.length > 0) {
let nameList = new Array()
for (let index = 0; index < files.length; index++) {
......
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