Browse Source

priv

master
pengjun 2 years ago
parent
commit
5c4423f936
  1. 27
      src/assets/css/global_button.css
  2. 5
      src/assets/css/global_table.css
  3. 26
      src/components/customerOrg/ContactPerson.vue
  4. 22
      src/components/customerOrg/customerOrgEdit.vue
  5. 48
      src/components/customerOrg/customerOrgGroupAsbitem.vue
  6. 24
      src/components/customerOrg/customerOrgRegister.vue
  7. 47
      src/components/menuPage/MenuPageEdit.vue
  8. 19
      src/components/menuPage/MenuPageSet.vue
  9. 95
      src/components/patientRegister/PatientRegisterList.vue
  10. 16
      src/components/patientRegister/patientRegisterQuery.vue
  11. 4
      src/main.js
  12. 24
      src/utlis/proFunc.js
  13. 28
      src/views/customerOrg/customerOrgGroup.vue
  14. 81
      src/views/customerOrg/customerOrgGroupBak.vue
  15. 6
      src/views/customerOrg/patientRegisterImport.vue
  16. 6
      src/views/login/Login.vue

27
src/assets/css/global_button.css

@ -1,3 +1,27 @@
.el-button {
background: #FFF;
border: 1px solid #0B663D; /*原始 默认值 1px solid #DCDFE6; */
color: #0B663D !important; /*原始 默认值 #606266 */
font-weight: 700; /*原始 默认值 500 */
font-family: 'Microsoft YaHei'; /*原始 默认值 Arial */
padding: 10px 5px; /*原始 默认值 12px 20px */
min-width: 60px;
/*
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
-webkit-appearance: none;
text-align: center;
box-sizing: border-box;
outline: 0;
margin: 0;
transition: .1s;
font-size: 14px;
border-radius: 4px;
*/
}
.commonbutton { .commonbutton {
width: 100px; width: 100px;
height: 32px; height: 32px;
@ -41,4 +65,5 @@
color: #396FFA; color: #396FFA;
background-color: #f4f4f4; background-color: #f4f4f4;
border-color: #396FFA; border-color: #396FFA;
}
}

5
src/assets/css/global_table.css

@ -76,4 +76,9 @@
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
font-family: "NotoSansSC-Regular"; font-family: "NotoSansSC-Regular";
}
/* 表格列排序 */
.el-table .caret-wrapper {
width: 16px; /* 默认值 24px */
} }

26
src/components/customerOrg/ContactPerson.vue

@ -54,14 +54,14 @@
</el-table> </el-table>
</div> </div>
<div style="margin-left: 10px; margin-top: 20px"> <div style="margin-left: 10px; margin-top: 20px">
<div style="margin-top: 10px">
<el-button type="primary" @click="add" class="commonbutton">新增</el-button>
<div v-show="checkPagePriv(pagePriv.privs,'新增联系人')" style="margin-top: 10px">
<el-button type="primary" @click="add" class="commonbutton">新增联系人</el-button>
</div> </div>
<div style="margin-top: 10px">
<el-button type="success" @click="edit" class="commonbutton">编辑</el-button>
<div v-show="checkPagePriv(pagePriv.privs,'编辑联系人')" style="margin-top: 10px">
<el-button type="success" @click="edit" class="commonbutton">编辑联系人</el-button>
</div> </div>
<div style="margin-top: 10px">
<el-button type="danger" @click="del" class="commonbutton">删除</el-button>
<div v-show="checkPagePriv(pagePriv.privs,'删除联系人')" style="margin-top: 10px">
<el-button type="danger" @click="del" class="commonbutton">删除联系人</el-button>
</div> </div>
</div> </div>
</div> </div>
@ -142,12 +142,16 @@
import moment from "moment"; import moment from "moment";
import { mapState } from "vuex"; import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc";
import { getPagePriv,checkPagePriv,objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc";
export default { export default {
components: {}, components: {},
props:["customerOrgId"], props:["customerOrgId"],
data() { data() {
return { return {
pagePriv:{
routeUrlorPageName:'customerOrg', //
privs:[] //
},
personId: "", personId: "",
form: {}, // form: {}, //
contactMethodListEdit:[], // contactMethodListEdit:[], //
@ -168,7 +172,11 @@ export default {
}; };
}, },
created() { },
created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
},
// //
mounted() { }, mounted() { },
@ -178,7 +186,7 @@ export default {
}, },
methods: { methods: {
moment,
moment,checkPagePriv,
// //
getContactPersonList(customerOrgId) { getContactPersonList(customerOrgId) {
getapi( getapi(

22
src/components/customerOrg/customerOrgEdit.vue

@ -182,22 +182,22 @@
</div> </div>
<!-- 按钮区域 --> <!-- 按钮区域 -->
<div style="width: 110px; margin-left: 10px; margin-top: 3%"> <div style="width: 110px; margin-left: 10px; margin-top: 3%">
<div class="btnList">
<div v-show="checkPagePriv(pagePriv.privs,'新增单位')" class="btnList">
<el-button type="primary" @click="add('form', '')" class="commonbutton" <el-button type="primary" @click="add('form', '')" class="commonbutton"
>新增单位</el-button >新增单位</el-button
> >
</div> </div>
<div class="btnList">
<div v-show="checkPagePriv(pagePriv.privs,'新增子单位')" class="btnList">
<el-button type="primary" @click="add('form', 'child')" class="commonbutton" <el-button type="primary" @click="add('form', 'child')" class="commonbutton"
>新增子单位</el-button >新增子单位</el-button
> >
</div> </div>
<div class="btnList">
<div v-show="checkPagePriv(pagePriv.privs,'保存')" class="btnList">
<el-button type="success" @click="btnSubmit('form')" class="commonbutton" <el-button type="success" @click="btnSubmit('form')" class="commonbutton"
><i class="el-icon-check"></i>保存</el-button ><i class="el-icon-check"></i>保存</el-button
> >
</div> </div>
<div class="btnList">
<div v-show="checkPagePriv(pagePriv.privs,'删除')" class="btnList">
<el-button type="danger" @click="del('form')" class="commonbutton"> <el-button type="danger" @click="del('form')" class="commonbutton">
<i class="el-icon-delete"></i>删除 <i class="el-icon-delete"></i>删除
</el-button> </el-button>
@ -208,7 +208,7 @@
<script> <script>
import { mapState, mapMutations } from "vuex"; import { mapState, mapMutations } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate, objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc";
import { getPagePriv,checkPagePriv,tcdate, objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc";
import { getTreeNode, getTreePids } from "../../utlis/tree"; import { getTreeNode, getTreePids } from "../../utlis/tree";
export default { export default {
@ -216,6 +216,10 @@ export default {
props: ["id"], props: ["id"],
data() { data() {
return { return {
pagePriv:{
routeUrlorPageName:'customerOrg', //
privs:[] //
},
isActiveBox: false, isActiveBox: false,
customerOrgEditStyle: "height:400px;", customerOrgEditStyle: "height:400px;",
data: { data: {
@ -261,7 +265,11 @@ export default {
}; };
}, },
created() {
created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
this.peisid = window.sessionStorage.getItem("peisid"); this.peisid = window.sessionStorage.getItem("peisid");
if (!this.form.id) { if (!this.form.id) {
this.form.organizationUnitId = this.peisid; this.form.organizationUnitId = this.peisid;
@ -288,7 +296,7 @@ export default {
...mapState(["customerOrg", "window"]), ...mapState(["customerOrg", "window"]),
}, },
methods: { methods: {
...mapMutations(["setData"]),
...mapMutations(["setData"]),checkPagePriv,
changeBox(type) { changeBox(type) {
// //

48
src/components/customerOrg/customerOrgGroupAsbitem.vue

@ -1,6 +1,6 @@
<template> <template>
<div style="display: flex; margin-top:5px;"> <div style="display: flex; margin-top:5px;">
<div :style="'display: flex;width:' + (window.pageWidth - 45 - 110) + 'px;'">
<div :style="'display: flex;width:' + (window.pageWidth - 45 - 110) + 'px;font-size:14px;'">
<!--未选组合项目--> <!--未选组合项目-->
<div style="display: block; width:230px;"> <div style="display: block; width:230px;">
<div> <div>
@ -29,19 +29,19 @@
</div> </div>
<!--中间操作按钮--> <!--中间操作按钮-->
<div style="display: block;margin: 40px 10px 0 10px;">
<div style="padding: 5px 0;">
<div style="display: block;margin: 40px 10px 0 10px;width:110px;">
<div v-show="checkPagePriv(pagePriv.privs,'添加')" style="padding: 5px 0;">
<el-button class="commonbutton" @click="addAbs(asbItemChoosed,'choosed')" >添加 <i class="el-icon-arrow-right"></i></el-button> <el-button class="commonbutton" @click="addAbs(asbItemChoosed,'choosed')" >添加 <i class="el-icon-arrow-right"></i></el-button>
</div> </div>
<div style="padding: 5px 0;">
<div v-show="checkPagePriv(pagePriv.privs,'全部添加')" style="padding: 5px 0;">
<el-button class="difference" @click="addAbs(asbItemChoosed,'all')">全部添加</el-button> <el-button class="difference" @click="addAbs(asbItemChoosed,'all')">全部添加</el-button>
</div> </div>
<div style="padding: 5px 0;">
<div v-show="checkPagePriv(pagePriv.privs,'移除')" style="padding: 5px 0;">
<el-button class="commonbutton" <el-button class="commonbutton"
@click="delAbs(customerOrgGroupAsbitemsChoosed,'choosed')">移除 <i class="el-icon-arrow-left"></i @click="delAbs(customerOrgGroupAsbitemsChoosed,'choosed')">移除 <i class="el-icon-arrow-left"></i
></el-button> ></el-button>
</div> </div>
<div style="padding: 5px 0;">
<div v-show="checkPagePriv(pagePriv.privs,'全部移除')" style="padding: 5px 0;">
<el-button class="difference" @click="delAbs(customerOrgGroupAsbitemsChoosed,'all')">全部移除</el-button> <el-button class="difference" @click="delAbs(customerOrgGroupAsbitemsChoosed,'all')">全部移除</el-button>
</div> </div>
</div> </div>
@ -49,14 +49,16 @@
<!--已选组合项目--> <!--已选组合项目-->
<div :style="'display: block; width:' + (window.pageWidth - 230 - 120 - 45 - 110) + 'px;'"> <div :style="'display: block; width:' + (window.pageWidth - 230 - 120 - 45 - 110) + 'px;'">
<div style="height:32px;"> <div style="height:32px;">
<span>快速选择</span>
<el-select v-model="asbItemId" placeholder="快速选择组合项目" size="small"
filterable default-first-option :filter-method="filterMethod"
clearable @clear="quickAsb = deepCopy(dict.asbItemQuick)"
@change="quickChoosedAsb" ref="quickAsbOCX"
style="margin-left: 3px;width:160px;">
<el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" />
</el-select>
<div v-show="checkPagePriv(pagePriv.privs,'快速选择')">
<span>快速选择</span>
<el-select v-model="asbItemId" placeholder="快速选择组合项目" size="small"
filterable default-first-option :filter-method="filterMethod"
clearable @clear="quickAsb = deepCopy(dict.asbItemQuick)"
@change="quickChoosedAsb" ref="quickAsbOCX"
style="margin-left: 3px;width:160px;">
<el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" />
</el-select>
</div>
</div> </div>
<div class="box"> <div class="box">
<el-table :data="customerOrgGroupAsbitems" border size="small" <el-table :data="customerOrgGroupAsbitems" border size="small"
@ -112,13 +114,13 @@
</div> </div>
<!--批量操作按钮复制套餐与分组--> <!--批量操作按钮复制套餐与分组-->
<div style="display: block;margin-left: 10px;"> <div style="display: block;margin-left: 10px;">
<div style="margin-top: 50px;">
<div v-show="checkPagePriv(pagePriv.privs,'复制分组')" style="margin-top: 50px;">
<el-button class="commonbutton" @click="btnCopyGroup">复制分组</el-button> <el-button class="commonbutton" @click="btnCopyGroup">复制分组</el-button>
</div> </div>
<div style="margin-top: 10px;">
<div v-show="checkPagePriv(pagePriv.privs,'复制套餐')" style="margin-top: 10px;">
<el-button class="commonbutton" @click="btnCopyMedicalPackage">复制套餐</el-button> <el-button class="commonbutton" @click="btnCopyMedicalPackage">复制套餐</el-button>
</div> </div>
<div style="margin-top: 10px;">
<div v-show="checkPagePriv(pagePriv.privs,'保存')" style="margin-top: 10px;">
<el-button class="commonbutton" @click="btnSave">保存</el-button> <el-button class="commonbutton" @click="btnSave">保存</el-button>
</div> </div>
</div> </div>
@ -268,13 +270,17 @@
import moment from 'moment'; import moment from 'moment';
import { mapState } from "vuex"; import { mapState } from "vuex";
import { getapi, postapi, putapi } from "@/api/api"; import { getapi, postapi, putapi } from "@/api/api";
import { arrayExistObj, tcdate, arrayFilter, arrayReduce, deepCopy,dddw } from "../../utlis/proFunc";
import { getPagePriv,checkPagePriv, arrayExistObj, tcdate, arrayFilter, arrayReduce, deepCopy,dddw } from "../../utlis/proFunc";
export default { export default {
props:['customerOrgGroup','refreshMoney'], props:['customerOrgGroup','refreshMoney'],
data() { data() {
return { return {
pagePriv:{
routeUrlorPageName:'customerOrgGroup', //
privs:[] //
},
groupPrice:0, // groupPrice:0, //
customerOrgGroupAsbitems:[], //() customerOrgGroupAsbitems:[], //()
customerOrgGroupAsbitemsChoosed:[], //() customerOrgGroupAsbitemsChoosed:[], //()
@ -312,6 +318,10 @@ export default {
}, },
created() { created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
this.dictInit() this.dictInit()
}, },
@ -319,7 +329,7 @@ export default {
this.refreshTable('tableCustomerOrgGroupAsbitems') this.refreshTable('tableCustomerOrgGroupAsbitems')
}, },
methods: { methods: {
moment,dddw,deepCopy,
moment,dddw,deepCopy,checkPagePriv,
// //
refreshTable(tableRef){ refreshTable(tableRef){
this.$nextTick(() => { this.$nextTick(() => {

24
src/components/customerOrg/customerOrgRegister.vue

@ -38,16 +38,16 @@
</el-table> </el-table>
</div> </div>
<div style="margin-left: 10px; margin-top: 20px"> <div style="margin-left: 10px; margin-top: 20px">
<div style="margin-top: 10px">
<el-button type="primary" @click="add" class="commonbutton">次数</el-button>
<div v-show="checkPagePriv(pagePriv.privs,'新增次数')" style="margin-top: 10px">
<el-button type="primary" @click="add" class="commonbutton">增次数</el-button>
</div> </div>
<div style="margin-top: 10px">
<div v-show="checkPagePriv(pagePriv.privs,'体检完成')" style="margin-top: 10px">
<el-button type="success" @click="edit" class="commonbutton">体检完成</el-button> <el-button type="success" @click="edit" class="commonbutton">体检完成</el-button>
</div> </div>
<div style="margin-top: 10px">
<div v-show="checkPagePriv(pagePriv.privs,'取消完成')" style="margin-top: 10px">
<el-button type="warning" @click="cansel" class="commonbutton">取消完成</el-button> <el-button type="warning" @click="cansel" class="commonbutton">取消完成</el-button>
</div> </div>
<div style="margin-top: 10px">
<div v-show="checkPagePriv(pagePriv.privs,'删除次数')" style="margin-top: 10px">
<el-button type="danger" @click="btnDel" class="commonbutton">删除次数</el-button> <el-button type="danger" @click="btnDel" class="commonbutton">删除次数</el-button>
</div> </div>
</div> </div>
@ -57,17 +57,25 @@
import moment from "moment"; import moment from "moment";
import { mapState, mapMutations } from "vuex"; import { mapState, mapMutations } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate, objCopy, deepCopy,arrayExistObj } from "../../utlis/proFunc";
import { getPagePriv,checkPagePriv,tcdate, objCopy, deepCopy,arrayExistObj } from "../../utlis/proFunc";
export default { export default {
components: {}, components: {},
data() { data() {
return { return {
pagePriv:{
routeUrlorPageName:'customerOrg', //
privs:[] //
},
customerOrgRegisterId: "", //ID customerOrgRegisterId: "", //ID
}; };
}, },
created() { },
created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
},
// //
mounted() { }, mounted() { },
@ -77,7 +85,7 @@ export default {
}, },
methods: { methods: {
moment,
moment,checkPagePriv,
// //
rowClick(row) { rowClick(row) {
this.customerOrgRegisterId = row.id; this.customerOrgRegisterId = row.id;

47
src/components/menuPage/MenuPageEdit.vue

@ -148,12 +148,12 @@
</div> </div>
<!-- 按钮区域 --> <!-- 按钮区域 -->
<div style="width: 110px; margin-left: 10px; margin-top: 3%"> <div style="width: 110px; margin-left: 10px; margin-top: 3%">
<div class="btnList">
<div class="btnList" v-show="checkPagePriv(pagePriv.privs,'新增节点')">
<el-button type="primary" @click="btnAdd('form', '')" class="btnClass" <el-button type="primary" @click="btnAdd('form', '')" class="btnClass"
>新增节点</el-button >新增节点</el-button
> >
</div> </div>
<div class="btnList">
<div class="btnList" v-show="checkPagePriv(pagePriv.privs,'新增子节点')">
<el-button <el-button
type="primary" type="primary"
@click="btnAdd('form', 'child')" @click="btnAdd('form', 'child')"
@ -161,12 +161,12 @@
>新增子节点</el-button >新增子节点</el-button
> >
</div> </div>
<div class="btnList">
<div class="btnList" v-show="checkPagePriv(pagePriv.privs,'保存')">
<el-button type="success" @click="btnSubmit('form')" class="btnClass" <el-button type="success" @click="btnSubmit('form')" class="btnClass"
>保存</el-button >保存</el-button
> >
</div> </div>
<div class="btnList">
<div class="btnList" v-show="checkPagePriv(pagePriv.privs,'删除')">
<el-button type="danger" @click="btnDel('form')" class="btnClass" <el-button type="danger" @click="btnDel('form')" class="btnClass"
>删除</el-button >删除</el-button
> >
@ -177,7 +177,7 @@
<script> <script>
import { mapState, mapMutations } from "vuex"; import { mapState, mapMutations } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate, objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc";
import { getPagePriv,checkPagePriv, tcdate, objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc";
import { getTreeNode, getTreePids } from "../../utlis/tree"; import { getTreeNode, getTreePids } from "../../utlis/tree";
export default { export default {
@ -185,21 +185,25 @@ export default {
props: ["id"], props: ["id"],
data() { data() {
return { return {
pagePriv:{
routeUrlorPageName:'menuPage', //
privs:[] //
},
isActiveBox: false, isActiveBox: false,
customerOrgEditStyle: "height:400px;", customerOrgEditStyle: "height:400px;",
form: { form: {
displayName: "", displayName: "",
displayOrder:null,
routeUrl: null,
iconName: null,
simpleCode: "QXGL",
displayOrder:"",
routeUrl: "",
iconName: "",
simpleCode: "",
parentId: null, parentId: null,
isActive: "Y", isActive: "Y",
isActiveBox: true, isActiveBox: true,
menuType: "0", menuType: "0",
creatorName: null,
lastModifierName: null,
creatorName: "",
lastModifierName: "",
lastModificationTime: "", lastModificationTime: "",
lastModifierId: "", lastModifierId: "",
creationTime: "", creationTime: "",
@ -220,8 +224,13 @@ export default {
}, },
created() { created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
// //
this.formInit = deepCopy(this.form); this.formInit = deepCopy(this.form);
console.log('this.formInit',this.formInit)
}, },
// //
@ -235,6 +244,7 @@ export default {
}, },
methods: { methods: {
...mapMutations(["setData"]), ...mapMutations(["setData"]),
checkPagePriv,
changeBox(type) { changeBox(type) {
// //
@ -254,8 +264,9 @@ export default {
getapi(`/api/app/menuinfo/getmenuinfoasync?MenuInfoId=${id}`).then( getapi(`/api/app/menuinfo/getmenuinfoasync?MenuInfoId=${id}`).then(
(res) => { (res) => {
if (res.code != -1) { if (res.code != -1) {
this.form = res.data;
// objCopy(res.data, this.form);
// this.form = res.data;
console.log('deepCopy(this.form)',deepCopy(this.form))
objCopy(res.data, this.form);
if (res.data.isActive == "Y") { if (res.data.isActive == "Y") {
this.form.isActiveBox = true; this.form.isActiveBox = true;
@ -417,17 +428,19 @@ export default {
// //
async btnAdd(formName, isChild) { async btnAdd(formName, isChild) {
await this.$refs[formName].resetFields();
if (isChild) { if (isChild) {
if (!this.form.id) { if (!this.form.id) {
this.$message.warning("请先选择上级节点"); this.$message.warning("请先选择上级节点");
return; return;
} }
this.form = Object.assign({}, this.formInit, { parentId: this.form.id, });
let parentForm = deepCopy(this.form)
console.log('parentForm',parentForm)
this.form = Object.assign({}, this.formInit, { parentId: parentForm.id,routeUrl: parentForm.routeUrl});
console.log('this.form',this.form)
} else { } else {
this.form = Object.assign({}, this.formInit); this.form = Object.assign({}, this.formInit);
} }
await this.$refs[formName].resetFields();
}, },
// //
@ -500,7 +513,7 @@ export default {
watch: { watch: {
//ID //ID
"dataTransOpts.refresh.menu_info.S": { "dataTransOpts.refresh.menu_info.S": {
immediate: true,
// immediate: true, // created 使
handler(newVal, oldVal) { handler(newVal, oldVal) {
console.log( console.log(
`watch 菜单与页面 newVal:${newVal} oldVal:${oldVal} menuInfoId: ${this.dataTransOpts.tableS.menu_info.id}` `watch 菜单与页面 newVal:${newVal} oldVal:${oldVal} menuInfoId: ${this.dataTransOpts.tableS.menu_info.id}`

19
src/components/menuPage/MenuPageSet.vue

@ -4,7 +4,7 @@
<div> <div>
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small" /> <el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small" />
</div> </div>
<div v-show="isRole">
<div v-show="isRole && checkPagePriv(pagePriv.privs,'提交')">
<el-button @click="btnSubmit" size="small">提交</el-button> <el-button @click="btnSubmit" size="small">提交</el-button>
</div> </div>
</div> </div>
@ -20,7 +20,7 @@
<script> <script>
import { mapState, mapMutations } from "vuex"; import { mapState, mapMutations } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate,arrayExistObj } from "../../utlis/proFunc";
import { getPagePriv,checkPagePriv, deepCopy,tcdate,arrayExistObj } from "../../utlis/proFunc";
import { getTreeNode, getTreeAllChildIdsByNode, getTreeAllChildIdsById, getTreePids } from "../../utlis/tree"; import { getTreeNode, getTreeAllChildIdsByNode, getTreeAllChildIdsById, getTreePids } from "../../utlis/tree";
@ -29,6 +29,10 @@ export default {
props:["params"], // params = { opra: role/user /, idVal: roleId/userId} props:["params"], // params = { opra: role/user /, idVal: roleId/userId}
data() { data() {
return { return {
pagePriv:{
routeUrlorPageName:'MenuInfoSet', //
privs:[] //
},
menuInfoView:[], // menuInfoView:[], //
menuInfoSet:[], // menuInfoSet:[], //
checkedKeys:[], //ID checkedKeys:[], //ID
@ -37,7 +41,7 @@ export default {
}, },
computed: { computed: {
...mapState(["window", "dataTransOpts", "customerOrg" ]),
...mapState(["window", "dialogWin", "dataTransOpts", "customerOrg" ]),
// //
isRole(){ isRole(){
@ -51,7 +55,10 @@ export default {
}, },
// //
created() {
created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
}, },
// //
@ -60,7 +67,7 @@ export default {
}, },
methods: { methods: {
...mapMutations(["setData"]),
...mapMutations(["setData"]),checkPagePriv,
// //
initData(roleOrUser_Id) { initData(roleOrUser_Id) {
@ -139,9 +146,9 @@ export default {
postapi('/api/app/rolemenuinfo/setrolemenuinfo',body).then(res =>{ postapi('/api/app/rolemenuinfo/setrolemenuinfo',body).then(res =>{
if(res.code != -1){ if(res.code != -1){
console.log('操作成功!') console.log('操作成功!')
this.dialogWin.MenuPageSet = false
} }
}) })
}, },
// //

95
src/components/patientRegister/PatientRegisterList.vue

@ -129,20 +129,20 @@
</el-tabs> </el-tabs>
</div> </div>
<div style="margin-left: 10px;"> <div style="margin-left: 10px;">
<div class="listBtn">
<div v-show="checkPagePriv(pagePriv.privs,'人员登记')" class="listBtn">
<el-button type="success" class="btnClass" @click="btnAdd">人员登记</el-button <el-button type="success" class="btnClass" @click="btnAdd">人员登记</el-button
> >
</div> </div>
<div class="listBtn">
<div v-show="checkPagePriv(pagePriv.privs,'批量正式登记')" class="listBtn">
<el-button type="success" class="btnClass" @click="btnAddBatch">批量正式登记</el-button <el-button type="success" class="btnClass" @click="btnAddBatch">批量正式登记</el-button
> >
</div> </div>
<div class="listBtn">
<div v-show="checkPagePriv(pagePriv.privs,'编辑')" class="listBtn">
<el-button type="primary" class="btnClass" @click="btnEdit" <el-button type="primary" class="btnClass" @click="btnEdit"
>编辑</el-button >编辑</el-button
> >
</div> </div>
<div class="listBtn">
<div v-show="checkPagePriv(pagePriv.privs,'删除')" class="listBtn">
<el-button type="danger" class="btnClass" @click="btnDel" <el-button type="danger" class="btnClass" @click="btnDel"
>删除</el-button >删除</el-button
> >
@ -161,17 +161,17 @@
<el-button type="" class="btnClass commonbutton">健康档案</el-button> <el-button type="" class="btnClass commonbutton">健康档案</el-button>
</div> </div>
--> -->
<div class="listBtn">
<div v-show="checkPagePriv(pagePriv.privs,'批量调整分组')" class="listBtn">
<el-button type="" class="btnClass" @click="btnGroupBatch" <el-button type="" class="btnClass" @click="btnGroupBatch"
>批量调整分组</el-button >批量调整分组</el-button
> >
</div> </div>
<div class="listBtn">
<div v-show="checkPagePriv(pagePriv.privs,'批量调整项目')" class="listBtn">
<el-button type="" class="btnClass" @click="btnAsbBatch" <el-button type="" class="btnClass" @click="btnAsbBatch"
>批量调整项目</el-button >批量调整项目</el-button
> >
</div> </div>
<div class="listBtn">
<div v-show="checkPagePriv(pagePriv.privs,'指引单打印')" class="listBtn">
<el-button <el-button
type="" type=""
class="btnClass" class="btnClass"
@ -179,7 +179,7 @@
>指引单打印</el-button >指引单打印</el-button
> >
</div> </div>
<div class="listBtn">
<div v-show="checkPagePriv(pagePriv.privs,'指引单预览')" class="listBtn">
<el-button <el-button
type="" type=""
class="btnClass" class="btnClass"
@ -187,7 +187,7 @@
>指引单预览</el-button >指引单预览</el-button
> >
</div> </div>
<div class="listBtn">
<div v-show="checkPagePriv(pagePriv.privs,'人员信息导出')" class="listBtn">
<el-button <el-button
type="" type=""
class="btnClass" class="btnClass"
@ -290,6 +290,7 @@ import FileSaver from 'file-saver';
import html2canvas from 'html2canvas'; import html2canvas from 'html2canvas';
import { import {
getPagePriv,checkPagePriv,
dddw, dddw,
objCopy, objCopy,
arrayReduce, arrayReduce,
@ -316,6 +317,10 @@ export default {
}, },
data() { data() {
return { return {
pagePriv:{
routeUrlorPageName:'patientRegister', //
privs:[] //
},
peisid:null, peisid:null,
startPoint: -1, // -1 startPoint: -1, // -1
endPoint: -1, // -1 endPoint: -1, // -1
@ -383,6 +388,10 @@ export default {
}, },
created() { created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
this.headerCols = deepCopy(this.dropCol) this.headerCols = deepCopy(this.dropCol)
this.loadOptsInit = Object.assign({},this.loadOpts) this.loadOptsInit = Object.assign({},this.loadOpts)
}, },
@ -413,7 +422,7 @@ export default {
}, },
methods: { methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]), ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
moment,dddw,deepCopy,
moment,dddw,deepCopy,checkPagePriv,
// //
handleRowClassName({ row, rowIndex }) { handleRowClassName({ row, rowIndex }) {
@ -966,42 +975,46 @@ export default {
//console.log('onContextmenu',event); //console.log('onContextmenu',event);
if (!this.rClickRow) return false; if (!this.rClickRow) return false;
let row = { ...this.rClickRow }; let row = { ...this.rClickRow };
this.$contextmenu({
items: [
{
label: "发送检验申请",
onClick: () => {
this.lisRequest(row.id);
},
},
{
label: "预览检验条码",
onClick: () => {
this.lisPrint(row.id, "0002", true);
},
let items = [] //
if(checkPagePriv(this.pagePriv.privs,'发送检验申请'))
items.push({
label: "发送检验申请",
onClick: () => {
this.lisRequest(row.id);
}, },
{
label: "打印检验条码",
onClick: () => {
this.lisPrint(row.id, "0002", false);
},
})
if(checkPagePriv(this.pagePriv.privs,'预览检验条码'))
items.push({
label: "预览检验条码",
onClick: () => {
this.lisPrint(row.id, "0002", true);
}, },
{
label: "预览Pacs条码",
onClick: () => {
this.pacsPrint(row.id, "0004", true);
},
})
if(checkPagePriv(this.pagePriv.privs,'打印检验条码'))
items.push({
label: "打印检验条码",
onClick: () => {
this.lisPrint(row.id, "0002", false);
}, },
{
label: "打印Pacs条码",
onClick: () => {
this.pacsPrint(row.id, "0004", false);
},
})
if(checkPagePriv(this.pagePriv.privs,'预览Pacs条码'))
items.push({
label: "预览Pacs条码",
onClick: () => {
this.pacsPrint(row.id, "0004", true);
}, },
{
label: "----------------",
})
if(checkPagePriv(this.pagePriv.privs,'打印Pacs条码'))
items.push({
label: "打印Pacs条码",
onClick: () => {
this.pacsPrint(row.id, "0004", false);
}, },
],
})
items.push({ label: "----------------", })
this.$contextmenu({
items,
event, event,
//x: event.clientX, //x: event.clientX,
//y: event.clientY, //y: event.clientY,

16
src/components/patientRegister/patientRegisterQuery.vue

@ -77,10 +77,10 @@
<!-- 按钮区域 --> <!-- 按钮区域 -->
<div style="margin-left: 10px;"> <div style="margin-left: 10px;">
<div class="listBtn">
<div v-show="checkPagePriv(pagePriv.privs,'查询')" class="listBtn">
<el-button class="btnClass" @click="btnQuery">查询</el-button> <el-button class="btnClass" @click="btnQuery">查询</el-button>
</div> </div>
<div class="listBtn">
<div v-show="checkPagePriv(pagePriv.privs,'读身份证')" class="listBtn">
<el-button type="danger" class="btnClass" @click="readIdCard">读身份证</el-button> <el-button type="danger" class="btnClass" @click="readIdCard">读身份证</el-button>
</div> </div>
</div> </div>
@ -89,19 +89,27 @@
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import {parsIcCardtoLocal} from '../../utlis/proFunc'
import { getPagePriv,checkPagePriv, parsIcCardtoLocal, deepCopy} from '../../utlis/proFunc'
export default { export default {
components: {}, components: {},
props: ["orgEnable"], props: ["orgEnable"],
data() { data() {
return { return {
pagePriv:{
routeUrlorPageName:'patientRegister', //
privs:[] //
},
dialogVisible: false, dialogVisible: false,
customerOrgRegisterList:[], customerOrgRegisterList:[],
}; };
}, },
created() { created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
let ldate = new Date(); let ldate = new Date();
this.patientRegister.query.startDate = ldate; this.patientRegister.query.startDate = ldate;
this.patientRegister.query.endDate = ldate; this.patientRegister.query.endDate = ldate;
@ -114,7 +122,7 @@ export default {
...mapState(["window", "dict", "patientRegister", "customerOrg"]), ...mapState(["window", "dict", "patientRegister", "customerOrg"]),
}, },
methods: { methods: {
checkPagePriv,
// //
btnQuery() { btnQuery() {
this.patientRegister.query.times++; this.patientRegister.query.times++;

4
src/main.js

@ -108,7 +108,7 @@ onResize();
// 监听keydown:获取键盘按住事件,code返回按住的键信息 (为了省事放在全局,后续优化应考虑放至具体用到界面上) // 监听keydown:获取键盘按住事件,code返回按住的键信息 (为了省事放在全局,后续优化应考虑放至具体用到界面上)
window.addEventListener('keydown', code => { window.addEventListener('keydown', code => {
console.log('keydown', code)
// console.log('keydown', code)
if (code.key == "Shift" && code.shiftKey) { if (code.key == "Shift" && code.shiftKey) {
store.commit('setData', { key: 'window.shift', value: true }); // 标记按住了shift键 store.commit('setData', { key: 'window.shift', value: true }); // 标记按住了shift键
} }
@ -120,7 +120,7 @@ window.addEventListener('keydown', code => {
// // 监听keyup:获取键盘松开事件,code返回按住的键信息 // // 监听keyup:获取键盘松开事件,code返回按住的键信息
window.addEventListener('keyup', code => { window.addEventListener('keyup', code => {
console.log('keyup', code)
// console.log('keyup', code)
if (code.key == "Shift") { if (code.key == "Shift") {
store.commit('setData', { key: 'window.shift', value: false }); // 标记松开了shift键 store.commit('setData', { key: 'window.shift', value: false }); // 标记松开了shift键
} }

24
src/utlis/proFunc.js

@ -292,6 +292,30 @@ async function savePeoplePhoto(peopleId, photoBase64) {
}; };
exports.savePeoplePhoto = savePeoplePhoto; exports.savePeoplePhoto = savePeoplePhoto;
// 获取当前用户,当前界面的权限
// roteUrlorPageName 路由或需要控制权限的组件界面名称
function getPagePriv(routeUrlorPageName){
let priv = []
let userPriv = window.sessionStorage.getItem('userPriv')
if(userPriv) priv = JSON.parse(userPriv)
priv = priv.filter(e => {
return e.routeUrl == routeUrlorPageName
})
return priv
};
exports.getPagePriv = getPagePriv;
// 检查权限是否具有某个权限
// privs 权限集合; displayName 待验证的权限节点名称,有权限返回 true ,否则返回 false
function checkPagePriv(privs,displayName){
let ret = false
if(!(Array.isArray(privs) && privs.length > 0)) return ret
let lfind = arrayExistObj(privs,'displayName',displayName)
if(lfind > -1) ret = true
return ret
};
exports.checkPagePriv = checkPagePriv;

28
src/views/customerOrg/customerOrgGroup.vue

@ -3,7 +3,7 @@
<el-card> <el-card>
<div slot="header">单位分组</div> <div slot="header">单位分组</div>
<!--分组信息--> <!--分组信息-->
<div style="display: flex;">
<div style="display: flex;font-size:14px;">
<div :style="'display: block;width:' + (window.pageWidth - 45 - 110) + 'px;'"> <div :style="'display: block;width:' + (window.pageWidth - 45 - 110) + 'px;'">
<div style="display: flex"> <div style="display: flex">
<div> <div>
@ -128,22 +128,22 @@
</div> </div>
<!--按钮--> <!--按钮-->
<div style="display: block;margin-left: 10px;"> <div style="display: block;margin-left: 10px;">
<div style="margin-top: 35px;">
<div v-show="checkPagePriv(pagePriv.privs,'新增')" style="margin-top: 35px;">
<el-button class="commonbutton" @click="btnAdd">新增</el-button> <el-button class="commonbutton" @click="btnAdd">新增</el-button>
</div> </div>
<div style="margin-top: 8px;">
<div v-show="checkPagePriv(pagePriv.privs,'编辑')" style="margin-top: 8px;">
<el-button class="commonbutton" @click="btnEdit" >编辑</el-button> <el-button class="commonbutton" @click="btnEdit" >编辑</el-button>
</div> </div>
<div style="margin-top: 8px;">
<div v-show="checkPagePriv(pagePriv.privs,'删除')" style="margin-top: 8px;">
<el-button class="commonbutton" @click="btnDel" >删除</el-button> <el-button class="commonbutton" @click="btnDel" >删除</el-button>
</div> </div>
<div style="margin-top: 8px;">
<div v-show="checkPagePriv(pagePriv.privs,'置顶')" style="margin-top: 8px;">
<el-button class="commonbutton" @click="btnSetTop" >置顶</el-button> <el-button class="commonbutton" @click="btnSetTop" >置顶</el-button>
</div> </div>
<div style="margin-top: 8px;">
<el-button class="commonbutton" @click="btnSetBottom"></el-button>
<div v-show="checkPagePriv(pagePriv.privs,'置底')" style="margin-top: 8px;">
<el-button class="commonbutton" @click="btnSetBottom"></el-button>
</div> </div>
<div style="margin-top: 8px;">
<div v-show="checkPagePriv(pagePriv.privs,'保存排序')" style="margin-top: 8px;">
<el-button class="commonbutton" @click="btnSort" :disabled="!isDrag" >保存排序</el-button> <el-button class="commonbutton" @click="btnSort" :disabled="!isDrag" >保存排序</el-button>
</div> </div>
</div> </div>
@ -247,7 +247,7 @@ import moment from "moment";
import Sortable from "sortablejs"; import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { mapState } from "vuex"; import { mapState } from "vuex";
import { dddw, deepCopy, objCopy, arrayExistObj } from "../../utlis/proFunc";
import { getPagePriv,checkPagePriv, dddw, deepCopy, objCopy, arrayExistObj } from "../../utlis/proFunc";
import CustomerOrgGroupAsbitem from "../../components/customerOrg/customerOrgGroupAsbitem.vue"; import CustomerOrgGroupAsbitem from "../../components/customerOrg/customerOrgGroupAsbitem.vue";
@ -257,6 +257,10 @@ export default {
}, },
data() { data() {
return { return {
pagePriv:{
routeUrlorPageName:'customerOrgGroup', //
privs:[] //
},
customerOrg: [], // customerOrg: [], //
customerOrgGroups: [], // customerOrgGroups: [], //
customerOrgId: "", //id customerOrgId: "", //id
@ -297,6 +301,10 @@ export default {
...mapState(["personnelUnit", "window", "dict", "dataTransOpts"]), ...mapState(["personnelUnit", "window", "dict", "dataTransOpts"]),
}, },
created() { created() {
//
let userPriv = window.sessionStorage.getItem('userPriv')
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
this.rowDrop(); this.rowDrop();
this.formInit = deepCopy(this.form); this.formInit = deepCopy(this.form);
}, },
@ -306,7 +314,7 @@ export default {
}, },
methods: { methods: {
moment, moment,
dddw,deepCopy,
checkPagePriv,dddw,deepCopy,
// //
refreshMoney(formData){ refreshMoney(formData){

81
src/views/customerOrg/customerOrgGroupBak.vue

@ -1,81 +0,0 @@
<template>
<div style="display: flex">
<div class="box">
<el-card>
<div class="publiccss">单位分组</div>
<span>单位</span>
<el-select
v-model="value"
placeholder="请选择"
style="margin-left: 20px; margin-top: 20px"
@change="secltchang"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
</el-option>
</el-select>
<div>
<CustomerOrgTree></CustomerOrgTree>
<UnitGroupCategory></UnitGroupCategory>
</div>
</el-card>
</div>
</div>
</template>
<script>
import CustomerOrgTree from "../../components/unitGrouping/unitGroupingTable.vue";
import UnitGroupCategory from "../../components/unitGrouping/unitGroupCategory.vue";
import { mapState } from "vuex";
import { getapi } from "@/api/api";
export default {
components: {
CustomerOrgTree,
UnitGroupCategory,
},
data() {
return {
options: [],
value: "",
};
},
computed: {
...mapState(["personnelUnit"]),
},
created() {
this.getitemtype();
},
methods: {
secltchang(v) {
this.personnelUnit.id = v;
//let that=this
console.log(this.customerOrg);
getapi(`/api/app/customer-org-group/in-customer-org-id/${v}`).then(
(res) => {
this.personnelUnit.personnelgrouping = res.data;
// console.log(res.data);
// console.log(that.customerOrg.personnelgrouping);
}
);
console.log(v);
},
//
getitemtype() {
getapi("/api/app/customer-org/parent-all").then((res) => {
this.options = res.data;
});
},
},
};
</script>
<style scoped>
::v-deep .el-card__body {
height: 800px;
}
.box {
width: 100%;
}
</style>

6
src/views/customerOrg/patientRegisterImport.vue

@ -6,13 +6,13 @@
<div></div> <div></div>
<div style="display: flex;"> <div style="display: flex;">
<div> <div>
<a :underline="false" href="/files/单位体检人员名单导入模板.xlsx"><el-button class="btnClass">下载导入模版</el-button></a>
<a :underline="false" href="/files/单位体检人员名单导入模板.xlsx"><el-button class="btnClass" size="small">下载导入模版</el-button></a>
</div> </div>
<div> <div>
<el-button class="btnClass" @click="seq = 0">导入</el-button>
<el-button class="btnClass" @click="seq = 0" size="small">导入</el-button>
</div> </div>
<div> <div>
<el-button class="btnClass" @click="btnExport('tableData')">导入后结果状态导出</el-button>
<el-button class="btnClass" @click="btnExport('tableData')" size="small">导入后结果状态导出</el-button>
</div> </div>
</div> </div>
</div> </div>

6
src/views/login/Login.vue

@ -112,10 +112,14 @@ export default {
this.$router.push({ path: "/home" }); this.$router.push({ path: "/home" });
this.$store.state.changepassword = this.form.Password; this.$store.state.changepassword = this.form.Password;
return getapi('/api/app/menuinfo/getmymenuinfolist')
} else { } else {
this.$message.warning(res.message); this.$message.warning(res.message);
} }
}).then(res => {
if(res && res.code != -1){
window.sessionStorage.setItem("userPriv", JSON.stringify(res.data));
}
}).catch(err =>{ }).catch(err =>{
this.$message.error(err); this.$message.error(err);
}) })

Loading…
Cancel
Save