提交 1d11b268 编写于 作者: changdi.hao's avatar changdi.hao

Merge branch 'feature/hcd-ui' into 'develop'

Feature/hcd ui

See merge request com.pica.cloud.education.frontend/pica-admin-consultation!60
<template> <template>
<div class="diagnosis-list-content"> <div class="diagnosis-list-content">
<div class="select-content screenSet"> <div class="select-content screenSet content-top">
<div class="title">我的工作台</div> <div class="title">我的工作台</div>
</div> <!-- 时间 -->
<div class="select-content screenSet"> <el-row type="flex" justify="center">
<!-- 时间 --> <div id="picker">
<el-row type="flex" justify="center" > <div class="block">
<div id="picker">
<div class="block">
<el-date-picker <el-date-picker
@change="changeDatetime" @change="changeDatetime"
v-model="searchParam.dateTime" v-model="searchParam.dateTime"
type="date" type="date"
clear-icon="el-input-icon" clear-icon="el-input-icon"
:clearable='false'> :clearable="false"
>
</el-date-picker> </el-date-picker>
</div> </div>
</div> </div>
</el-row> </el-row>
<!-- tab栏 --> <!-- tab栏 -->
<el-radio-group @change="tabChange" v-model="tabPosition" style="margin-bottom: 30px;"> <el-radio-group
<el-radio-button v-for="(item, index) in currentCalList" :key="'for'+index" :label="item.status"> @change="tabChange"
{{item.statusStr}}({{item.count}}) v-model="tabPosition"
class="workbench-tab"
>
<el-radio-button
v-for="(item, index) in currentCalList"
:key="'for' + index"
:label="item.status"
>
{{ item.statusStr }}({{ item.count }})
<i class="circle-red"></i>
</el-radio-button> </el-radio-button>
<!-- <el-radio-button label="1">待处理({{currentCalList}})</el-radio-button>--> <!-- <el-radio-button label="1">待处理({{currentCalList}})</el-radio-button>-->
</el-radio-group> </el-radio-group>
</div>
<div class="select-content screenSet">
<div class="forbox"> <div class="forbox">
<div class="for" v-for="(item, index) in currentDiagList" :key="'for'+index"> <div
class="for"
v-for="(item, index) in currentDiagList"
:key="'for' + index"
>
<inquiryList-component :item="item"></inquiryList-component> <inquiryList-component :item="item"></inquiryList-component>
</div> </div>
</div> </div>
<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="searchParam.pageNo" :current-page="searchParam.pageNo"
:page-sizes="[6, 12, 18, 24]" :page-sizes="[6, 12, 18, 24]"
:page-size="searchParam.pageSize" :page-size="searchParam.pageSize"
layout="prev, pager, next, sizes, jumper" layout="prev, pager, next, sizes, jumper"
:total="totalRows"> :total="totalRows"
</el-pagination> >
</el-pagination>
</el-row> </el-row>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
import { mapState } from "vuex"; import { mapState } from "vuex";
import storejs from 'storejs'; 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,
}, },
computed:{ computed: {
...mapState({ ...mapState({
currentDiagList: 'currentDiagList', currentDiagList: "currentDiagList",
currentCalList: 'currentCalList', currentCalList: "currentCalList",
soketQuest:'soketQuest', soketQuest: "soketQuest",
isSuperAdmin: 'isSuperAdmin' isSuperAdmin: "isSuperAdmin",
}), }),
}, },
watch: { watch: {
isSuperAdmin(newdata,olddata){ isSuperAdmin(newdata, olddata) {
if(newdata !==olddata && newdata.userID){ if (newdata !== olddata && newdata.userID) {
const s = storejs.get('soketQuest'); const s = storejs.get("soketQuest");
const d = s ? s.dateTime : new Date().format('yyyy-MM-dd'); const d = s ? s.dateTime : new Date().format("yyyy-MM-dd");
console.log('---s', s, this.isSuperAdmin); console.log("---s", s, this.isSuperAdmin);
let id = s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID; let id =
s && s.operateUserId ? s.operateUserId : this.isSuperAdmin.userID;
const p = { const p = {
dateTime: d, dateTime: d,
operateUserId: id, operateUserId: id,
pageNo: s ? s.pageNo : 1, pageNo: s ? s.pageNo : 1,
pageSize: s ? s.pageSize : 6, pageSize: s ? s.pageSize : 6,
returnStatus: s ? s.returnStatus : 1, returnStatus: s ? s.returnStatus : 1,
}; };
this.searchParam = p; this.searchParam = p;
this.inquirySearch() this.inquirySearch();
} }
} },
}, },
data(){ data() {
const s = storejs.get('soketQuest'); const s = storejs.get("soketQuest");
const d = s ? s.dateTime : new Date().format('yyyy-MM-dd'); const d = s ? s.dateTime : new Date().format("yyyy-MM-dd");
return { return {
tabPosition:"1", tabPosition: "1",
showChat: true, showChat: true,
totalRows:40, totalRows: 40,
loading:false, loading: false,
searchParam: { searchParam: {
dateTime: d, dateTime: d,
operateUserId: '', operateUserId: "",
returnStatus: 1, returnStatus: 1,
pageSize: 1, pageSize: 1,
pageNo: 1, pageNo: 1,
},
testlistdata: [
{
appointBeginTime: "2021-07-29T05:28:57.396Z",
appointEndTime: "2021-07-29T05:28:57.396Z",
department: "内科",
departmentId: 3876,
diagnoseLogId: 38,
diagnoseType: 1,
doctorCallKfStatus: 1,
doctorCallTime: "",
doctorId: 0,
doctorMobile: "16789987665",
doctorName: "孙思邈",
doctorTrtcEntryStatus: 1,
imStatus: 0,
imTeamId: "3854284100",
returnStatus: 1,
roomId: "string",
sort: 0,
status: 0,
userCallKfStatus: 0,
userCallTime: "",
userId: 0,
userMobile: "12343123233",
userName: "孙思邈",
userTrtcEntryStatus: 0,
}, },
testlistdata: [ ],
{ };
"appointBeginTime": "2021-07-29T05:28:57.396Z", },
"appointEndTime": "2021-07-29T05:28:57.396Z", created() {},
"department": "内科", methods: {
"departmentId": 3876, tabChange(val) {
"diagnoseLogId": 38, const s = this.searchParam;
"diagnoseType": 1, s.returnStatus = val;
"doctorCallKfStatus": 1, this.searchParam = s;
"doctorCallTime": "", this.inquirySearch();
"doctorId": 0, },
"doctorMobile": "16789987665", changeDatetime(val) {
"doctorName": "孙思邈", const s = this.searchParam;
"doctorTrtcEntryStatus": 1, s.dateTime = val.format("yyyy-MM-dd");
"imStatus": 0, this.searchParam = s;
"imTeamId": "3854284100", this.inquirySearch();
"returnStatus": 1, },
"roomId": "string", handleSizeChange(val) {
"sort": 0, const s = this.searchParam;
"status": 0, s.pageSize = val;
"userCallKfStatus": 0, this.searchParam = s;
"userCallTime": "", },
"userId": 0, handleCurrentChange(val) {
"userMobile": "12343123233", const s = this.searchParam;
"userName": "孙思邈", s.pageNo = val;
"userTrtcEntryStatus": 0 this.searchParam = s;
} this.inquirySearch();
] },
} inquirySearch() {
}, const p = this.searchParam;
created(){ this.POST("/diagnose/socket/condition/update", p).then((res) => {
if (res.code == "000000") {
}, this.$store.commit("updateSoketQuest", p);
methods:{ } else {
tabChange (val) { this.$message({
const s = this.searchParam; message: res.message,
s.returnStatus = val; type: "warning",
this.searchParam = s; duration: 1000,
this.inquirySearch() });
}, }
changeDatetime (val) { });
const s = this.searchParam; // 测试代码
s.dateTime = val.format('yyyy-MM-dd'); // const l = this.currentDiagList;
this.searchParam = s; // l.push(...this.testlistdata);
this.inquirySearch() // this.$store.commit('updateCurrentDiagList', l);
}, // this.$store.commit('socket/SET_NOTIFY', ...this.testlistdata);
handleSizeChange (val) { },
const s = this.searchParam; },
s.pageSize = val; };
this.searchParam = s;
},
handleCurrentChange (val) {
const s = this.searchParam;
s.pageNo = val;
this.searchParam = s;
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;
// l.push(...this.testlistdata);
// this.$store.commit('updateCurrentDiagList', l);
// this.$store.commit('socket/SET_NOTIFY', ...this.testlistdata);
},
},
}
</script> </script>
<style lang='scss' scoped> <style lang='scss'>
.workbench-tab {
.el-radio-button__inner {
border: none;
position: relative;
&::after {
content: "";
position: absolute;
bottom: 0;
left: 50%;
right: 0;
height: 2px;
background: #fff;
width: 20px;
transform: translateX(-50%);
}
.circle-red {
display: block;
position: absolute;
width: 10px;
height: 10px;
border-radius: 50%;
background: red;
right: 15px;
top: 7px;
}
}
.el-radio-button:first-child .el-radio-button__inner {
border: none;
}
.el-radio-button__orig-radio:checked + .el-radio-button__inner {
background-color: #fff;
color: #0d9078;
box-shadow: none;
font-weight: 500;
&::after {
background: #0d9078;
}
}
}
</style>
<style lang="scss" scoped>
::v-deep { ::v-deep {
.el-date-editor{ .el-date-editor {
.el-input__inner{ .el-input__inner {
background:red; background: red;
}
} }
}
} }
.forbox {
.forbox{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
// justify-content: space-between; // justify-content: space-between;
.for{ .for {
max-width: 50%; max-width: 50%;
display: flex; display: flex;
} }
} }
</style>
<style lang="scss" scoped>
.diagnosis-list-content { .diagnosis-list-content {
.select-content { .select-content {
margin-bottom: 10px; margin-bottom: 10px;
padding: 10px; padding: 10px;
background: #fff; background: #fff;
overflow: hidden !important; overflow: hidden !important;
&.content-top {
padding-bottom: 0;
}
.title { .title {
height: 50px; height: 50px;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
} }
.radio{ .radio {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
.el-radio-group { .el-radio-group {
margin-bottom: -1px !important; margin-bottom: -1px !important;
} }
} }
} }
} }
.el-row { .el-row {
margin-bottom: 20px; margin-bottom: 20px;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
}
}
.el-col {
border-radius: 4px;
}
.bg-purple-dark {
background: #99a9bf;
}
.bg-purple {
background: #d3dce6;
}
.bg-purple-light {
background: #e5e9f2;
} }
.grid-content { }
border-radius: 4px; .el-col {
min-height: 45px; border-radius: 4px;
display: flex; }
justify-content: space-evenly; .bg-purple-dark {
align-items: center; background: #99a9bf;
font-size: 16px; }
.bg-purple {
background: #d3dce6;
}
.bg-purple-light {
background: #e5e9f2;
}
.grid-content {
border-radius: 4px;
min-height: 45px;
display: flex;
justify-content: space-evenly;
align-items: center;
font-size: 16px;
}
.row-bg {
padding: 10px 0;
background-color: #f9fafc;
}
@media screen and (min-width: 1900px) {
.forbox {
.for {
width: 30%;
} }
.row-bg {
padding: 10px 0;
background-color: #f9fafc;
}
@media screen and (min-width:1900px){
.forbox{
.for {
width: 30%;
}
} }
} }
</style> </style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册