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

代码整合

parent 6d13f0d7
NODE_ENV = dev NODE_ENV = dev
VUE_APP_BASE_URL2222 = https://beta-ysservice.yiboshi.com VUE_APP_BASE_URL111= https://beta-ysservice.yiboshi.com
VUE_APP_BASE_URL1 = https://ys-service.yiboshi.com VUE_APP_BASE_URL2 = https://ys-service.yiboshi.com
VUE_APP_BASE_URL111 = http://59.230.237.90:8115 VUE_APP_BASE_URL4 = http://59.230.237.90:8115
VUE_APP_BASE_URL = http://127.0.0.1:8083 VUE_APP_BASE_URL = http://127.0.0.1:8083
VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com
VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B' 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 @@ ...@@ -3,7 +3,7 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "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", "serve-yy": "vue-cli-service serve --mode yueyang",
"build:test": "vue-cli-service build --mode test", "build:test": "vue-cli-service build --mode test",
"build:prod": "vue-cli-service build --mode production --report", "build:prod": "vue-cli-service build --mode production --report",
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<!--<script src="https://webapi.amap.com/maps?v=1.4.4&key=34bb7ed1b21bfcc5a3ed0b9a66a587ff"></script>--> <!--<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://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> </head>
<body> <body>
<noscript> <noscript>
......
...@@ -13,7 +13,8 @@ import 'ant-design-vue/dist/antd.less' ...@@ -13,7 +13,8 @@ import 'ant-design-vue/dist/antd.less'
// import 'nprogress/nprogress.css' // import 'nprogress/nprogress.css'
import Print from 'vue-print-nb' import Print from 'vue-print-nb'
import './antd/register' import './antd/register'
import api from './api' import api from './api';
// import {optionalChaining} from "./views/utils/common"; // import {optionalChaining} from "./views/utils/common";
import Moment from 'moment'; import Moment from 'moment';
import './views/utils/directives/debounce' import './views/utils/directives/debounce'
...@@ -23,8 +24,9 @@ import './views/utils/directives/price' ...@@ -23,8 +24,9 @@ import './views/utils/directives/price'
import './views/utils/directives/remarkNum' import './views/utils/directives/remarkNum'
import './views/utils/directives/inputNum' import './views/utils/directives/inputNum'
import {message, modal} from 'ant-design-vue' import {message, modal} from 'ant-design-vue'
import {ApiUtils} from "./utils/ApiUtils"
const {confirm} = modal const {confirm} = modal
Vue.prototype.ApiUtils = ApiUtils;
Vue.prototype.$api = api; Vue.prototype.$api = api;
// Vue.prototype.$isNot = optionalChaining; // 非空判断,为空返回 "未知" // Vue.prototype.$isNot = optionalChaining; // 非空判断,为空返回 "未知"
Vue.prototype.$message= message 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 @@ ...@@ -57,14 +57,12 @@
//document.cookie = 'bGNnd3lwdF9hdA=6a84c8f3-86b3-42dc-835c-95e8b26ce568;' //document.cookie = 'bGNnd3lwdF9hdA=6a84c8f3-86b3-42dc-835c-95e8b26ce568;'
let cookieToken = getCookie('bGNnd3lwdF9hdA'); let cookieToken = getCookie('bGNnd3lwdF9hdA');
console.log('tokenInfo',cookieToken) console.log('tokenInfo',cookieToken)
if (cookieToken) {//根据cookie获取token并调用接口获取菜单并设置初始选中菜单 if (cookieToken) {
window.sessionStorage.setItem('token', 'bearer' + ' ' + cookieToken); window.sessionStorage.setItem('token', 'bearer' + ' ' + cookieToken);
let query=this.$route.query; let query=this.$route.query;
let par = {menuId:query.menuId}; let par = {menuId:query.menuId};
console.log("query",query);
this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => { this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => {
this.unitInfo = data.unitInfo; this.unitInfo = data.unitInfo;
// window.sessionStorage.setItem('menuList', JSON.stringify(data.menuList));
window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo)); window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo));
window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList)); window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList));
window.sessionStorage.setItem('unitInfo', JSON.stringify(data.unitInfo)); window.sessionStorage.setItem('unitInfo', JSON.stringify(data.unitInfo));
......
<template> <template>
<div> <div>
<a-cascader v-model="areaCode" <a-cascader v-model="areaCode"
ref="cascader"
:style="{width:width}" :style="{width:width}"
change-on-select change-on-select
:disabled="disabled" :disabled="disabled"
...@@ -20,7 +21,7 @@ ...@@ -20,7 +21,7 @@
<script> <script>
export default { export default {
name: "allAreaCascader", name: "allAreaCascader",
props: ["disabled", "value","width"], props: ["disabled", "value", "width"],
created() { created() {
this.loadAreaData([{areaCode: 0}]); this.loadAreaData([{areaCode: 0}]);
}, },
...@@ -52,7 +53,7 @@ export default { ...@@ -52,7 +53,7 @@ export default {
methods: { methods: {
handleAreaCode(areaCode) { handleAreaCode(areaCode) {
if (this.$api.utils.isBlank(areaCode)) { if (this.$api.utils.isBlank(areaCode)) {
this.areaCode=[]; this.areaCode = [];
return; return;
} }
let level = 1; let level = 1;
...@@ -186,9 +187,16 @@ export default { ...@@ -186,9 +187,16 @@ export default {
return this.areaCode; return this.areaCode;
}, },
areaChange(areaCode) { areaChange(areaCode) {
if (areaCode.length == 0) {
this.$emit("input", "");
return;
}
this.$emit("input", areaCode[areaCode.length - 1]) this.$emit("input", areaCode[areaCode.length - 1])
},
focus() {
let input = this.$refs["cascader"];
input.focus();
} }
} }
} }
</script> </script>
......
...@@ -117,6 +117,7 @@ const columns = [ ...@@ -117,6 +117,7 @@ const columns = [
}, },
] ]
export default { export default {
name:"folviteApply",
components: {}, components: {},
data() { data() {
return { return {
...@@ -138,6 +139,12 @@ export default { ...@@ -138,6 +139,12 @@ export default {
menuId: undefined menuId: undefined
} }
}, },
mounted() {
let that = this;
window.addEventListener("message", function (data) {
that.getFolviteApplyList();
});
},
created() { created() {
this.routerParams = this.$route.query; this.routerParams = this.$route.query;
if (this.routerParams.menuId) { if (this.routerParams.menuId) {
......
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
<a-descriptions-item label="体重"> <a-descriptions-item label="体重">
{{ detailInfo.weight ? detailInfo.weight + "kg" : '--' }} {{ detailInfo.weight ? detailInfo.weight + "kg" : '--' }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="BMI">
{{ detailInfo.bmi ? detailInfo.bmi: '--' }}
</a-descriptions-item>
</a-descriptions> </a-descriptions>
<div class="detail_title" style="border-top: 0px"> <div class="detail_title" style="border-top: 0px">
<div class="divider_my_dashed"> <div class="divider_my_dashed">
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div style="clear: both"></div> <div style="clear: both"></div>
</a-form> </a-form>
<div style="margin-top: 16px;margin-bottom: 10px"></div> <div style="margin-top: 16px;margin-bottom: 10px"></div>
<a-table :dataSource="tableData" <a-table :dataSource="tableData"
:columns="columns" :columns="columns"
rowKey="id" rowKey="id"
...@@ -69,17 +69,17 @@ ...@@ -69,17 +69,17 @@
width="600px"> width="600px">
<span>上传知情同意书:</span> <span>上传知情同意书:</span>
<a-upload <a-upload
style="display: inline" style="display: inline"
name="file" name="file"
list-type="picture-card" list-type="picture-card"
accept=".jpg,.png" accept=".jpg,.png"
:multiple="true" :multiple="true"
:action="uploadAction" :action="uploadAction"
:headers="headers" :headers="headers"
@reject="handleReject" @reject="handleReject"
@preview="preview" @preview="preview"
@change="handleChange" @change="handleChange"
:file-list="fileList" :file-list="fileList"
> >
<div> <div>
<!--<a-icon type="plus"/>--> <!--<a-icon type="plus"/>-->
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<br/> <br/>
温馨提示:请上传JPG、PNG格式图片,图片大小不超过5M 温馨提示:请上传JPG、PNG格式图片,图片大小不超过5M
<br/> <br/>
</div> </div>
</a-modal> </a-modal>
<!--:getContainer="getContainer"--> <!--:getContainer="getContainer"-->
...@@ -109,8 +109,8 @@ ...@@ -109,8 +109,8 @@
</div> </div>
<div style="float: right;margin-right: 50px"> <div style="float: right;margin-right: 50px">
<div style="">签名: <img <div style="">签名: <img
style="width:50px;height: 120px;transform: rotate(-90deg);margin-left: 60px" style="width:50px;height: 120px;transform: rotate(-90deg);margin-left: 60px"
:src="applySignUrl"/></div> :src="applySignUrl"/></div>
<div>签署日期:<span style="margin-left: 8px">{{ currentRow.parentDate }}</span></div> <div>签署日期:<span style="margin-left: 8px">{{ currentRow.parentDate }}</span></div>
</div> </div>
<div style="clear: both"></div> <div style="clear: both"></div>
...@@ -121,18 +121,18 @@ ...@@ -121,18 +121,18 @@
<br> <br>
</a-modal> </a-modal>
<a-pagination <a-pagination
v-if="pagination.total > 0" v-if="pagination.total > 0"
:total="pagination.total" :total="pagination.total"
show-size-changer show-size-changer
show-quick-jumper show-quick-jumper
v-model="pagination.pageIndex" v-model="pagination.pageIndex"
:page-size="pagination.pageSize" :page-size="pagination.pageSize"
:page-size-options="pagination.pageSizeOptions" :page-size-options="pagination.pageSizeOptions"
@showSizeChange="showSizeChange" @showSizeChange="showSizeChange"
@change="change" @change="change"
:showTotal="() => `共 ${pagination.total} 条`" :showTotal="() => `共 ${pagination.total} 条`"
/> />
<a-modal title="" :visible="qrCodeShow" @cancel="qrCodeShow = false" cancelText="关闭" <a-modal title="" :visible="qrCodeShow" @cancel="qrCodeShow = false" cancelText="关闭"
:footer="null" :footer="null"
loading="true" loading="true"
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
<center @click="qrCodePrint" style="cursor: pointer"> <center @click="qrCodePrint" style="cursor: pointer">
<a-button>打印</a-button> <a-button>打印</a-button>
</center> </center>
</a-modal> </a-modal>
</div> </div>
</template> </template>
...@@ -251,7 +251,7 @@ export default { ...@@ -251,7 +251,7 @@ export default {
menuId: undefined, menuId: undefined,
qrCodeShow: false, qrCodeShow: false,
qrCodeUrl: "", qrCodeUrl: "",
unitInfo: JSON.parse(window.sessionStorage.getItem('unitInfo')), unitInfo: {unitName:""},
printDisplay: 'none' printDisplay: 'none'
} }
}, },
...@@ -440,7 +440,7 @@ export default { ...@@ -440,7 +440,7 @@ export default {
this.visible = false; this.visible = false;
} }
}) })
}, },
share() { share() {
this.qrCodeShow = true; this.qrCodeShow = true;
...@@ -462,23 +462,30 @@ export default { ...@@ -462,23 +462,30 @@ export default {
window.addEventListener("message", function (data) { window.addEventListener("message", function (data) {
that.getDataList(); that.getDataList();
}); });
let timer = setInterval(res => {
let unitInfo = JSON.parse(window.sessionStorage.getItem('unitInfo'));
if (unitInfo) {
that.unitInfo = unitInfo;
clearInterval(timer)
}
}, 500)
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
// 文件上传样式 // 文件上传样式
.ant-upload-select-picture-card i { .ant-upload-select-picture-card i {
font-size: 32px; font-size: 32px;
color: #999; color: #999;
} }
.ant-upload-select-picture-card .ant-upload-text { .ant-upload-select-picture-card .ant-upload-text {
margin-top: 6px; margin-top: 6px;
color: #666; color: #666;
} }
.btn_space { .btn_space {
margin-right: 5px; margin-right: 5px;
} }
/* .search_form { /* .search_form {
...@@ -488,11 +495,11 @@ export default { ...@@ -488,11 +495,11 @@ export default {
padding: 30px; padding: 30px;
}*/ }*/
.ellipsis { .ellipsis {
display: block; display: block;
width: 100%; width: 100%;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
} }
///deep/ .ant-table-tbody{ ///deep/ .ant-table-tbody{
......
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