|
@@ -388,6 +388,12 @@
|
388
|
388
|
|
389
|
389
|
<!-- 父级科室弹窗 -->
|
390
|
390
|
<showModel :title="models2.title" icon="" :disjunctor="models2.disjunctor" :content="models2.content" @ok="ok2" @cancel="cancel2" :operate="models2.operate" :childrenDeptList="models2.list"></showModel>
|
|
391
|
+
|
|
392
|
+ <!-- 父级科室弹窗 -->
|
|
393
|
+ <showModel :title="models3.title" icon="" :disjunctor="models3.disjunctor" :content="models3.content" @know="know3" @ok="ok3" @cancel="cancel3" :operate="models3.operate" :busyContentList="models3.list"></showModel>
|
|
394
|
+
|
|
395
|
+ <!-- 示闲弹窗 -->
|
|
396
|
+ <showModel :title="models4.title" icon="models4.icon" :disjunctor="models4.disjunctor" :content="models4.content" @know="know4" @ok="ok4" @cancel="cancel4" :operate="models4.operate"></showModel>
|
391
|
397
|
</view>
|
392
|
398
|
</template>
|
393
|
399
|
<script>
|
|
@@ -411,12 +417,14 @@
|
411
|
417
|
export default {
|
412
|
418
|
data() {
|
413
|
419
|
return {
|
|
420
|
+ workStateList: [],
|
414
|
421
|
clothingType: '',//被服回收扫码的类型,dept|user
|
415
|
422
|
isShowExecFilter: false,
|
416
|
423
|
deptName: '',
|
417
|
424
|
currentId: 0,
|
418
|
425
|
otherAssociationTypeId: null,
|
419
|
426
|
hosId: uni.getStorageSync('userData').user.currentHospital.id,
|
|
427
|
+ workState: '1',
|
420
|
428
|
clinicalMultiplayerMode: 0,
|
421
|
429
|
showAppendUser: 0,
|
422
|
430
|
signType4: false,
|
|
@@ -500,6 +508,14 @@
|
500
|
508
|
models2: {
|
501
|
509
|
disjunctor: false,
|
502
|
510
|
},
|
|
511
|
+ // 弹窗model
|
|
512
|
+ models3: {
|
|
513
|
+ disjunctor: false,
|
|
514
|
+ },
|
|
515
|
+ // 弹窗model
|
|
516
|
+ models4: {
|
|
517
|
+ disjunctor: false,
|
|
518
|
+ },
|
503
|
519
|
// 悬浮按钮样式
|
504
|
520
|
pattern: {
|
505
|
521
|
buttonColor: "#6cc076",
|
|
@@ -617,6 +633,15 @@
|
617
|
633
|
this.getBloodPageConfig()
|
618
|
634
|
this.waitingOrdersGetNum();
|
619
|
635
|
this.executingOrders(0);
|
|
636
|
+ this.getWorkStateList();
|
|
637
|
+ },
|
|
638
|
+ getWorkStateList(){
|
|
639
|
+ post('/common/common/getDictionary', {
|
|
640
|
+ "type": "list",
|
|
641
|
+ "key": "user_work_state"
|
|
642
|
+ }).then(res => {
|
|
643
|
+ this.workStateList = res;
|
|
644
|
+ });
|
620
|
645
|
},
|
621
|
646
|
// 获取血制品页面控制开关
|
622
|
647
|
async getBloodPageConfig(){
|
|
@@ -754,7 +779,6 @@
|
754
|
779
|
}else if(Object.prototype.toString.call(user).slice(8, -1).toLowerCase() === 'string'){
|
755
|
780
|
let identityCardNumber = user;
|
756
|
781
|
// 根据身份证获取name
|
757
|
|
- // todo
|
758
|
782
|
post("/data/fetchDataList/user", {idx: 0, sum: 1, user: { identityCardNumber }}).then((result) => {
|
759
|
783
|
uni.hideLoading();
|
760
|
784
|
if(result.status == 200){
|
|
@@ -880,6 +904,95 @@
|
880
|
904
|
disjunctor: true,
|
881
|
905
|
}
|
882
|
906
|
},
|
|
907
|
+ //确定
|
|
908
|
+ ok4() {
|
|
909
|
+ this.models4.disjunctor = false;
|
|
910
|
+ uni.showLoading({
|
|
911
|
+ title: "加载中",
|
|
912
|
+ mask: true,
|
|
913
|
+ });
|
|
914
|
+ post("/user/data/changeWorkState", {
|
|
915
|
+ workState: this.workStateList.find(v => v.value == 1).id,
|
|
916
|
+ }).then((res) => {
|
|
917
|
+ uni.hideLoading();
|
|
918
|
+ if (res.status == 200) {
|
|
919
|
+ this.getCurrentUserNow();
|
|
920
|
+ this.models4 = {
|
|
921
|
+ disjunctor: true,
|
|
922
|
+ title: "提示",
|
|
923
|
+ content: `示闲成功`,
|
|
924
|
+ icon: "warn",
|
|
925
|
+ operate: {
|
|
926
|
+ know: "知道了",
|
|
927
|
+ },
|
|
928
|
+ };
|
|
929
|
+ }else{
|
|
930
|
+ uni.showToast({
|
|
931
|
+ icon: "none",
|
|
932
|
+ title: res.msg || "接口获取数据失败!",
|
|
933
|
+ });
|
|
934
|
+ }
|
|
935
|
+ });
|
|
936
|
+ },
|
|
937
|
+ //取消
|
|
938
|
+ cancel4() {
|
|
939
|
+ this.models4.disjunctor = false;
|
|
940
|
+ },
|
|
941
|
+ //取消
|
|
942
|
+ know4() {
|
|
943
|
+ this.models4.disjunctor = false;
|
|
944
|
+ },
|
|
945
|
+ // 示闲
|
|
946
|
+ showLeisure(){
|
|
947
|
+ this.models4 = {
|
|
948
|
+ disjunctor: true,
|
|
949
|
+ title: "提示",
|
|
950
|
+ content: "您确认要示闲吗?",
|
|
951
|
+ icon: "warn",
|
|
952
|
+ operate: {
|
|
953
|
+ ok: "确定",
|
|
954
|
+ cancel: "取消",
|
|
955
|
+ },
|
|
956
|
+ };
|
|
957
|
+ },
|
|
958
|
+ // 示忙
|
|
959
|
+ showBusy(){
|
|
960
|
+ uni.showLoading({
|
|
961
|
+ title: "加载中",
|
|
962
|
+ mask: true,
|
|
963
|
+ });
|
|
964
|
+ let postData = {"idx":0,"workScheme":{"status":1,"hosId":this.hosId},"sum":1};
|
|
965
|
+ post("/simple/data/fetchDataList/workScheme", postData).then((res) => {
|
|
966
|
+ uni.hideLoading();
|
|
967
|
+ if (res.status == 200) {
|
|
968
|
+ let config = res.list.length ? res.list[0] : {};
|
|
969
|
+ let list = [];
|
|
970
|
+ for (let key in config) {
|
|
971
|
+ if(key.includes('busyContent') && config[key]){
|
|
972
|
+ list.push({
|
|
973
|
+ busyContent: config[key],
|
|
974
|
+ busyMinute: config['busyMinute' + key.replace('busyContent', '')],
|
|
975
|
+ });
|
|
976
|
+ }
|
|
977
|
+ }
|
|
978
|
+ this.models3 = {
|
|
979
|
+ disjunctor: true,
|
|
980
|
+ title: "提示",
|
|
981
|
+ content: "请选择暂停工作的原因。",
|
|
982
|
+ icon: "warn",
|
|
983
|
+ list,
|
|
984
|
+ operate: {
|
|
985
|
+ cancel: "取消",
|
|
986
|
+ },
|
|
987
|
+ };
|
|
988
|
+ } else {
|
|
989
|
+ uni.showToast({
|
|
990
|
+ icon: "none",
|
|
991
|
+ title: res.msg || "接口获取数据失败!",
|
|
992
|
+ });
|
|
993
|
+ }
|
|
994
|
+ });
|
|
995
|
+ },
|
883
|
996
|
// 手动查询标本-确认
|
884
|
997
|
speOk(data) {
|
885
|
998
|
console.log(data);
|
|
@@ -1012,6 +1125,14 @@
|
1012
|
1125
|
this.content.push({
|
1013
|
1126
|
text: "药品录入",
|
1014
|
1127
|
});
|
|
1128
|
+ } else if (item.link === "workState" && this.workState == 1) {
|
|
1129
|
+ this.content.push({
|
|
1130
|
+ text: "示闲",
|
|
1131
|
+ });
|
|
1132
|
+ } else if (item.link === "workState" && this.workState == 2) {
|
|
1133
|
+ this.content.push({
|
|
1134
|
+ text: "示忙",
|
|
1135
|
+ });
|
1015
|
1136
|
} else if (item.link === "wxTakeMedicine") {
|
1016
|
1137
|
this.content.push({
|
1017
|
1138
|
text: "摆药取药",
|
|
@@ -1494,6 +1615,10 @@
|
1494
|
1615
|
this.showHandViewSpecimen();
|
1495
|
1616
|
} else if (e.item.text === "药品录入") {
|
1496
|
1617
|
this.showHandViewDrugsbag();
|
|
1618
|
+ } else if (e.item.text === "示忙") {
|
|
1619
|
+ this.showLeisure();
|
|
1620
|
+ } else if (e.item.text === "示闲") {
|
|
1621
|
+ this.showBusy();
|
1497
|
1622
|
} else if (e.item.text === "摆药取药") {
|
1498
|
1623
|
this.handleTakeMedicine()
|
1499
|
1624
|
} else if (e.item.text === "我的二维码") {
|
|
@@ -1675,6 +1800,47 @@
|
1675
|
1800
|
}
|
1676
|
1801
|
});
|
1677
|
1802
|
},
|
|
1803
|
+ //确定
|
|
1804
|
+ ok3(busyContent) {
|
|
1805
|
+ console.log(busyContent);
|
|
1806
|
+ this.models3.disjunctor = false;
|
|
1807
|
+ uni.showLoading({
|
|
1808
|
+ title: "加载中",
|
|
1809
|
+ mask: true,
|
|
1810
|
+ });
|
|
1811
|
+ post("/user/data/changeWorkState", {
|
|
1812
|
+ workState: this.workStateList.find(v => v.value == 2).id,
|
|
1813
|
+ minute: busyContent.busyMinute,
|
|
1814
|
+ workStateRemark: busyContent.busyContent,
|
|
1815
|
+ }).then((res) => {
|
|
1816
|
+ uni.hideLoading();
|
|
1817
|
+ if (res.status == 200) {
|
|
1818
|
+ this.getCurrentUserNow();
|
|
1819
|
+ this.models3 = {
|
|
1820
|
+ disjunctor: true,
|
|
1821
|
+ title: "提示",
|
|
1822
|
+ content: `您上班状态修改为<strong class="red">${busyContent.busyContent}</strong>,<strong class="red">${busyContent.busyMinute}</strong>分钟后自动恢复`,
|
|
1823
|
+ icon: "warn",
|
|
1824
|
+ operate: {
|
|
1825
|
+ know: "知道了",
|
|
1826
|
+ },
|
|
1827
|
+ };
|
|
1828
|
+ }else{
|
|
1829
|
+ uni.showToast({
|
|
1830
|
+ icon: "none",
|
|
1831
|
+ title: res.msg || "接口获取数据失败!",
|
|
1832
|
+ });
|
|
1833
|
+ }
|
|
1834
|
+ });
|
|
1835
|
+ },
|
|
1836
|
+ //取消
|
|
1837
|
+ cancel3() {
|
|
1838
|
+ this.models3.disjunctor = false;
|
|
1839
|
+ },
|
|
1840
|
+ //知道了
|
|
1841
|
+ know3() {
|
|
1842
|
+ this.models3.disjunctor = false;
|
|
1843
|
+ },
|
1678
|
1844
|
// 扫描工牌-被服洗涤
|
1679
|
1845
|
quiltScan() {
|
1680
|
1846
|
if (!this.SMFlag) {
|
|
@@ -2045,7 +2211,7 @@
|
2045
|
2211
|
updateUser(dept) {
|
2046
|
2212
|
post("/user/data/bindDutyDept", {dutyDept: +dept.id}).then((res) => {
|
2047
|
2213
|
if (res.status == 200) {
|
2048
|
|
- this.getCurrentUserNow();
|
|
2214
|
+ this.getCurrentUserNow(true);
|
2049
|
2215
|
}else{
|
2050
|
2216
|
uni.showToast({
|
2051
|
2217
|
icon: "none",
|
|
@@ -2055,14 +2221,23 @@
|
2055
|
2221
|
})
|
2056
|
2222
|
},
|
2057
|
2223
|
// 重新获取用户信息
|
2058
|
|
- getCurrentUserNow() {
|
|
2224
|
+ getCurrentUserNow(updateDept = false) {
|
2059
|
2225
|
get("/user/data/getCurrentUser").then((res) => {
|
2060
|
2226
|
if (res.status == 200) {
|
2061
|
2227
|
let userData = uni.getStorageSync('userData');
|
2062
|
2228
|
userData.user = res.data;
|
2063
|
2229
|
uni.setStorageSync('userData', userData);
|
2064
|
2230
|
// 显示科室二维码
|
2065
|
|
- this.departmentQrcodeHandler()
|
|
2231
|
+ if(updateDept){
|
|
2232
|
+ this.departmentQrcodeHandler()
|
|
2233
|
+ }else{
|
|
2234
|
+ this.workState = uni.getStorageSync('userData').user.workState ? uni.getStorageSync('userData').user.workState.value : '1';
|
|
2235
|
+ this.content.forEach(v => {
|
|
2236
|
+ if(v.text == '示忙' || v.text == '示闲'){
|
|
2237
|
+ v.text = this.workState == 1 ? '示闲' : '示忙';
|
|
2238
|
+ }
|
|
2239
|
+ })
|
|
2240
|
+ }
|
2066
|
2241
|
}else{
|
2067
|
2242
|
uni.showToast({
|
2068
|
2243
|
icon: "none",
|
|
@@ -2073,7 +2248,9 @@
|
2073
|
2248
|
},
|
2074
|
2249
|
},
|
2075
|
2250
|
onLoad(options) {
|
|
2251
|
+ console.log(uni.getStorageSync('userData').user);
|
2076
|
2252
|
console.log(options, 'options');
|
|
2253
|
+ this.workState = uni.getStorageSync('userData').user.workState ? uni.getStorageSync('userData').user.workState.value : '1';
|
2077
|
2254
|
// 获取菜单权限
|
2078
|
2255
|
this.getMenu();
|
2079
|
2256
|
post("/auth/getUserWorkDept", {}).then((ress) => {
|