Commit c20a0742 authored by 罗超's avatar 罗超

部分样式调整

parent d78bb9f2
...@@ -288,7 +288,9 @@ ...@@ -288,7 +288,9 @@
} }
.bold { .bold {
font-family: "PingFangR" /* font-family: "PingFangR" */
font-family: "MUIL";
font-weight: 600;
} }
.clearfix:after { .clearfix:after {
......
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
<p style="padding-left:25px;padding-top:20px;" class="c11 bold">资产状态占比</p> <p style="padding-left:25px;padding-top:20px;" class="c11 bold">资产状态占比</p>
<el-row v-for="(item,index) in StatusList" :key="index" class="ziItem"> <el-row v-for="(item,index) in StatusList" :key="index" class="ziItem">
<el-col :span="14"> <el-col :span="14">
<p>资产{{item.Name}}</p> <p style="font-family:'muil';font-size:16px;font-weight: 600;">资产{{item.Name}}</p>
<p style="margin-top:6px"><span class="sl">数量</span> {{item.Count}}</p> <p style="margin-top:6px;"><span class="sl">数量</span> <span style="font-family:'muil';font-size:24px;font-weight: 600;margin-left: 5px;">{{item.Count}}</span></p>
</el-col> </el-col>
<el-col :span="10" style="text-align:right"> <el-col :span="10" style="text-align:right">
<el-progress class="progressDiv" type="circle" :percentage="item.percent" color="#089bab" :stroke-width="12" :width="86"></el-progress> <el-progress class="progressDiv" type="circle" :percentage="item.percent" color="#089bab" :stroke-width="12" :width="86"></el-progress>
......
...@@ -6,17 +6,17 @@ export default { ...@@ -6,17 +6,17 @@ export default {
apiurl: '' apiurl: ''
}, },
install(Vue, options) { install(Vue, options) {
Vue.prototype.isOnline = function () { Vue.prototype.isOnline = function() {
return process.env.NODE_ENV !== 'development'; return process.env.NODE_ENV !== 'development';
}, },
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function() {
// var domainUrl = "http://test_reborn.oytour.com";//主域名 // var domainUrl = "http://test_reborn.oytour.com";//主域名
// var domainUrl = "http://reborn.oytour.com"; //主域名 // var domainUrl = "http://reborn.oytour.com"; //主域名
var domainUrl = "http://192.168.2.17:8087"; //主域名 var domainUrl = "http://192.168.2.17:8087"; //主域名
let locationName = window.location.hostname; let locationName = window.location.hostname;
let javaUrldo=""; let javaUrldo = "";
javaUrldo=locationName.indexOf('zcyx') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://property.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.17:8087"; javaUrldo = locationName.indexOf('zcyx') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://property.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.17:8087";
if (this.isOnline()) { if (this.isOnline()) {
if (window.location.host.indexOf('testb2b.oytour.com') != -1) if (window.location.host.indexOf('testb2b.oytour.com') != -1)
domainUrl = "http://testapi.oytour.com" domainUrl = "http://testapi.oytour.com"
...@@ -32,8 +32,8 @@ export default { ...@@ -32,8 +32,8 @@ export default {
//常用提交数据URL //常用提交数据URL
PostUrl: domainUrl + "/api/common/post", PostUrl: domainUrl + "/api/common/post",
// javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('testb2b.oytour.com') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.215:9000", // javaUrl: locationName.indexOf('oytour') !== -1 || locationName.indexOf('testb2b.oytour.com') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://efficient.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.215:9000",
javaUrl: locationName.indexOf('zcyx') == -1 ? "http://192.168.2.17:8087" : locationName.indexOf('zcyx.oytour.com') !== -1 ? "http://property.oytour.com" : "http://192.168.2.17:8087", javaUrl: locationName.indexOf('zcyx') == -1 ? "http://property.oytour.com" : locationName.indexOf('zcyx.oytour.com') !== -1 ? "http://property.oytour.com" : "http://192.168.2.17:8087",
// javaUrl: "http://192.168.2.17:8087", // javaUrl: "http://192.168.2.17:8087",
// javaUrl: "http://property.oytour.com", // javaUrl: "http://property.oytour.com",
ViittoFileUrl: locationName.indexOf('zcyx') !== -1 || locationName.indexOf('zcyx.oytour.com') !== -1 ? "http://staticfile.oytour.com" : 'http://192.168.2.214:8130', ViittoFileUrl: locationName.indexOf('zcyx') !== -1 || locationName.indexOf('zcyx.oytour.com') !== -1 ? "http://staticfile.oytour.com" : 'http://192.168.2.214:8130',
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
}; };
return obj; return obj;
}, },
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) { Vue.prototype.GetLocalFile = function(cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().LocalFileStreamDownLoadUrl; var apiurl = this.domainManager().LocalFileStreamDownLoadUrl;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
if (!localStorage.zcuserInfo && localStorage.zcuserInfo != "" && this.$route.path.toLowerCase() != "/login") { if (!localStorage.zcuserInfo && localStorage.zcuserInfo != "" && this.$route.path.toLowerCase() != "/login") {
...@@ -80,60 +80,60 @@ export default { ...@@ -80,60 +80,60 @@ export default {
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
successCall(res); successCall(res);
}).catch(function (res) {}); }).catch(function(res) {});
}, },
Vue.prototype.JavaGetLocalFile = function (cmd, msg, fileName, successCall) { Vue.prototype.JavaGetLocalFile = function(cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().JavaLocalFileStreamDownLoadUrl + cmd; var apiurl = this.domainManager().JavaLocalFileStreamDownLoadUrl + cmd;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
if (!localStorage.zcuserInfo && localStorage.zcuserInfo != "" && this.$route.path.toLowerCase() != "/login") { if (!localStorage.zcuserInfo && localStorage.zcuserInfo != "" && this.$route.path.toLowerCase() != "/login") {
this.$router.push({ this.$router.push({
path: '/login' path: '/login'
}) })
} }
var token = ""; var token = "";
var key = ""; var key = "";
if (this.getLocalStorage() != null) { if (this.getLocalStorage() != null) {
token = this.getLocalStorage().token; token = this.getLocalStorage().token;
key = this.getLocalStorage().SecretKey; key = this.getLocalStorage().SecretKey;
} }
let zcuserInfo = localStorage.zcuserInfo ? JSON.parse(localStorage.zcuserInfo) : ''; let zcuserInfo = localStorage.zcuserInfo ? JSON.parse(localStorage.zcuserInfo) : '';
let groupId = zcuserInfo.RB_Group_id ? zcuserInfo.RB_Group_id : 0; let groupId = zcuserInfo.RB_Group_id ? zcuserInfo.RB_Group_id : 0;
let uid = zcuserInfo.EmployeeId ? zcuserInfo.EmployeeId : 0; let uid = zcuserInfo.EmployeeId ? zcuserInfo.EmployeeId : 0;
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase(); var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
// var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`); // var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var md5Str = md5(`msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`); var md5Str = md5(`msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = { var postData = {
"msg": msg, "msg": msg,
"timestamp": timestamp, "timestamp": timestamp,
"token": token, "token": token,
"sign": md5Str, "sign": md5Str,
"uid": uid, "uid": uid,
"groupId": groupId "groupId": groupId
} }
// var postData = { // var postData = {
// "msg": msg, // "msg": msg,
// "cmd": cmd, // "cmd": cmd,
// "timestamp": timestamp, // "timestamp": timestamp,
// "token": token, // "token": token,
// "sign": md5Str // "sign": md5Str
// } // }
this.$http.post(apiurl, postData, { this.$http.post(apiurl, postData, {
responseType: 'arraybuffer' responseType: 'arraybuffer'
}).then((res) => { }).then((res) => {
let blob = new Blob([res.data], { let blob = new Blob([res.data], {
type: "application/vnd.ms-excel" type: "application/vnd.ms-excel"
}) })
let url = URL.createObjectURL(blob); let url = URL.createObjectURL(blob);
let link = document.createElement('a'); let link = document.createElement('a');
link.href = url; link.href = url;
link.setAttribute("download", fileName); link.setAttribute("download", fileName);
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
successCall(res); successCall(res);
}).catch(function (res) {}); }).catch(function(res) {});
}, },
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun //价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue.prototype.moneyFormat = function (value) { Vue.prototype.moneyFormat = function(value) {
let nStr = Number(value).toFixed(2) let nStr = Number(value).toFixed(2)
nStr += ''; nStr += '';
let x = nStr.split('.'); let x = nStr.split('.');
...@@ -141,12 +141,12 @@ export default { ...@@ -141,12 +141,12 @@ export default {
let x2 = x.length > 1 ? '.' + x[1] : ''; let x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/; var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) { while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2'); x1 = x1.replace(rgx, '$1' + ',' + '$2');
} }
return x1 + x2; return x1 + x2;
}, },
//消息成功提示 //消息成功提示
Vue.prototype.Success = function (msg) { Vue.prototype.Success = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
}); });
}, },
//错误提示 //错误提示
Vue.prototype.Error = function (msg) { Vue.prototype.Error = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -163,7 +163,7 @@ export default { ...@@ -163,7 +163,7 @@ export default {
}, },
//一般提示 //一般提示
Vue.prototype.Info = function (msg) { Vue.prototype.Info = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
}); });
}, },
//警告提示 //警告提示
Vue.prototype.Warning = function (msg) { Vue.prototype.Warning = function(msg) {
this.$message({ this.$message({
message: msg, message: msg,
duration: 2000, duration: 2000,
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
}); });
}, },
//Confirm //Confirm
Vue.prototype.Confirm = function (msg, callback) { Vue.prototype.Confirm = function(msg, callback) {
this.$confirm(msg, "提示", { this.$confirm(msg, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
...@@ -199,7 +199,7 @@ export default { ...@@ -199,7 +199,7 @@ export default {
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定 //type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽 // w : 宽
// h : 高 // h : 高
Vue.prototype.compressImg = function (path, type, w, h) { Vue.prototype.compressImg = function(path, type, w, h) {
let url = this.domainManager().UploadUrl; let url = this.domainManager().UploadUrl;
let poise = 'width='; let poise = 'width=';
w = w ? w : '' w = w ? w : ''
...@@ -211,13 +211,13 @@ export default { ...@@ -211,13 +211,13 @@ export default {
} }
return path.split('?')[0] + '?width=' + w; return path.split('?')[0] + '?width=' + w;
} }
//打开新窗口连接 //打开新窗口连接
Vue.prototype.OpenNewUrl = function (URL) { Vue.prototype.OpenNewUrl = function(URL) {
if (URL != '') { if (URL != '') {
window.open('http://' + URL, '_blank'); window.open('http://' + URL, '_blank');
} }
} }
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) { Vue.prototype.apipost = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
...@@ -243,7 +243,7 @@ export default { ...@@ -243,7 +243,7 @@ export default {
} }
if (localStorage.g && localStorage.g != 'undefined') { if (localStorage.g && localStorage.g != 'undefined') {
// postData.groupId = parseInt(JSON.parse(localStorage.g).i) // postData.groupId = parseInt(JSON.parse(localStorage.g).i)
postData.groupId=2; postData.groupId = 2;
} }
this.$http.post(apiurl, postData, { this.$http.post(apiurl, postData, {
headers: { headers: {
...@@ -251,7 +251,7 @@ export default { ...@@ -251,7 +251,7 @@ export default {
'Referer-Viitto': this.$route.path 'Referer-Viitto': this.$route.path
} }
}) })
.then(res => { .then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) { if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({ this.$router.push({
path: '/login' path: '/login'
...@@ -262,98 +262,98 @@ export default { ...@@ -262,98 +262,98 @@ export default {
successCall(res) successCall(res)
} }
}, faildCall) }, faildCall)
}, },
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) { Vue.prototype.apiJavaPost = function(cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
var apiurl = this.domainManager().javaUrl + cmd; var apiurl = this.domainManager().javaUrl + cmd;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
this.apiurl = apiurl; this.apiurl = apiurl;
var token = ""; var token = "";
var key = ""; var key = "";
let zcuserInfo = localStorage.zcuserInfo ? JSON.parse(localStorage.zcuserInfo) : '' let zcuserInfo = localStorage.zcuserInfo ? JSON.parse(localStorage.zcuserInfo) : ''
if (this.getLocalStorage() != null) { if (this.getLocalStorage() != null) {
token = this.getLocalStorage().token; token = this.getLocalStorage().token;
key = this.getLocalStorage().secretKey; key = this.getLocalStorage().secretKey;
} }
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase(); var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`msg=YXZCGL2020&timestamp=${timestamp}&token=${token}&key=${key}`); var md5Str = md5(`msg=YXZCGL2020&timestamp=${timestamp}&token=${token}&key=${key}`);
// var md5Str = md5(`msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`); // var md5Str = md5(`msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = { var postData = {
"msg": msg, "msg": msg,
"timestamp": timestamp, "timestamp": timestamp,
"token": token, "token": token,
"sign": md5Str "sign": md5Str
} }
if (localStorage.g && localStorage.g != 'undefined') { if (localStorage.g && localStorage.g != 'undefined') {
// postData.groupId = parseInt(JSON.parse(localStorage.g).i) // postData.groupId = parseInt(JSON.parse(localStorage.g).i)
postData.groupId=2; postData.groupId = 2;
} }
this.$http.post(apiurl, postData,{ this.$http.post(apiurl, postData, {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path 'Referer-Viitto': this.$route.path
} }
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
})
} else if (res.data.resultCode == 10005) {
this.$router.go(-1)
} else{
successCall(res)
}
}, faildCall)
},
Vue.prototype.getLocalStorage = function () {
var localStorageData = window.localStorage["zcuserInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') {
return JSON.parse(localStorageData);
} else {
return null;
}
},
//上传文件到本地服务器
Vue.prototype.UploadSelfFileT = function (path, files, successCall, ocr) {
if (files && files.length > 0) {
let nameList = new Array()
for (let index = 0; index < files.length; index++) {
nameList.push(this.random_string());
}
let that = this;
co(function* () {
for (let index = 0; index < files.length; index++) {
let fileName = nameList[index]
fileName = path + fileName + "." + files[index].name.split('.').pop()
var formData = new FormData();
var uploadUrl = that.domainManager().UploadUrl + "/Upload?filePath=" + path + '&ocr=' + ocr;
formData.append("myfile", files[index]);
that.$http.post(uploadUrl, formData, {})
.then(res => {
successCall(res);
}) })
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
})
} else if (res.data.resultCode == 10005) {
this.$router.go(-1)
} else {
successCall(res)
}
}, faildCall)
},
Vue.prototype.getLocalStorage = function() {
var localStorageData = window.localStorage["zcuserInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') {
return JSON.parse(localStorageData);
} else {
return null;
}
},
//上传文件到本地服务器
Vue.prototype.UploadSelfFileT = function(path, files, successCall, ocr) {
if (files && files.length > 0) {
let nameList = new Array()
for (let index = 0; index < files.length; index++) {
nameList.push(this.random_string());
}
let that = this;
co(function*() {
for (let index = 0; index < files.length; index++) {
let fileName = nameList[index]
fileName = path + fileName + "." + files[index].name.split('.').pop()
var formData = new FormData();
var uploadUrl = that.domainManager().UploadUrl + "/Upload?filePath=" + path + '&ocr=' + ocr;
formData.append("myfile", files[index]);
that.$http.post(uploadUrl, formData, {})
.then(res => {
successCall(res);
})
}
}).catch(function(err) {
});
} }
}).catch(function (err) {
});
}
}
Vue.prototype.random_string = function (len) {
len = len || 32;
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
var maxPos = chars.length;
var pwd = '';
for (let i = 0; i < len; i++) {
pwd += chars.charAt(Math.floor(Math.random() * maxPos));
} }
return pwd; Vue.prototype.random_string = function(len) {
}, len = len || 32;
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
var maxPos = chars.length;
var pwd = '';
for (let i = 0; i < len; i++) {
pwd += chars.charAt(Math.floor(Math.random() * maxPos));
}
return pwd;
},
//验证只能输入2位小数 //验证只能输入2位小数
Vue.prototype.checkPrice = function (item, filed) { Vue.prototype.checkPrice = function(item, filed) {
var value = ""; var value = "";
if (typeof item[filed] == "string") { if (typeof item[filed] == "string") {
value = item[filed]; value = item[filed];
...@@ -373,8 +373,8 @@ export default { ...@@ -373,8 +373,8 @@ export default {
} }
item[filed] = value; item[filed] = value;
} }
//验证只能输入整数 //验证只能输入整数
Vue.prototype.checkInteger = function (item, filed) { Vue.prototype.checkInteger = function(item, filed) {
var value = ""; var value = "";
if (typeof item[filed] == "string") { if (typeof item[filed] == "string") {
value = item[filed]; value = item[filed];
......
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