提交 01fa841b 编写于 作者: 张磊's avatar 张磊

Merge branch 'feat/zl' into 'develop'

Feat/zl

See merge request !53
...@@ -8040,6 +8040,11 @@ ...@@ -8040,6 +8040,11 @@
} }
} }
}, },
"storejs": {
"version": "1.1.0",
"resolved": "http://192.168.110.93:4873/storejs/-/storejs-1.1.0.tgz",
"integrity": "sha1-9jvkPHR8FL46excBg5KTgJHWRnk="
},
"stream-browserify": { "stream-browserify": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "http://192.168.110.93:4873/stream-browserify/-/stream-browserify-2.0.2.tgz", "resolved": "http://192.168.110.93:4873/stream-browserify/-/stream-browserify-2.0.2.tgz",
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
"qiniu-js": "^3.1.2", "qiniu-js": "^3.1.2",
"showdown": "^1.6.4", "showdown": "^1.6.4",
"socket.io-client": "2.2.0", "socket.io-client": "2.2.0",
"storejs": "^1.1.0",
"vue": "^2.1.0", "vue": "^2.1.0",
"vue-router": "^2.1.1", "vue-router": "^2.1.1",
"vuex": "^2.0.0" "vuex": "^2.0.0"
......
...@@ -62,13 +62,14 @@ export default { ...@@ -62,13 +62,14 @@ export default {
created() { created() {
vm = this; vm = this;
vm.getToken(); vm.getToken();
window._VM = vm;
}, },
mounted() { mounted() {
setTimeout( function () { setTimeout( function () {
bindDragHeader('.c-header', '.chat-wrap'); bindDragHeader('.c-header', '.chat-wrap');
}, 1000) }, 1000)
this.$store.dispatch( 'socket/initSocket',{url: 'http://10.177.11.251:15202'}) // this.$store.dispatch( 'socket/initSocket',{url: 'http://10.177.11.251:15202'})
}, },
methods: { methods: {
...@@ -129,7 +130,8 @@ export default { ...@@ -129,7 +130,8 @@ export default {
vm.authList = authList; vm.authList = authList;
} }
}); });
} },
closeGlobalMsgNotice () {}
} }
}; };
</script> </script>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<p class="text-num">{{item.role == 1 ? currentChat.doctorMobile : currentChat.userMobile}}</p> <p class="text-num">{{item.role == 1 ? currentChat.doctorMobile : currentChat.userMobile}}</p>
</div> </div>
</div> </div>
<div class="viedo"> <div class="viedo" :id="rtc.viewslist[index] ? rtc.viewslist[index].id : ''">
<el-button class="call-btn" :disabled="item.status === 2" @click="drivingCall(item)" > <el-button class="call-btn" :disabled="item.status === 2" @click="drivingCall(item)" >
{{ showText(item.status, item.role, item) }} {{ showText(item.status, item.role, item) }}
</el-button> </el-button>
...@@ -76,6 +76,17 @@ export default { ...@@ -76,6 +76,17 @@ export default {
default: '' default: ''
} }
}, },
watch: {
currentChat(newVal, oldVal) {
if(newVal !== oldVal && newVal.imTeamId){
const {imTeamId, diagnoseLogId} = this.currentChat;
console.log('---currentChat', this.currentChat);
this.tid = imTeamId|| "3854284100";
this.diagnoseLogId = diagnoseLogId || "38";
this.init();
}
}
},
data() { data() {
return { return {
closeCallImg: require("../../assets/image/live/close-call.png"), closeCallImg: require("../../assets/image/live/close-call.png"),
...@@ -116,12 +127,6 @@ export default { ...@@ -116,12 +127,6 @@ export default {
}; };
}, },
created() { created() {
const {imTeamId, diagnoseLogId} = this.currentChat;
console.log('---currentChat', this.currentChat);
this.tid = imTeamId|| "3854284100";
this.diagnoseLogId = diagnoseLogId || "38";
// openLoading(this);
this.init();
}, },
computed: { computed: {
...mapState({ ...mapState({
...@@ -387,7 +392,7 @@ export default { ...@@ -387,7 +392,7 @@ export default {
let text = ""; let text = "";
switch (status) { switch (status) {
case 1: case 1:
text = "呼叫"; text = "呼叫医生";
break; break;
case 3: case 3:
text = "已离线"; text = "已离线";
......
<template> <template>
<div class="consultationlist" style=" user-select:none; "> <div class="consultationlist" style=" user-select:none; ">
<div class="list"> <div class="list">
<div class="name">刘思妙</div> <div class="name">{{ operatorsItem.name || ''}}</div>
<div class="details" @click="goworkBench"> <div class="details" @click="goworkBench">
<div class="handle">待处理 <span>128</span></div> <div class="handle">待处理: <span> 暂无</span></div>
<div class="see"> <div class="see">
<a href="#">查看详情</a> <a href="#">查看详情</a>
<i class="el-icon-arrow-right"></i> <i class="el-icon-arrow-right"></i>
...@@ -12,19 +12,19 @@ ...@@ -12,19 +12,19 @@
</div> </div>
<div class="data"> <div class="data">
<div> <div>
<div class="totallist">3519</div> <div class="totallist">暂无</div>
<div class="statelist">全部</div> <div class="statelist">全部</div>
</div> </div>
<div> <div>
<div class="totallist">3519</div> <div class="totallist">暂无</div>
<div class="statelist">全部</div> <div class="statelist">全部</div>
</div> </div>
<div> <div>
<div class="totallist">3519</div> <div class="totallist">暂无</div>
<div class="statelist">全部</div> <div class="statelist">全部</div>
</div> </div>
<div> <div>
<div class="totallist">3519</div> <div class="totallist">暂无</div>
<div class="statelist">全部</div> <div class="statelist">全部</div>
</div> </div>
</div> </div>
...@@ -35,19 +35,15 @@ ...@@ -35,19 +35,15 @@
export default { export default {
data() { data() {
return { return {
userId:"",
searchParam :{
dateTime: '',
operateUserId: '',
returnStatus: 1,
pageSize: 6,
pageNo: 1,
}
} }
}, },
props:{ props:{
valuenow:{ operatorsItem:{
type:String, type: Object,
default:{}
},
workbenchAdminDate: {
type: String,
default:'' default:''
} }
}, },
...@@ -55,20 +51,27 @@ export default { ...@@ -55,20 +51,27 @@ export default {
}, },
methods: { methods: {
goworkBench() { goworkBench() {
this.searchParam.dateTime = this.valuenow const p = {
this.searchParam.operateUserId = '11' dateTime: this.workbenchAdminDate,
this.POST('/diagnose/socket/condition/update',this.searchParam).then(res=>{ operateUserId: this.operatorsItem.id,
if(res.code == '000000'){ pageNo: 1,
this.$store.commit('updateSoketQuest', this.searchParam) pageSize: 6,
this.$router.push({path:'/workbench'}) returnStatus: 1
}else{ };
this.$message({ this.$store.commit('updateSoketQuest', p)
message: '跳转失败,请再试一次', this.$router.push({path:'/workbench'})
type: "warning", //
duration:1000 // this.POST('/diagnose/socket/condition/update', p).then(res=>{
}); // if(res.code == '000000'){
} //
}) // }else{
// this.$message({
// message: res.message,
// type: "warning",
// duration:1000
// });
// }
// })
} }
} }
}; };
......
...@@ -84,7 +84,6 @@ export default { ...@@ -84,7 +84,6 @@ export default {
...mapState({ ...mapState({
showChat: 'showChat', showChat: 'showChat',
showAdvice:'showAdvice', showAdvice:'showAdvice',
currentuserId:'currentuserId'
}), }),
diagnoseType() { diagnoseType() {
switch(this.item.diagnoseType) { switch(this.item.diagnoseType) {
...@@ -156,24 +155,25 @@ export default { ...@@ -156,24 +155,25 @@ export default {
return false; return false;
} }
const i = this.item; const i = this.item;
if(i.imTeamId){ // if(i.imTeamId){
const params = { // const params = {
teamIdList: [i.imTeamId] // teamIdList: [i.imTeamId]
} // }
this.POST(`/im/team/call/op/ack/`,params).then(res=>{ // this.POST(`/im/team/call/op/ack/`,params).then(res=>{
if(res.code == '000000'){ // if(res.code == '000000'){
this.$store.commit('updateShowChat', true); // this.$store.commit('updateShowChat', true);
this.$store.commit('updateCurrentChat', i); // this.$store.commit('updateCurrentChat', i);
} // }
}).catch(err=>{ // }).catch(err=>{
this.$message({ // this.$message({
message: err.message, // message: err.message,
type: "warning", // type: "warning",
duration:1000 // duration:1000
}); // });
}) // })
//
} // }
this.$store.dispatch('gotoInquiry', i);
}, },
openAdvice() { openAdvice() {
if(this.showAdvice){ if(this.showAdvice){
......
export default {
gotoInquiry ({ commit }, current) {
if(current.imTeamId){
const params = {
teamIdList: [current.imTeamId]
}
_VM.POST(`/im/team/call/op/ack/`,params).then(res=>{
if(res.code == '000000'){
commit('updateShowChat', true);
commit('updateCurrentChat', current);
}
}).catch(err=>{
_VM.$message({
message: err.message,
type: "warning",
duration:1000
});
})
}
},
}
...@@ -47,9 +47,13 @@ export default { ...@@ -47,9 +47,13 @@ export default {
state.socketClient.on("diagnose_call_push_event", (socket) => { state.socketClient.on("diagnose_call_push_event", (socket) => {
console.log('diagnose_call_push_event---', socket); console.log('diagnose_call_push_event---', socket);
const l = store.noticeList; const l = store.noticeList;
if(l.length >=5){
l.shift();
}
l.push(socket); l.push(socket);
const n = {notifyIndex: l.length, ...socket}
store.commit('updateNoticeList', l); store.commit('updateNoticeList', l);
store.commit('SET_NOTIFY', n);
}); });
state.socketClient.on('ping', function () { state.socketClient.on('ping', function () {
console.log('[E] 心跳请求已发出 →', true); console.log('[E] 心跳请求已发出 →', true);
...@@ -59,5 +63,37 @@ export default { ...@@ -59,5 +63,37 @@ export default {
console.log('[E] 心跳响应已收到 ←', true); console.log('[E] 心跳响应已收到 ←', true);
}); });
}, },
SET_NOTIFY: (state, payload) => {
console.log('--payload', payload)
let doms = document.getElementsByClassName('el-notification')
if (doms.length >= 5) return
const h = _VM.$createElement;
const cn = _VM.$notify({
title: `问诊单195(${payload.department})`,
message: h("p", [
h("i", {style: `color: teal;`}, `${payload.doctorName}正在呼叫你`),
h(
"el-button",
{
style: `float:right;margin-top:${30}px;`,
on: {
click: function () {
console.log('--click', payload)
store.dispatch('gotoInquiry', payload);
cn.close();
},
},
},
"进入诊室"
),
]),
onClose: function () {
console.log('--onClose',payload )
},
duration: 0,
position: 'top-right',
})
}
}, },
}; };
import storejs from 'storejs';
export default { export default {
updateCurrentDiagList(state, obj) { updateCurrentDiagList(state, obj) {
state.currentDiagList = obj; state.currentDiagList = obj;
...@@ -12,11 +14,8 @@ export default { ...@@ -12,11 +14,8 @@ export default {
state.currentAdvice = obj; state.currentAdvice = obj;
}, },
updateSoketQuest(state, obj) { updateSoketQuest(state, obj) {
storejs.set('soketQuest',obj);
state.soketQuest = obj; state.soketQuest = obj;
localStorage.setItem('soketQuest',obj)
},
updateSoketseach(state,obj) {
state.soketQuest = Object.assign({},state.soketQuest, obj);
}, },
updateShowChat(state, obj) { updateShowChat(state, obj) {
state.showChat = obj; state.showChat = obj;
...@@ -24,10 +23,10 @@ export default { ...@@ -24,10 +23,10 @@ export default {
updateShowAdvice(state, obj) { updateShowAdvice(state, obj) {
state.showAdvice = obj; state.showAdvice = obj;
}, },
updateCurrentuserId(state, obj) {
state.currentuserId = obj;
},
updateNoticeList(state, obj) { updateNoticeList(state, obj) {
state.noticeList = obj; state.noticeList = obj;
}, },
updateIsSuperAdmin(state, obj) {
state.isSuperAdmin = obj;
},
}; };
...@@ -5,10 +5,12 @@ export default { ...@@ -5,10 +5,12 @@ export default {
currentCalList:{}, currentCalList:{},
currentChat: {}, currentChat: {},
currentAdvice: {}, currentAdvice: {},
websoketList: {},
soketQuest: {}, soketQuest: {},
noticeList: [], noticeList: [],
currentuserId:null,
showChat:false, showChat:false,
showAdvice:false showAdvice:false,
isSuperAdmin: {
isSuper:false,
userID: ''
}
}; };
...@@ -28,35 +28,35 @@ body, div, span, header, footer, nav, section, aside, article, ul, dl, dt, dd, l ...@@ -28,35 +28,35 @@ body, div, span, header, footer, nav, section, aside, article, ul, dl, dt, dd, l
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/ /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
// ::-webkit-scrollbar // ::-webkit-scrollbar
// { // {
// width: 0px; // width: 0px;
// height: 0px; // height: 0px;
// background-color: #fff;
// }
/*定义滚动条轨道 内阴影+圆角*/
// ::-webkit-scrollbar-track
// {
// -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
// border-radius: 10px;
// background-color: #fff; // background-color: #fff;
// } // }
/*定义滑块 内阴影+圆角*/ /*定义滚动条轨道 内阴影+圆角*/
// ::-webkit-scrollbar-thumb // ::-webkit-scrollbar-track
// { // {
// border-radius: 10px; // -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
// -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); // border-radius: 10px;
// background-color: #555; // background-color: #fff;
// } // }
/*定义滑块 内阴影+圆角*/
// ::-webkit-scrollbar-thumb
// {
// border-radius: 10px;
// -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
// background-color: #555;
// }
input[type="button"], input[type="submit"], input[type="search"], input[type="reset"] { input[type="button"], input[type="submit"], input[type="search"], input[type="reset"] {
-webkit-appearance: none; -webkit-appearance: none;
} }
textarea { -webkit-appearance: none;} textarea { -webkit-appearance: none;}
html,body{ html,body{
height: 100%; height: 100%;
...@@ -167,14 +167,14 @@ html,body{ ...@@ -167,14 +167,14 @@ html,body{
background: #fafafa; background: #fafafa;
} }
//下拉框 //下拉框
.el-dropdown-menu .el-popper { .el-dropdown-menu .el-popper {
top: 48px; top: 48px;
} }
// 消息推送 // 消息推送
.el-notification.right { .el-notification.right {
top: 130px !important; //top: 130px !important;
} }
// 弹框按钮样式 // 弹框按钮样式
...@@ -266,4 +266,4 @@ html,body{ ...@@ -266,4 +266,4 @@ html,body{
.viewer-button.viewer-close { .viewer-button.viewer-close {
display: none; display: none;
} }
\ No newline at end of file
...@@ -54,7 +54,7 @@ class RtcClient { ...@@ -54,7 +54,7 @@ class RtcClient {
userId: this.userId_, userId: this.userId_,
mirror: true mirror: true
}); });
this.startRTC() // this.startRTC()
} catch (e) { } catch (e) {
console.error('加入房间失败 ' + e); console.error('加入房间失败 ' + e);
this.vueInstance.reloadfn() this.vueInstance.reloadfn()
...@@ -425,5 +425,4 @@ class RtcClient { ...@@ -425,5 +425,4 @@ class RtcClient {
} }
} }
export default RtcClient export default RtcClient
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<div class="header"> <div class="header">
<!-- 面包屑 --> <!-- 面包屑 -->
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item> <el-breadcrumb-item >首页</el-breadcrumb-item>
<el-breadcrumb-item><a href="/">我的工作台</a></el-breadcrumb-item> <el-breadcrumb-item>我的工作台</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
<el-row style="margin-top: 30px"> <el-row style="margin-top: 30px">
<el-col :span="12"> <el-col :span="12">
...@@ -14,17 +14,12 @@ ...@@ -14,17 +14,12 @@
<el-col :span="12"> <el-col :span="12">
<el-date-picker <el-date-picker
style="margin-top: 10px" style="margin-top: 10px"
v-model="valuenow" v-model="workbenchAdminDate"
type="date" type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期" placeholder="选择日期"
> >
</el-date-picker> </el-date-picker>
<!-- <el-input
style="margin-top: 10px"
v-model="input1"
placeholder="请输入内容"
suffix-icon="el-icon-arrow-down"
></el-input> -->
</el-col> </el-col>
<el-col :span="12" style="margin-lfet: 10px"> <el-col :span="12" style="margin-lfet: 10px">
<div style="margin-left: 10px"> <div style="margin-left: 10px">
...@@ -69,55 +64,57 @@ ...@@ -69,55 +64,57 @@
</div> </div>
<!-- 问诊列表 --> <!-- 问诊列表 -->
<div class="box"> <div class="box">
<div class="row" v-for="item in 4" :key="item"> <div class="row" v-for="(item, index ) in operatorslist" :key="index">
<consultationlist :valuenow="valuenow"></consultationlist> <consultationlist :workbenchAdminDate="workbenchAdminDate" :operatorsItem="item"></consultationlist>
</div> </div>
</div> </div>
<!-- 底部 --> <!-- 底部 -->
<div class="footer"> <!-- <div class="footer">-->
<!-- 分页 --> <!-- &lt;!&ndash; 分页 &ndash;&gt;-->
<el-row type="flex" justify="end"> <!-- <el-row type="flex" justify="end">-->
<el-pagination <!-- <el-pagination-->
background <!-- background-->
@size-change="handleSizeChange" <!-- @size-change="handleSizeChange"-->
@current-change="handleCurrentChange" <!-- @current-change="handleCurrentChange"-->
:current-page="currentPage4" <!-- :current-page="currentPage"-->
:page-sizes="[100, 200, 300, 400]" <!-- :page-sizes="[100, 200, 300, 400]"-->
:page-size="100" <!-- :page-size="100"-->
layout="total, sizes, prev, pager, next" <!-- layout="total, sizes, prev, pager, next"-->
:total="400" <!-- :total="400"-->
> <!-- >-->
</el-pagination> <!-- </el-pagination>-->
</el-row> <!-- </el-row>-->
</div> <!-- </div>-->
</div> </div>
</template> </template>
<script> <script>
import consultationlist from "../../../components/common/consultation"; import consultationlist from "../../../components/common/consultation";
export default { export default {
components: {
consultationlist,
},
data() { data() {
const d = localStorage.getItem('workbenchAdminDate') || new Date().format('yyyy-MM-dd');
return { return {
valuenow: new Date().toLocaleDateString().split('/').join('-'), workbenchAdminDate: d,
currentPage4: 0, operatorslist: [],
}; };
}, },
components: {
consultationlist,
},
created() { created() {
this.init();
}, },
watch:{ watch:{
valuenow(n,o){
if(n){
console.log(this.valuenow);
}
}
}, },
methods: { methods: {
handleSizeChange() {}, init () {
handleCurrentChange() {}, this.GET("/diagnose/match/list").then(({ code, data }) => {
if (code == "000000") {
this.operatorslist = data;
}
});
}
}, },
}; };
</script> </script>
...@@ -178,6 +175,9 @@ export default { ...@@ -178,6 +175,9 @@ export default {
width: 100%; width: 100%;
flex-flow: row wrap; flex-flow: row wrap;
align-content: flex-start; align-content: flex-start;
min-height: 600px;
max-height: 700px;
overflow-y: scroll;
.row { .row {
flex: 0 0 50%; flex: 0 0 50%;
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="block"> <div class="block">
<el-date-picker <el-date-picker
@change="changeDatetime" @change="changeDatetime"
v-model="Datevalue" v-model="searchParam.dateTime"
type="date" type="date"
clear-icon="el-input-icon" clear-icon="el-input-icon"
:clearable='false'> :clearable='false'>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
</el-row> </el-row>
<!-- tab栏 --> <!-- tab栏 -->
<el-radio-group @change="changestatus" v-model="tabPosition" style="margin-bottom: 30px;"> <el-radio-group @change="tabChange" v-model="tabPosition" style="margin-bottom: 30px;">
<el-radio-button label="99">全部({{currentCalList}})</el-radio-button> <el-radio-button label="99">全部({{currentCalList}})</el-radio-button>
<el-radio-button label="1">待处理({{currentCalList}})</el-radio-button> <el-radio-button label="1">待处理({{currentCalList}})</el-radio-button>
<el-radio-button label="2">问诊中({{currentCalList}})</el-radio-button> <el-radio-button label="2">问诊中({{currentCalList}})</el-radio-button>
...@@ -50,8 +50,10 @@ ...@@ -50,8 +50,10 @@
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import storejs from 'storejs';
import InquiryListComponent from '../../../components/common/inquirylist.vue'; import InquiryListComponent from '../../../components/common/inquirylist.vue';
import store from "../../../store"; import store from "../../../store";
export default { export default {
components: { components: {
InquiryListComponent InquiryListComponent
...@@ -60,25 +62,26 @@ export default { ...@@ -60,25 +62,26 @@ export default {
...mapState({ ...mapState({
currentDiagList: 'currentDiagList', currentDiagList: 'currentDiagList',
currentCalList: 'currentCalList', currentCalList: 'currentCalList',
soketQuest:'soketQuest' soketQuest:'soketQuest',
isSuperAdmin: 'isSuperAdmin'
}), }),
}, },
data(){ data(){
const s = storejs.get('soketQuest');
const d = s ? s.dateTime : new Date().format('yyyy-MM-dd');
return { return {
tabPosition:"1", tabPosition:"1",
Datevalue: new Date(JSON.parse(localStorage.getItem( "administrator")).dateTime) || new Date(),
currentPage4:0,
showChat: true, showChat: true,
totalRows:40, totalRows:40,
loading:false, loading:false,
searchParam: { searchParam: {
dateTime: this.Datevalue, dateTime: d,
operateUserId: localStorage.getItem('userID'), operateUserId: '',
returnStatus: 1, returnStatus: 1,
pageSize: 6, pageSize: 6,
pageNo: 1, pageNo: 1,
}, },
list: [ testlistdata: [
{ {
"appointBeginTime": "2021-07-29T05:28:57.396Z", "appointBeginTime": "2021-07-29T05:28:57.396Z",
"appointEndTime": "2021-07-29T05:28:57.396Z", "appointEndTime": "2021-07-29T05:28:57.396Z",
...@@ -109,70 +112,62 @@ export default { ...@@ -109,70 +112,62 @@ export default {
} }
}, },
created(){ created(){
const s = storejs.get('soketQuest');
const d = s ? s.dateTime : new Date().format('yyyy-MM-dd');
let id = s ? s.operateUserId : this.isSuperAdmin.userID;
const p = {
dateTime: d,
operateUserId: id,
pageNo: s ? s.pageNo : 1,
pageSize: s ? s.pageSize : 6,
returnStatus: s ? s.returnStatus : 1,
};
this.searchParam = p;
this.inquirySearch() this.inquirySearch()
}, },
methods:{ methods:{
handleSizeChange(val){ tabChange (val) {
if(JSON.stringify(this.soketQuest)=="{}"){ const s = this.searchParam;
let condition = {pageSize:val} s.returnStatus = val;
this.$store.commit('updateSoketseach',condition) this.searchParam = s;
}else{
this.searchParam.pageSize = val
}
this.inquirySearch() this.inquirySearch()
}, },
handleCurrentChange(val){ changeDatetime (val) {
if(JSON.stringify(this.soketQuest)=="{}"){ const s = this.searchParam;
let condition = {pageNo:val} s.dateTime = val.format('yyyy-MM-dd');
this.$store.commit('updateSoketseach',condition) this.searchParam = s;
}else{
this.searchParam.pageNo = val
}
this.inquirySearch() this.inquirySearch()
}, },
changestatus(val){ handleSizeChange (val) {
if(JSON.stringify(this.soketQuest)=="{}"){ const s = this.searchParam;
let condition = {returnStatus:val,pageNo:1} s.pageSize = val;
this.$store.commit('updateSoketseach',condition) this.searchParam = s;
}else{ },
this.searchParam.returnStatus = val handleCurrentChange (val) {
this.searchParam.pageNo = 1 const s = this.searchParam;
} s.pageNo = val;
this.searchParam = s;
this.inquirySearch() this.inquirySearch()
},
inquirySearch() {
const p = this.searchParam;
this.POST('/diagnose/socket/condition/update', p).then(res=>{
if(res.code == '000000'){
this.$store.commit('updateSoketQuest', p)
}else{
this.$message({
message: res.message,
type: "warning",
duration:1000
});
}
})
// 测试代码 // 测试代码
const l = this.currentDiagList; const l = this.currentDiagList;
console.log('--l----', l) l.push(...this.testlistdata);
l.push(...this.list);
console.log('--l', l)
this.$store.commit('updateCurrentDiagList', l); this.$store.commit('updateCurrentDiagList', l);
// this.$store.commit('socket/SET_NOTIFY', ...this.testlistdata);
}, },
changeDatetime(val) {
if(JSON.stringify(this.soketQuest)=="{}"){
let condition = {dateTime:val.toLocaleDateString().split('/').join('-'),pageNo:1}
this.$store.commit('updateSoketseach',condition)
}else{
this.searchParam.dateTime = val.toLocaleDateString().split('/').join('-')
this.searchParam.pageNo = 1
}
this.inquirySearch()
},
inquirySearch() {
let params = null;
if(JSON.stringify(this.soketQuest)=="{}"){
params = this.searchParam
this.loading = true
}else{
params = this.soketQuest
this.loading = true
}
this.POST('/diagnose/socket/condition/update',params).then(res=>{
if(res.code == '000000'){
this.loading = false
console.log(res);
}
})
}
}, },
} }
</script> </script>
......
...@@ -67,9 +67,7 @@ export default { ...@@ -67,9 +67,7 @@ export default {
getNav() { getNav() {
this.POST("/basic-data/menu/list", { systemType: this.systemType }).then(res => { this.POST("/basic-data/menu/list", { systemType: this.systemType }).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
let { vueMenuDtos } = res.data; let { vueMenuDtos, userId } = res.data;
this.$store.commit('CurrentuserId',res.data.userId)
localStorage.setItem('userID', res.data.userId)
// let vueMenuDtos = []; // let vueMenuDtos = [];
// // TODO 开发调试时写死, 发布时去掉 // // TODO 开发调试时写死, 发布时去掉
...@@ -79,6 +77,21 @@ export default { ...@@ -79,6 +77,21 @@ export default {
// subs: [], // subs: [],
// title: "订单管理" // title: "订单管理"
// }]; // }];
const i = {
isSuper:false,
userID: userId
};
vueMenuDtos.map( item => {
if(item.index.indexOf('administrators') > -1){
// 超级管理员
i.isSuper = true;
}else{
// 普通用户
i.isSuper = false;
}
});
this.$store.commit('updateIsSuperAdmin', i);
this.items = vueMenuDtos; this.items = vueMenuDtos;
sessionStorage.setItem( sessionStorage.setItem(
"ADMIN_IM_CENTER_NAVS", "ADMIN_IM_CENTER_NAVS",
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册