Commit 7dee496f authored by 罗成兵's avatar 罗成兵

代码整合

parent 6d13f0d7
NODE_ENV = dev
VUE_APP_BASE_URL2222 = https://beta-ysservice.yiboshi.com
VUE_APP_BASE_URL1 = https://ys-service.yiboshi.com
VUE_APP_BASE_URL111 = http://59.230.237.90:8115
VUE_APP_BASE_URL111= https://beta-ysservice.yiboshi.com
VUE_APP_BASE_URL2 = https://ys-service.yiboshi.com
VUE_APP_BASE_URL4 = http://59.230.237.90:8115
VUE_APP_BASE_URL = http://127.0.0.1:8083
VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com
VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B'
......
.DS_Store
node_modules
/dist
dist.zip
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
......@@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve-dev": "vue-cli-service serve --mode dev",
"pc-dev": "vue-cli-service serve --mode dev",
"serve-yy": "vue-cli-service serve --mode yueyang",
"build:test": "vue-cli-service build --mode test",
"build:prod": "vue-cli-service build --mode production --report",
......
......@@ -10,7 +10,7 @@
<!--<script src="https://webapi.amap.com/maps?v=1.4.4&key=34bb7ed1b21bfcc5a3ed0b9a66a587ff"></script>-->
<!-- <script src="https://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>-->
<script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"></script>
<!-- <script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"></script>-->
</head>
<body>
<noscript>
......
......@@ -13,7 +13,8 @@ import 'ant-design-vue/dist/antd.less'
// import 'nprogress/nprogress.css'
import Print from 'vue-print-nb'
import './antd/register'
import api from './api'
import api from './api';
// import {optionalChaining} from "./views/utils/common";
import Moment from 'moment';
import './views/utils/directives/debounce'
......@@ -23,8 +24,9 @@ import './views/utils/directives/price'
import './views/utils/directives/remarkNum'
import './views/utils/directives/inputNum'
import {message, modal} from 'ant-design-vue'
import {ApiUtils} from "./utils/ApiUtils"
const {confirm} = modal
Vue.prototype.ApiUtils = ApiUtils;
Vue.prototype.$api = api;
// Vue.prototype.$isNot = optionalChaining; // 非空判断,为空返回 "未知"
Vue.prototype.$message= message
......
import md5 from 'js-md5'
//常用工具方法
export const ApiUtils = {
isBlank: function (obj) {
if (obj == null || obj == undefined || obj == "" || obj == {} || obj == []) {
return true;
}
if (obj === null || obj === undefined || obj === "" || obj === {} || obj === []) {
return true;
}
return false;
},
isNotBlank: function (obj) {
return !this.isBlank(obj);
},
copyObject: function (obj) {
if (this.isBlank(obj)) {
return null;
}
let jsonData = JSON.stringify(obj);
let newObj = JSON.parse(jsonData);
return newObj;
},
getLoginInfo: function () {
let info = sessionStorage.getItem('loginInfo');
let newObj = JSON.parse(info);
return newObj;
},
getAddDayDate(tempDate, dayCount) {
let resultDate = new Date((tempDate / 1000 + (86400 * dayCount)) * 1000);//增加n天后的日期
let mouth = resultDate.getMonth() + 1;
let day = resultDate.getDate();
if (mouth < 10) {
mouth = "0" + mouth;
}
if (day < 10) {
day = "0" + day;
}
let resultDateStr = resultDate.getFullYear() + "-" + mouth + "-" + day;//将日期转化为字符串格式
return resultDateStr;
},
getDateStr(date) {
let mouth = date.getMonth() + 1;
let day = date.getDate();
if (mouth < 10) {
mouth = "0" + mouth;
}
if (day < 10) {
day = "0" + day;
}
let resultDateStr = date.getFullYear() + "-" + mouth + "-" + day;//将日期转化为字符串格式
return resultDateStr;
}
}
\ No newline at end of file
......@@ -57,14 +57,12 @@
//document.cookie = 'bGNnd3lwdF9hdA=6a84c8f3-86b3-42dc-835c-95e8b26ce568;'
let cookieToken = getCookie('bGNnd3lwdF9hdA');
console.log('tokenInfo',cookieToken)
if (cookieToken) {//根据cookie获取token并调用接口获取菜单并设置初始选中菜单
if (cookieToken) {
window.sessionStorage.setItem('token', 'bearer' + ' ' + cookieToken);
let query=this.$route.query;
let par = {menuId:query.menuId};
console.log("query",query);
this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => {
this.unitInfo = data.unitInfo;
// window.sessionStorage.setItem('menuList', JSON.stringify(data.menuList));
window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo));
window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList));
window.sessionStorage.setItem('unitInfo', JSON.stringify(data.unitInfo));
......
<template>
<div>
<a-cascader v-model="areaCode"
ref="cascader"
:style="{width:width}"
change-on-select
:disabled="disabled"
......@@ -20,7 +21,7 @@
<script>
export default {
name: "allAreaCascader",
props: ["disabled", "value","width"],
props: ["disabled", "value", "width"],
created() {
this.loadAreaData([{areaCode: 0}]);
},
......@@ -52,7 +53,7 @@ export default {
methods: {
handleAreaCode(areaCode) {
if (this.$api.utils.isBlank(areaCode)) {
this.areaCode=[];
this.areaCode = [];
return;
}
let level = 1;
......@@ -186,9 +187,16 @@ export default {
return this.areaCode;
},
areaChange(areaCode) {
if (areaCode.length == 0) {
this.$emit("input", "");
return;
}
this.$emit("input", areaCode[areaCode.length - 1])
},
focus() {
let input = this.$refs["cascader"];
input.focus();
}
}
}
</script>
......
......@@ -117,6 +117,7 @@ const columns = [
},
]
export default {
name:"folviteApply",
components: {},
data() {
return {
......@@ -138,6 +139,12 @@ export default {
menuId: undefined
}
},
mounted() {
let that = this;
window.addEventListener("message", function (data) {
that.getFolviteApplyList();
});
},
created() {
this.routerParams = this.$route.query;
if (this.routerParams.menuId) {
......
......@@ -36,6 +36,9 @@
<a-descriptions-item label="体重">
{{ detailInfo.weight ? detailInfo.weight + "kg" : '--' }}
</a-descriptions-item>
<a-descriptions-item label="BMI">
{{ detailInfo.bmi ? detailInfo.bmi: '--' }}
</a-descriptions-item>
</a-descriptions>
<div class="detail_title" style="border-top: 0px">
<div class="divider_my_dashed">
......
......@@ -251,7 +251,7 @@ export default {
menuId: undefined,
qrCodeShow: false,
qrCodeUrl: "",
unitInfo: JSON.parse(window.sessionStorage.getItem('unitInfo')),
unitInfo: {unitName:""},
printDisplay: 'none'
}
},
......@@ -462,6 +462,13 @@ export default {
window.addEventListener("message", function (data) {
that.getDataList();
});
let timer = setInterval(res => {
let unitInfo = JSON.parse(window.sessionStorage.getItem('unitInfo'));
if (unitInfo) {
that.unitInfo = unitInfo;
clearInterval(timer)
}
}, 500)
}
}
</script>
......
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