Browse Source

peter

360view
newPeter7 2 years ago
parent
commit
a494697ee6
  1. 9
      src/components/patient-search/index.vue
  2. 16
      src/page-subspecialty/views/main-sidebar.vue
  3. 69
      src/page-subspecialty/views/modules/chargeManagement/alertList/index.vue
  4. 188
      src/page-subspecialty/views/modules/chargeManagement/alertSet/add-or-update.vue
  5. 104
      src/page-subspecialty/views/modules/chargeManagement/alertSet/index.vue
  6. 5
      src/page-subspecialty/views/modules/chargeManagement/index.vue
  7. 1
      src/page-subspecialty/views/modules/optometryManagement/dioptric/index.vue
  8. 1
      src/page-subspecialty/views/modules/outpatientManagement/treat/index.vue
  9. 5
      src/page-subspecialty/views/modules/propagandaManagement/index.vue
  10. 113
      src/page-subspecialty/views/modules/propagandaManagement/notification/add-propaganda.vue
  11. 96
      src/page-subspecialty/views/modules/propagandaManagement/notification/index.vue
  12. 158
      src/page-subspecialty/views/modules/propagandaManagement/statistics/index.vue
  13. 7
      src/page-subspecialty/views/modules/scientificManagement/subjectMgt/doctor/index.vue
  14. 10
      src/page-subspecialty/views/modules/scientificManagement/subjectMgt/ecrf/index.vue
  15. 4
      src/page-subspecialty/views/modules/scientificManagement/subjectMgt/index.vue
  16. 2
      src/page-subspecialty/views/modules/scientificManagement/subjectMgt/log/index.vue
  17. 197
      src/page-subspecialty/views/modules/scientificManagement/sys/depart-add-or-update.vue
  18. 83
      src/page-subspecialty/views/modules/scientificManagement/sys/depart.vue
  19. 72
      src/page-subspecialty/views/modules/scientificManagement/sys/log-error.vue
  20. 71
      src/page-subspecialty/views/modules/scientificManagement/sys/log-login.vue
  21. 144
      src/page-subspecialty/views/modules/scientificManagement/sys/log-operation.vue
  22. 237
      src/page-subspecialty/views/modules/scientificManagement/sys/menu-dept-add-or-update.vue
  23. 70
      src/page-subspecialty/views/modules/scientificManagement/sys/menu-dept.vue
  24. 237
      src/page-subspecialty/views/modules/scientificManagement/sys/menu-project-add-or-update.vue
  25. 69
      src/page-subspecialty/views/modules/scientificManagement/sys/menu-project.vue
  26. 6
      src/page-subspecialty/views/modules/scientificManagement/sys/project.vue
  27. 168
      src/page-subspecialty/views/modules/scientificManagement/sys/role-add-or-update.vue
  28. 109
      src/page-subspecialty/views/modules/scientificManagement/sys/role.vue
  29. 229
      src/page-subspecialty/views/modules/scientificManagement/sys/user-add-or-update.vue
  30. 153
      src/page-subspecialty/views/modules/scientificManagement/sys/user.vue
  31. 81
      src/page-subspecialty/views/modules/systemManagement/set/SMS-template/index.vue
  32. 187
      src/page-subspecialty/views/modules/systemManagement/set/alert-setting/add-or-update.vue
  33. 100
      src/page-subspecialty/views/modules/systemManagement/set/alert-setting/index.vue
  34. 174
      src/page-subspecialty/views/modules/systemManagement/set/case-template/add-or-update.vue
  35. 105
      src/page-subspecialty/views/modules/systemManagement/set/case-template/index.vue
  36. 382
      src/page-subspecialty/views/modules/systemManagement/set/followup-potocol.vue
  37. 65
      src/page-subspecialty/views/modules/systemManagement/set/index.vue
  38. 48
      src/page-subspecialty/views/pages/imageEdit.vue
  39. 216
      src/page-subspecialty/views/pages/satusScreen.vue
  40. 744
      src/page-subspecialty/views/pages/schedule.vue

9
src/components/patient-search/index.vue

@ -1,6 +1,6 @@
<template>
<div class="project-main">
<div v-if="!detailViewVisible">
<div v-if="!detailViewVisible" style="height: 100%">
<el-card shadow="never" class="aui-card--fill">
<el-form
:inline="true"
@ -219,6 +219,13 @@ export default {
</script>
<style lang='scss' scoped>
.aui-card--fill{
height: 100%;
::v-deep .el-card__body{
height: 100%;
overflow-y: auto;
}
}
.search-wrapper-top {
display: flex;
align-items: center;

16
src/page-subspecialty/views/main-sidebar.vue

@ -12,14 +12,14 @@
<sub-menu v-for="menu in $store.state.sidebarMenuList" :key="menu.id" :menu="menu" />
</el-menu>
</div>
<el-tooltip class="item" effect="dark" content="可点击下载操作手册" placement="top">
<div v-if="!$store.state.sidebarFold" class="sidebar-operation-manual" style="width:30px" @click="exportclick(wordData)">
<i class="el-icon-question" />
</div>
<div v-else class="sidebar-operation-manual" style="width:40px" @click="exportclick(wordData)">
<i class="el-icon-question" style="font-size:18px;" />
</div>
</el-tooltip>
<!-- <el-tooltip class="item" effect="dark" content="可点击下载操作手册" placement="top">-->
<!-- <div v-if="!$store.state.sidebarFold" class="sidebar-operation-manual" style="width:30px" @click="exportclick(wordData)">-->
<!-- <i class="el-icon-question" />-->
<!-- </div>-->
<!-- <div v-else class="sidebar-operation-manual" style="width:40px" @click="exportclick(wordData)">-->
<!-- <i class="el-icon-question" style="font-size:18px;" />-->
<!-- </div>-->
<!-- </el-tooltip>-->
</aside>
</template>

69
src/page-subspecialty/views/modules/chargeManagement/alertList/index.vue

@ -1,69 +0,0 @@
<template>
<!-- 预警列表 -->
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__role">
<head-template head-left="预警列表" />
<el-table
:data="dataList"
:height="tableHeight"
style="width: 100%;"
>
<el-table-column prop="patientName" label="患者姓名" header-align="center" align="center" />
<el-table-column prop="examTime" label="检查日期" header-align="center" align="center" />
<el-table-column prop="warnType" label="指标名称" header-align="center" align="center" />
<el-table-column prop="" label="本次数值" header-align="center" align="center">
<template slot-scope="scope">
<span>OD{{ scope.row.od }}</span>
<span>OS{{ scope.row.os }}</span>
</template>
</el-table-column>
<el-table-column label="详情" header-align="center" width="500">
<template slot-scope="scope">
<p v-for="(item,index) in scope.row.result" :key="index" v-html="item" />
</template>
</el-table-column>
<!-- <el-table-column label="操作" fixed="right" header-align="center" align="center">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click="addOrUpdateHandle(scope.row.id,scope.row)"
>{{ $t('update') }}</el-button>
<el-button
type="text"
size="small"
style="color:red"
@click="deleteHandle([scope.row.id])"
>{{ $t('delete') }}</el-button>
</template>
</el-table-column> -->
</el-table>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import tableAutoHeight from '@/mixins/tableAutoHeight'
import headTemplate from '@/components/head'
export default {
components: {
headTemplate
},
mixins: [mixinViewModule, tableAutoHeight],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/sys/target/earlyWarning',
deleteURL: '/sys/role',
deleteIsBatch: true
},
dataForm: {
name: ''
}
}
}
}
</script>
<style lang="scss" scoped>
</style>

188
src/page-subspecialty/views/modules/chargeManagement/alertSet/add-or-update.vue

@ -1,188 +0,0 @@
<template>
<el-dialog
class="alert-setting"
:visible.sync="visible"
width="30%"
:title="dataForm.id ? '修改预警条件':'新增预警条件'"
>
<el-form ref="dataForm" :model="dataForm" :rules="dataRule">
<el-form-item label="指标名称:" label-width="100px" prop="name">
<el-select v-model="dataForm.name " placeholder="请选择指标名称" clearable>
<el-option v-for="(item,index) in targetNameList " :key="index" :value="item.name" :label="item.name" @click.native="selectOptionHandle(item)" />
</el-select>
</el-form-item>
<!-- flag=1较上次上升/下降flag=0值大于/小于 -->
<template v-if="ISFlag">
<el-form-item label="值大于:" prop="greaterThan" label-width="100px">
<el-input v-model="dataForm.greaterThan" placeholder="请填写值" />
<span class="company">{{ dataForm.targetUnit }}</span>
</el-form-item>
<el-form-item label="值小于:" label-width="100px" prop="lessThan">
<el-input v-model="dataForm.lessThan" placeholder="请填写值" />
<span class="company">{{ dataForm.targetUnit }}</span>
</el-form-item>
</template>
<template v-else>
<el-form-item label="较上次下降:" label-width="100px" prop="lowerThan">
<el-input v-model="dataForm.lowerThan" placeholder="请填写值" />
</el-form-item>
<el-form-item label="较上次上升:" label-width="100px" prop="upThan">
<el-input v-model="dataForm.upThan" up="请填写值" />
</el-form-item>
</template>
<el-form-item label="启用" label-width="90px">
<el-switch v-model="dataForm.status" :active-value="1" :inactive-value="0" />
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
props: {
targetNameList: {
type: Array,
default: () => []
}
},
data() {
return {
visible: false,
dataForm: {
greaterThan: '', //
lessThan: '', //
id: '',
status: 1, // 1 0
lowerThan: '', //
upThan: '', //
name: '', //
targetUnit: '' //
},
ISFlag: true // true
}
},
computed: {
dataRule() {
return {
name: [
{ required: true, message: '请选择指标名称', trigger: 'change' }
]
}
}
},
created() {
},
methods: {
//
selectOptionHandle(item) {
console.log(item)
// flag=1/flag=0/
this.ISFlag = item.flag === 0
this.dataForm.targetUnit = item.targetUnit
},
//
// switchHandle(e) {
// // 1 0
// console.log(e)
// this.dataForm.status = e ? 1 : 0
// },
//
init() {
this.visible = true
this.$nextTick(() => {
this.$refs.dataForm.resetFields() //
if (this.dataForm.id) {
this.getInfo()
}
})
},
//
getInfo() {
this.$http.get(`/sys/target/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
this.ISFlag = res.data.flag === 0
}).catch(() => { })
},
//
dataFormSubmitHandle: debounce(function() {
console.log(this.dataForm)
this.$refs.dataForm.validate((valid) => {
if (!valid) {
return false
}
// if (this.ISFlag && !this.dataForm.greaterThan && !this.dataForm.lessThan) {
// return this.$message.error('')
// } else if (!this.ISFlag) {
// if (!this.dataForm.lowerThan && !this.dataForm.upThan) {
// return this.$message.error('')
// } else if (this.dataForm.lowerThan && this.dataForm.upThan) {
// return this.$message.error('')
// }
// }
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/target', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { leading: true, trailing: false })
}
}
</script>
<style lang="scss">
.alert-setting {
.company {
display: inline-block;
width: 60px;
padding-left: 5px;
}
.el-form-item__content {
display: flex;
}
.el-dialog__header {
margin-bottom:12px
}
.el-dialog__body {
padding-right: 30px;
}
.formItemOne .el-form-item__content {
display: flex;
}
.el-date-editor.el-input, .el-date-editor.el-input__inner{
width: 100%;
}
.el-select{
display: block;
width: 100%;
padding-right: 50px;
}
.el-input-number {
display: block;
width: 100%;
}
.el-switch {
line-height: 40px;
display: block;
}
}
</style>

104
src/page-subspecialty/views/modules/chargeManagement/alertSet/index.vue

@ -1,104 +0,0 @@
<template>
<div class="charge-management">
<!-- 模板列表 -->
<head-template head-left="预警设置">
<el-button type="primary" size="small" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button>
</head-template>
<!-- 模板内容 -->
<el-table ref="multipleTable" :data="dataList" tooltip-effect="dark" style="width: 100%" :height="tableHeight">
<el-table-column label="状态">
<template slot-scope="scope">
<!-- 1开启 0关闭 -->
<el-switch :value="scope.row.status == 1 ? true : false" @change="switchHandle(scope.row,$event)" />
</template>
</el-table-column>
<el-table-column label="指标名称">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column prop="content" label="条件" />
<el-table-column prop="operation" label="操作">
<template slot-scope="scope">
<span style="color: #1890ff; padding-right: 8px" class="details" @click="addOrUpdateHandle(scope.row.id,'')">修改</span>
<span style="color: #ff4d4f" class="delete" @click="deleteHandle(scope.row.id)">删除</span>
</template>
</el-table-column>
</el-table>
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :target-name-list="targetNameList" @refreshDataList="getDataList" />
<!-- <el-pagination background layout="prev, pager, next" :total="total" @current-change="pageCurrentChangeHandle" /> -->
</div>
</template>
<script>
import headTemplate from '@/components/head'
import addOrUpdate from './add-or-update.vue'
import mixinViewModule from '@/mixins/view-module'
import tableAutoHeight from '@/mixins/tableAutoHeight'
export default {
components: {
headTemplate,
addOrUpdate
},
mixins: [mixinViewModule, tableAutoHeight],
data() {
return {
targetNameList: [],
mixinViewModuleOptions: {
getDataListURL: '/sys/target/targetList',
deleteURL: '/sys/target'
}
}
},
created() {
this.getTargetName()
},
methods: {
//
async getTargetName() {
const { data: res } = await this.$http.get('/sys/target/selectTarget')
if (res.code === 0) {
this.targetNameList = res.data
} else {
this.$message.error(res.msg)
}
},
//
async switchHandle(scopeRow, e) {
console.log(scopeRow, e)
// 1 0
const { data: res } = await this.$http.post('/sys/target/switchStatus', {
id: scopeRow.id,
status: e === false ? 0 : 1
})
if (res.code === 0) {
this.getDataListInitial()
} else {
this.$message.error(res.msg)
}
}
}
}
</script>
<style lang="scss" scoped>
.charge-management {
background: #fff;
padding: 20px;
min-height: calc(calc(100vh - 50px - 30px) - 2px);
.defaultButton {
display: inline-block;
border: 1px solid #1E79FF;
color: #1E79FF;
font-size: 12px;
padding: 0 10px;
border-radius: 16px;
margin-left: 10px;
}
.details,
.delete {
cursor: pointer;
}
.el-icon-more {
margin-left: 6px;
}
}
</style>

5
src/page-subspecialty/views/modules/chargeManagement/index.vue

@ -1,5 +0,0 @@
<template>
<div>
<router-view />
</div>
</template>

1
src/page-subspecialty/views/modules/optometryManagement/dioptric/index.vue

@ -258,6 +258,7 @@ export default {
params: {
patientId: item.patientId,
jzNumber: item.jzNumber,
risNo: item.risNo,
platform: 3
}
})

1
src/page-subspecialty/views/modules/outpatientManagement/treat/index.vue

@ -366,6 +366,7 @@ export default {
isAppoint: item.isAppoint,
patientId: item.patientId,
jzNumber: item.jzNumber,
risNo: item.risNo,
platform: 2
}
})

5
src/page-subspecialty/views/modules/propagandaManagement/index.vue

@ -1,5 +0,0 @@
<template>
<div>
<router-view />
</div>
</template>

113
src/page-subspecialty/views/modules/propagandaManagement/notification/add-propaganda.vue

@ -1,113 +0,0 @@
<template>
<el-dialog class="add-edit-centre" :visible.sync="visible" :title="!dataForm.id ? '新增宣教' : '修改宣教'" @close="closeDialog">
<el-form ref="dataForm" :model="dataForm" :rules="dataRule" label-width="auto" @keyup.enter.native="dataFormSubmitHandle()">
<el-form-item prop="node" label="状态节点">
<el-input v-model="dataForm.node" placeholder="请输入状态节点" />
</el-form-item>
<el-form-item prop="url" label="url">
<el-input v-model="dataForm.url" placeholder="请输入URL" />
</el-form-item>
<el-form-item prop="title" label="名称">
<el-input v-model="dataForm.title" placeholder="请输入名称" />
</el-form-item>
<el-form-item prop="remark" label="备注">
<el-input v-model="dataForm.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
props: {
},
data() {
return {
visible: false,
dataForm: {
id: '',
url: '',
node: '',
title: '',
remark: ''
}
}
},
computed: {
dataRule() {
return {
node: [
{ required: true, message: '请输入状态节点', trigger: 'blur' }
],
url: [
{ required: true, message: '请输入URL', trigger: 'blur' }
]
}
}
},
methods: {
init() {
this.visible = true
this.$nextTick(() => {
this.$refs.dataForm.resetFields()
if (this.dataForm.id) {
this.getInfo()
}
})
},
//
getInfo() {
this.$http.get(`/preach/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function() {
this.$refs.dataForm.validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/preach', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { leading: true, trailing: false }),
closeDialog() {
this.$emit('closeDialog')
}
}
}
</script>
<style lang="scss">
.add-edit-centre{
.el-dialog__header {
margin-bottom:12px
}
.el-select {
display: block;
}
}
</style>

96
src/page-subspecialty/views/modules/propagandaManagement/notification/index.vue

@ -1,96 +0,0 @@
<template>
<!-- 通知机制 -->
<el-card shadow="never" class="aui-card--fill propaganda">
<div class="mod-sys__role">
<head-template head-left="通知机制">
<el-button size="small" @click="enterHandle">平台入口</el-button>
<el-button type="primary" size="small" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button>
</head-template>
<el-table
v-loading="dataListLoading"
:data="dataList"
:height="tableHeight"
style="width: 100%;"
@selection-change="dataListSelectionChangeHandle"
@sort-change="dataListSortChangeHandle"
>
<!-- <el-table-column type="selection" header-align="center" align="center" width="50" /> -->
<el-table-column prop="node" label="状态节点" header-align="center" align="center" />
<el-table-column prop="title" label="名称" header-align="center" align="center" />
<el-table-column prop="url" label="URL" header-align="center" align="center">
<template slot-scope="scope">
<span class="url-span" @click="URLEnterHandle(scope.row)"> {{ scope.row.url }}</span>
</template>
</el-table-column>
<el-table-column prop="updateDate" label="修改时间" header-align="center" align="center" />
<el-table-column prop="remark" label="备注" header-align="center" align="center">
<template slot-scope="scope">
{{ scope.row.remark ? scope.row.remark : '-' }}
</template>
</el-table-column>
<el-table-column prop="operation" label="操作" header-align="center" align="center">
<template slot-scope="scope">
<span style="color: #1890ff; padding-right: 8px" class="button-span" @click="addOrUpdateHandle(scope.row.id,scope.row)">编辑</span>
<span style="color: #ff4d4f;" class="button-span" @click="deleteHandle(scope.row.id)">删除</span>
</template>
</el-table-column>
</el-table>
<el-pagination background layout="prev, pager, next" :total="total" @current-change="pageCurrentChangeHandle" />
<!-- 弹窗, 新增 / 修改 -->
<add-propaganda v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @closeDialog="addOrUpdateVisible=false" />
</div>
</el-card>
</template>
<script>
import addPropaganda from './add-propaganda.vue'
import mixinViewModule from '@/mixins/view-module'
import tableAutoHeight from '@/mixins/tableAutoHeight'
import headTemplate from '@/components/head'
export default {
components: {
addPropaganda,
headTemplate
},
mixins: [mixinViewModule, tableAutoHeight],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/preach',
deleteURL: '/preach',
deleteIsBatch: true,
getDataListIsPage: false
},
dataForm: {
name: ''
}
}
},
methods: {
// URL
enterHandle() {
window.open('https://mp.weixin.qq.com/')
},
//
URLEnterHandle(scopeRow) {
window.open(scopeRow.url)
}
}
}
</script>
<style lang="scss" scoped>
.propaganda {
.url-span {
white-space: nowrap; //
text-overflow: ellipsis;
overflow: hidden;
}
.url-span:hover {
color: #1e79ff;
cursor: pointer;
}
.button-span {
cursor: pointer;
}
}
</style>

158
src/page-subspecialty/views/modules/propagandaManagement/statistics/index.vue

@ -1,158 +0,0 @@
<template>
<!-- 宣教统计 -->
<div class="statistics">
<template v-if="isShowPatient">
<div class="statistics-head">
<el-form :inline="true" :model="dataForm" class="demo-form-inline" @keyup.enter.native="getDataListInitial()">
<el-form-item label="患者ID:">
<el-input v-model="dataForm.patientId" size="small" clearable placeholder="患者ID" @clear="getDataListInitial()" />
</el-form-item>
<el-form-item label="患者姓名:">
<el-input v-model="dataForm.patientName" placeholder="患者姓名" size="small" clearable @clear="getDataListInitial()" />
</el-form-item>
<el-form-item label="阅读进度:">
<el-select v-model="dataForm.readProgress" clearable placeholder="请选择阅读进度" @change="getDataListInitial()">
<el-option v-for="(item,index) in readProgressList" :key="index" :label="item.name" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item prop="dateRange" label="日期" class="form-item-date">
<el-date-picker
v-model="dataForm.searchDate"
class="right-pick-btn"
clearable
type="date"
size="small"
value-format="yyyy-MM-dd"
placeholder="按日期查询"
@change="getDataListInitial()"
/>
</el-form-item>
<el-form-item style="flex:1">
<el-button type="primary" icon="el-icon-search" size="small" @click="getDataListInitial()">查询</el-button>
</el-form-item>
</el-form>
</div>
<div class="statistics-content">
<el-table
ref="multipleTable"
:data="dataList"
:height="tableHeight"
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column prop="patientId" label="患者ID " header-align="center" align="center" />
<el-table-column prop="patientName" label="患者姓名" header-align="center" align="center" />
<el-table-column prop="articleName" label="文章名称" header-align="center" align="center" />
<el-table-column label="阅读进度">
<template slot-scope="scope">
<el-progress :percentage="Number(scope.row.rate)" />
</template>
</el-table-column>
</el-table>
<el-pagination background layout="total,prev, pager, next" :total="total" :current-page.sync="page" @current-change="pageCurrentChangeHandle" />
</div></template>
<router-view v-else />
</div>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import tableAutoHeight from '@/mixins/tableAutoHeight'
import { dateFilterTwo } from '@/filters/index.js'
export default {
components: {
},
mixins: [mixinViewModule, tableAutoHeight],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/propagation/page',
getDataListIsPage: true,
createdIsNeed: false
},
nextVisitTime: [],
isShowPatient: true,
detailViewVisible: false,
dataForm: {
patientId: '',
patientName: '',
readProgress: '',
searchDate: ''
},
doctorNameList: [],
currentTableList: [],
patientIdNumber: '',
detailId: '',
readProgressList: [{
value: 0,
name: '未开始'
}, {
value: 1,
name: '阅读中'
}, {
value: 2,
name: '已完成'
}]
}
},
created() {
this.dataForm.searchDate = dateFilterTwo(this.$moment().format('L'))
this.getDataList()
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.statistics {
.statistics-head,
.statistics-content {
background: #fff;
.head {
padding-bottom: 10px;
}
}
.statistics-content {
padding: 16px;
margin-bottom: 45px;
}
.statistics-head {
margin-bottom: 16px;
padding: 10px 16px;
}
.operation-delete,
.operation-details {
cursor: pointer;
}
}
</style>
<style lang="scss">
.statistics {
.statistics-head {
.el-form {
display: flex;
justify-content: space-between;
}
.el-form-item {
display: flex;
}
.el-form-item__label {
min-width: 75px;
}
.el-form-item {
margin-bottom: 0;
width: 25%;
}
.el-form-item__content,
.el-select,
.el-range-editor--small.el-input__inner {
width: 100%;
}
.form-item-date .el-form-item__content {
min-width: 180px;
}
}
.el-select {
width: 100%;
}
}
</style>

7
src/page-subspecialty/views/modules/scientificManagement/subjectMgt/doctor/index.vue

@ -246,6 +246,13 @@ export default {
}
</script>
<style lang='scss' scoped>
.aui-card--fill {
height: 100%;
::v-deep .el-card__body{
height: 100%;
overflow-y: auto;
}
}
.state-circle {
display: inline-block;
width: 6px;

10
src/page-subspecialty/views/modules/scientificManagement/subjectMgt/ecrf/index.vue

@ -64,7 +64,6 @@
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './add-or-update'
@ -105,3 +104,12 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.aui-card--fill {
height: 100%;
::v-deep .el-card__body{
height: 100%;
overflow-y: auto;
}
}
</style>

4
src/page-subspecialty/views/modules/scientificManagement/subjectMgt/index.vue

@ -1,6 +1,6 @@
<template>
<div class="template-container">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tabs v-model="activeName">
<el-tab-pane label="样本库" name="first">
<search v-if="activeName==='first'" />
</el-tab-pane>
@ -37,9 +37,7 @@ export default {
mounted() {
},
methods: {
handleClick() {
}
}
}
</script>

2
src/page-subspecialty/views/modules/scientificManagement/subjectMgt/log/index.vue

@ -56,7 +56,7 @@ export default {
projectId: this.$route.query.projectId,
operateUserJobNumber: '',
operateUserName: '',
operateInfo: '',
operateInfo: ''
}
}
},

197
src/page-subspecialty/views/modules/scientificManagement/sys/depart-add-or-update.vue

@ -1,197 +0,0 @@
<template>
<el-dialog
:visible.sync="visible"
:title="dataForm.title||(!dataForm.id ? $t('add') : $t('update'))"
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<el-form
ref="dataForm1"
class="wsInfo"
:model="dataForm"
:rules="dataRule"
label-width="auto"
@submit.native.prevent
@keyup.enter.native="initBaseInfo()"
>
<!-- webservice地址 -->
<el-form-item prop="webServiceUrl" :label="'webservice地址'">
<el-input v-model="dataForm.webServiceUrl" :placeholder="'输入webservice地址配置'" />
</el-form-item>
</el-form>
<el-form ref="dataForm2" class="baseInfo" :model="dataForm" :rules="dataRule" label-width="auto" @keyup.enter.native="dataFormSubmitHandle()">
<!-- 分中心名称 -->
<el-form-item prop="name" :label="'分中心名称'">
<el-input v-model="dataForm.name" :placeholder="'分中心名称'" />
</el-form-item>
<!-- 分中心地址 -->
<el-form-item prop="regionList" :label="'分中心地址'">
<region-tree v-model="dataForm.regionList" />
</el-form-item>
<!-- 详细地址 -->
<el-form-item prop="address" :label="'详细地址'">
<el-input v-model="dataForm.address" :placeholder="'详细地址'" />
</el-form-item>
<!-- 组织机构代码 -->
<el-form-item prop="organizationCode" :label="'组织机构代码'">
<el-input v-model="dataForm.organizationCode" :placeholder="'组织机构代码'" />
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
import regionTree from '@/components/region-tree'
export default {
components: {
regionTree
},
data() {
return {
visible: false,
deptList: [],
deptListVisible: false,
dataForm: {
id: '',
webServiceUrl: '',
name: '',
regionList: [], // [130000, 130100, 130104],
provinceId: 0,
cityId: 0,
areaId: 0,
address: '',
organizationCode: ''
}
}
},
computed: {
dataRule() {
var validateTree = (rule, value, callback) => {
if (this.dataForm.regionList.length === 0) {
return callback(new Error('请选择地区'))
}
callback()
}
return {
webServiceUrl: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
name: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
regionList: [
{ required: true, validator: validateTree, trigger: 'change' }
],
address: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
organizationCode: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
]
}
}
},
watch: {
'dataForm.regionList': {
handler(newValue, oldValue) {
if (newValue && newValue.length > 0) {
this.dataForm.provinceId = newValue[0] || ''
this.dataForm.cityId = newValue[1] || ''
this.dataForm.areaId = newValue[2] || ''
}
},
deep: true
}
},
methods: {
init() {
this.visible = true
this.$nextTick(() => {
this.$refs.dataForm1.resetFields()
this.$refs.dataForm2.resetFields()
if (this.dataForm.id) {
this.getInfo()
}
})
},
initBaseInfo() {},
//
getInfo() {
this.$http.get(`/sys/dept/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
this.dataForm.regionList = [
this.dataForm.provinceId || null,
this.dataForm.cityId || null,
this.dataForm.areaId || null
]
}).catch(() => {})
},
// ,
deptListTreeCurrentChangeHandle(data) {
this.dataForm.pid = data.id
this.dataForm.parentName = data.name
this.deptListVisible = false
},
//
dataFormSubmitHandle: debounce(function() {
this.$refs.dataForm1.validate((valid1) => {
if (!valid1) {
return false
}
this.$refs.dataForm2.validate((valid2) => {
if (!valid2) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/dept', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
})
}, 1000, { leading: true, trailing: false })
}
}
</script>
<style lang="scss">
.mod-sys__dept {
.dept-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
}
.wsInfo{
padding:0 20px;
}
.baseInfo{
padding: 20px;
// background: rgba(205,205,205,0.18000000715255737);
border-radius: 4px;
// border: 1px solid #C2C2C2 !important;
}
</style>

83
src/page-subspecialty/views/modules/scientificManagement/sys/depart.vue

@ -1,83 +0,0 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__dept">
<el-form :inline="true" :model="dataForm" @submit.native.prevent @keyup.enter.native="getDataList()">
<el-form-item>
<el-button v-if="$hasPermission('sys:dept:save')" type="primary" @click="addOrUpdateHandle(null,null,'添加分中心')">{{ $t('add') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" row-key="id" border style="width: 100%;">
<!-- 名称 -->
<el-table-column prop="name" :label="$t('dept.name')" header-align="center" min-width="150" />
<!-- 地址 -->
<el-table-column prop="address" :label="'地址'" header-align="center" width="300" :show-overflow-tooltip="true" />
<!-- 管理员 -->
<el-table-column prop="deptAdminUser" :label="'管理员'" header-align="center" align="center">
<template slot-scope="scope">
{{ scope.row.deptAdminUser|filterList }}
</template>
</el-table-column>
<!-- 课题数量 -->
<el-table-column prop="projectCount" :label="'课题数量'" sortable="custom" header-align="center" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.projectCount +'个' }}
</template>
</el-table-column>
<!-- 研究员数量 -->
<el-table-column prop="researcherCount" :label="'研究员数量'" sortable="custom" header-align="center" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.researcherCount +'人' }}
</template>
</el-table-column>
<!-- 创建时间 -->
<el-table-column :label="$t('handle')" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button
v-if="$hasPermission('sys:dept:update')"
type="text"
size="small"
@click="addOrUpdateHandle(scope.row.id,null,'修改分中心信息')"
>{{ $t('update') }}</el-button>
<el-button
v-if="$hasPermission('sys:dept:delete')"
type="text"
size="small"
style="color:red"
@click="deleteHandle(scope.row.id)"
>{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" />
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './depart-add-or-update'
export default {
components: {
AddOrUpdate
},
filters: {
filterList(arr) {
const result = []
arr.forEach(item => {
result.push(item.userName)
})
return result.join(',')
}
},
mixins: [mixinViewModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/sys/dept/list',
deleteURL: '/sys/dept'
}
}
}
}
</script>

72
src/page-subspecialty/views/modules/scientificManagement/sys/log-error.vue

@ -1,72 +0,0 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__log-error">
<el-form :inline="true" :model="dataForm" @submit.native.prevent @keyup.enter.native="getDataList()">
<el-form-item>
<el-button type="info" @click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border style="width: 100%;" @sort-change="dataListSortChangeHandle">
<el-table-column prop="requestUri" :label="$t('logError.requestUri')" header-align="center" align="center" />
<el-table-column prop="requestMethod" :label="$t('logError.requestMethod')" header-align="center" align="center" width="90" />
<el-table-column prop="requestParams" :label="$t('logError.requestParams')" header-align="center" align="center" width="150" :show-overflow-tooltip="true" />
<el-table-column prop="ip" :label="$t('logError.ip')" header-align="center" align="center" width="125" />
<el-table-column prop="userAgent" :label="$t('logError.userAgent')" header-align="center" align="center" width="150" :show-overflow-tooltip="true" />
<el-table-column prop="createDate" :label="$t('logError.createDate')" sortable="custom" header-align="center" align="center" width="180" />
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="infoHandle(scope.row.errorInfo)">{{ $t('logError.errorInfo') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"
/>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
export default {
mixins: [mixinViewModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/sys/log/error/page',
getDataListIsPage: true,
exportURL: '/sys/log/error/export'
}
}
},
methods: {
//
infoHandle(info) {
this.$alert(info, this.$t('logError.errorInfo'), {
customClass: 'mod-sys__log-error-view-info'
})
}
}
}
</script>
<style lang="scss">
.mod-sys__log-error {
&-view-info {
width: 80%;
height: calc(100% - 100px);
.el-message-box__content{
overflow: auto;
height: calc(100% - 90px);
}
}
}
</style>

71
src/page-subspecialty/views/modules/scientificManagement/sys/log-login.vue

@ -1,71 +0,0 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__log-login">
<el-form :inline="true" :model="dataForm" @submit.native.prevent @keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.creatorName" :placeholder="$t('logLogin.creatorName')" clearable />
</el-form-item>
<el-form-item>
<el-select v-model="dataForm.status" :placeholder="$t('logLogin.status')" clearable>
<el-option :label="$t('logLogin.status0')" :value="0" />
<el-option :label="$t('logLogin.status1')" :value="1" />
<el-option :label="$t('logLogin.status2')" :value="2" />
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button type="info" @click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border style="width: 100%;" @sort-change="dataListSortChangeHandle">
<el-table-column prop="creatorName" :label="$t('logLogin.creatorName')" header-align="center" align="center" />
<el-table-column prop="operation" :label="$t('logLogin.operation')" header-align="center" align="center">
<template slot-scope="scope">
{{ scope.row.operation === 0 ? $t('logLogin.operation0') : $t('logLogin.operation1') }}
</template>
</el-table-column>
<el-table-column prop="status" :label="$t('logLogin.status')" sortable="custom" header-align="center" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.status === 0" size="small" type="danger">{{ $t('logLogin.status0') }}</el-tag>
<el-tag v-else-if="scope.row.status === 1" size="small" type="success">{{ $t('logLogin.status1') }}</el-tag>
<el-tag v-else size="small" type="warning">{{ $t('logLogin.status2') }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="ip" :label="$t('logLogin.ip')" header-align="center" align="center" />
<el-table-column prop="userAgent" :label="$t('logLogin.userAgent')" header-align="center" align="center" width="150" :show-overflow-tooltip="true" />
<el-table-column prop="createDate" :label="$t('logLogin.createDate')" sortable="custom" header-align="center" align="center" width="180" />
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"
/>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
export default {
mixins: [mixinViewModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/sys/log/login/page',
getDataListIsPage: true,
exportURL: '/sys/log/login/export'
},
dataForm: {
creatorName: '',
status: ''
}
}
}
}
</script>

144
src/page-subspecialty/views/modules/scientificManagement/sys/log-operation.vue

@ -1,144 +0,0 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__log-operation">
<el-form :inline="true" :model="dataForm" @submit.native.prevent @keyup.enter.native="getDataList()">
<!-- 用户名 -->
<el-form-item>
<el-input v-model="dataForm.username" :placeholder="'用户名'" clearable style="width:120px;" />
</el-form-item>
<!-- 用户操作 -->
<el-form-item>
<el-input v-model="dataForm.action" :placeholder="'用户操作'" clearable style="width:250px;" />
</el-form-item>
<!-- 请求方式 -->
<el-form-item>
<el-select v-model="dataForm.method" :placeholder="'请求方式'" clearable style="width:120px;">
<el-option label="GET" value="GET" />
<el-option label="POST" value="POST" />
<el-option label="PUT" value="PUT" />
<el-option label="DELETE" value="DELETE" />
</el-select>
</el-form-item>
<!-- 状态 -->
<el-form-item>
<el-select v-model="dataForm.status" :placeholder="$t('logOperation.status')" clearable style="width:120px;">
<el-option :label="$t('logOperation.status0')" :value="0" />
<el-option :label="$t('logOperation.status1')" :value="1" />
</el-select>
</el-form-item>
<!-- IP地址 -->
<el-form-item>
<el-input v-model="dataForm.ip" :placeholder="'IP地址'" clearable style="width:160px;" />
</el-form-item>
<!-- 课题ID -->
<el-form-item>
<el-input v-model="tempProjectId" :placeholder="'课题ID'" clearable style="width:160px;" />
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<!-- <el-form-item><el-button type="info" @click="exportHandle()">{{ $t('export') }}</el-button></el-form-item> -->
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border style="width: 100%;" @sort-change="dataListSortChangeHandle">
<!-- 展开 -->
<el-table-column type="expand">
<template slot-scope="scope">
<el-form label-width="90px" class="expand-form">
<el-form-item :label="$t('logOperation.creatorName')">
<span>{{ scope.row.creatorName }}</span>
</el-form-item>
<el-form-item :label="$t('logOperation.operation')">
<span>{{ scope.row.operation }}</span>
</el-form-item>
<el-form-item :label="$t('logOperation.requestUri')">
<span>{{ scope.row.requestUri }}</span>
</el-form-item>
<el-form-item :label="$t('logOperation.requestMethod')">
<span>{{ scope.row.requestMethod }}</span>
</el-form-item>
<el-form-item :label="$t('logOperation.requestParams')">
<span>{{ scope.row.requestParams }}</span>
</el-form-item>
<el-form-item :label="$t('logOperation.requestTime')">
<span>{{ `${scope.row.requestTime}ms` }}</span>
</el-form-item>
<el-form-item :label="$t('logOperation.status')">
<el-tag v-if="scope.row.status === 0" size="small" type="danger">{{ $t('logOperation.status0') }}</el-tag>
<el-tag v-else size="small" type="success">{{ $t('logOperation.status1') }}</el-tag>
</el-form-item>
<el-form-item :label="$t('logOperation.ip')">
<span>{{ scope.row.ip }}</span>
</el-form-item>
<el-form-item :label="$t('logOperation.userAgent')">
<span>{{ scope.row.userAgent }}</span>
</el-form-item>
<el-form-item :label="$t('logOperation.createDate')">
<span>{{ scope.row.createDate }}</span>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column prop="creatorName" :label="$t('logOperation.creatorName')" header-align="center" align="center" width="120" />
<el-table-column prop="operation" :label="$t('logOperation.operation')" />
<el-table-column prop="requestUri" :label="$t('logOperation.requestUri')" />
<el-table-column prop="requestMethod" :label="$t('logOperation.requestMethod')" header-align="center" align="center" width="80" />
<!-- <el-table-column prop="requestParams" :label="$t('logOperation.requestParams')" width="150" :show-overflow-tooltip="true" /> -->
<el-table-column prop="requestTime" :label="'耗时'" sortable="custom" header-align="center" width="80">
<template slot-scope="scope">
{{ `${scope.row.requestTime}ms` }}
</template>
</el-table-column>
<!--<el-table-column prop="status" :label="$t('logOperation.status')" sortable="custom" >
<template slot-scope="scope">
<el-tag v-if="scope.row.status === 0" size="small" type="danger">{{ $t('logOperation.status0') }}</el-tag>
<el-tag v-else size="small" type="success">{{ $t('logOperation.status1') }}</el-tag>
</template>
</el-table-column>-->
<el-table-column prop="ip" :label="$t('logOperation.ip')" width="125" header-align="center" />
<!-- <el-table-column prop="userAgent" :label="$t('logOperation.userAgent')" width="150" :show-overflow-tooltip="true" /> -->
<el-table-column prop="createDate" :label="$t('logOperation.createDate')" header-align="center" sortable="custom" width="160" />
</el-table>
<!-- 分页 -->
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"
/>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
export default {
mixins: [mixinViewModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/sys/log/operation/page',
getDataListIsPage: true
// exportURL: '/sys/log/operation/export'
},
tempProjectId: '',
dataForm: {
status: '',
username: '',
action: '',
method: '',
ip: '',
projectId: null
}
}
},
watch: {
tempProjectId(val) {
this.dataForm.projectId = !val ? null : val
}
}
}
</script>

237
src/page-subspecialty/views/modules/scientificManagement/sys/menu-dept-add-or-update.vue

@ -1,237 +0,0 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form
ref="dataForm"
:model="dataForm"
:rules="dataRule"
label-width="auto"
@submit.native.prevent
@keyup.enter.native="dataFormSubmitHandle()"
>
<!-- 类型 -->
<el-form-item prop="type" :label="$t('menu.type')">
<el-radio-group v-model="dataForm.type" :disabled="!!dataForm.id">
<el-radio-button :label="0">{{ $t('menu.type0') }}</el-radio-button>
<el-radio-button :label="1">{{ $t('menu.type1') }}</el-radio-button>
</el-radio-group>
</el-form-item>
<!-- 名称 -->
<el-form-item prop="name" :label="$t('menu.name')">
<el-input v-model="dataForm.name" :placeholder="$t('menu.name')" />
</el-form-item>
<!-- 上级菜单 -->
<el-form-item prop="parentName" :label="$t('menu.parentName')" class="menu-list">
<el-popover ref="menuListPopover" v-model="menuListVisible" placement="bottom-start" trigger="click">
<el-tree
ref="menuListTree"
:data="menuList"
:props="{ label: 'name', children: 'children' }"
node-key="id"
:highlight-current="true"
:expand-on-click-node="false"
accordion
@current-change="menuListTreeCurrentChangeHandle"
/>
</el-popover>
<el-input v-model="dataForm.parentName" v-popover:menuListPopover :readonly="true" :placeholder="$t('menu.parentName')">
<i v-if="dataForm.pid !== '0'" slot="suffix" class="el-icon-circle-close el-input__icon" @click.stop="deptListTreeSetDefaultHandle()" />
</el-input>
</el-form-item>
<!-- 排序 -->
<el-form-item prop="sort" :label="$t('menu.sort')">
<el-input-number v-model="dataForm.sort" controls-position="right" :min="0" :label="$t('menu.sort')" />
</el-form-item>
<!-- 授权标识 -->
<el-form-item prop="permissions" :label="$t('menu.permissions')">
<el-input v-model="dataForm.permissions" :placeholder="$t('menu.permissionsTips')" />
</el-form-item>
<!-- 路由 -->
<el-form-item v-if="dataForm.type === 0" prop="url" :label="$t('menu.url')">
<el-input v-model="dataForm.url" :placeholder="$t('menu.url')" />
</el-form-item>
<!-- 图标 -->
<el-form-item v-if="dataForm.type === 0" prop="icon" :label="$t('menu.icon')" class="icon-list">
<el-popover ref="iconListPopover" v-model="iconListVisible" placement="bottom-start" trigger="click" popper-class="mod-sys__menu-icon-popover">
<div class="mod-sys__menu-icon-inner">
<div class="mod-sys__menu-icon-list">
<el-button
v-for="(item, index) in iconList"
:key="index"
:class="{ 'is-active': dataForm.icon === item }"
@click="iconListCurrentChangeHandle(item)"
>
<svg class="icon-svg" aria-hidden="true"><use :xlink:href="`#${item}`" /></svg>
</el-button>
</div>
</div>
</el-popover>
<el-input v-model="dataForm.icon" v-popover:iconListPopover :readonly="true" :placeholder="$t('menu.icon')" />
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
import { getIconList } from '@/utils'
export default {
data() {
return {
visible: false,
menuList: [],
menuListVisible: false,
iconList: [],
iconListVisible: false,
dataForm: {
id: '',
menuType: 0,
type: 0,
name: '',
pid: '0',
parentName: '',
url: '',
permissions: '',
sort: 0,
icon: ''
}
}
},
computed: {
dataRule() {
return {
name: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
parentName: [
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
]
}
}
},
watch: {
'dataForm.type'(val) {
this.$refs['dataForm'].clearValidate()
}
},
methods: {
init() {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.iconList = getIconList()
this.dataForm.parentName = this.$t('menu.parentNameDefault')
this.getMenuList().then(() => {
if (this.dataForm.id) {
this.getInfo()
}
})
})
},
//
getMenuList() {
return this.$http.get('/sys/menu/getMenuList?menuType=0&withButton=2').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.menuList = res.data
}).catch(() => {})
},
//
getInfo() {
this.$http.get(`/sys/menu/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
if (this.dataForm.pid === '0') {
return this.deptListTreeSetDefaultHandle()
}
this.$refs.menuListTree.setCurrentKey(this.dataForm.pid)
}).catch(() => {})
},
// ,
deptListTreeSetDefaultHandle() {
this.dataForm.pid = '0'
this.dataForm.parentName = this.$t('menu.parentNameDefault')
},
// ,
menuListTreeCurrentChangeHandle(data) {
this.dataForm.pid = data.id
this.dataForm.parentName = data.name
this.menuListVisible = false
},
// ,
iconListCurrentChangeHandle(icon) {
this.dataForm.icon = icon
this.iconListVisible = false
},
//
dataFormSubmitHandle: debounce(function() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/menu', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

70
src/page-subspecialty/views/modules/scientificManagement/sys/menu-dept.vue

@ -1,70 +0,0 @@
<template>
<!-- 系统菜单 -->
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__menu">
<el-form :inline="true" :model="dataForm" @submit.native.prevent @keyup.enter.native="getDataList()">
<el-form-item>
<el-button v-if="$hasPermission('sys:menu:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="dataListLoading"
:data="dataList"
row-key="id"
border
style="width: 100%;"
>
<el-table-column prop="name" :label="$t('menu.name')" header-align="center" min-width="150" />
<el-table-column prop="icon" :label="$t('menu.icon')" header-align="center" align="center" width="100">
<template slot-scope="scope">
<!-- <svg class="icon-svg" aria-hidden="true"><use :xlink:href="`#${scope.row.icon}`" /></svg> -->
<svg-icon :icon-class="`${scope.row.icon}`" />
</template>
</el-table-column>
<el-table-column prop="type" :label="$t('menu.type')" header-align="center" align="center" width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.type === 0" size="small">{{ $t('menu.type0') }}</el-tag>
<el-tag v-else size="small" type="info">{{ $t('menu.type1') }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="sort" :label="$t('menu.sort')" header-align="center" align="center" width="100" />
<el-table-column prop="url" :label="$t('menu.url')" header-align="center" align="center" min-width="150" :show-overflow-tooltip="true" />
<el-table-column prop="permissions" :label="$t('menu.permissions')" header-align="center" align="left" min-width="250" :show-overflow-tooltip="true" />
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button v-if="$hasPermission('sys:menu:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('sys:menu:delete')" type="text" size="small" style="color:red" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" />
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './menu-dept-add-or-update'
export default {
components: {
AddOrUpdate
},
mixins: [mixinViewModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/sys/menu/getMenuList?menuType=0',
deleteURL: '/sys/menu'
}
}
}
}
</script>
<style scoped>
.svg-icon {
width: 1.5em;
height: 1.5em;
}
</style>

237
src/page-subspecialty/views/modules/scientificManagement/sys/menu-project-add-or-update.vue

@ -1,237 +0,0 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form
ref="dataForm"
:model="dataForm"
:rules="dataRule"
label-width="auto"
@submit.native.prevent
@keyup.enter.native="dataFormSubmitHandle()"
>
<!-- 类型 -->
<el-form-item prop="type" :label="$t('menu.type')">
<el-radio-group v-model="dataForm.type" :disabled="!!dataForm.id">
<el-radio-button :label="0">{{ $t('menu.type0') }}</el-radio-button>
<el-radio-button :label="1">{{ $t('menu.type1') }}</el-radio-button>
</el-radio-group>
</el-form-item>
<!-- 名称 -->
<el-form-item prop="name" :label="$t('menu.name')">
<el-input v-model="dataForm.name" :placeholder="$t('menu.name')" />
</el-form-item>
<!-- 上级菜单 -->
<el-form-item prop="parentName" :label="$t('menu.parentName')" class="menu-list">
<el-popover ref="menuListPopover" v-model="menuListVisible" placement="bottom-start" trigger="click">
<el-tree
ref="menuListTree"
:data="menuList"
:props="{ label: 'name', children: 'children' }"
node-key="id"
:highlight-current="true"
:expand-on-click-node="false"
accordion
@current-change="menuListTreeCurrentChangeHandle"
/>
</el-popover>
<el-input v-model="dataForm.parentName" v-popover:menuListPopover :readonly="true" :placeholder="$t('menu.parentName')">
<i v-if="dataForm.pid !== '0'" slot="suffix" class="el-icon-circle-close el-input__icon" @click.stop="deptListTreeSetDefaultHandle()" />
</el-input>
</el-form-item>
<!-- 排序 -->
<el-form-item prop="sort" :label="$t('menu.sort')">
<el-input-number v-model="dataForm.sort" controls-position="right" :min="0" :label="$t('menu.sort')" />
</el-form-item>
<!-- 授权标识 -->
<el-form-item prop="permissions" :label="$t('menu.permissions')">
<el-input v-model="dataForm.permissions" :placeholder="$t('menu.permissionsTips')" />
</el-form-item>
<!-- 路由 -->
<el-form-item v-if="dataForm.type === 0" prop="url" :label="$t('menu.url')">
<el-input v-model="dataForm.url" :placeholder="$t('menu.url')" />
</el-form-item>
<!-- 图标 -->
<el-form-item v-if="dataForm.type === 0" prop="icon" :label="$t('menu.icon')" class="icon-list">
<el-popover ref="iconListPopover" v-model="iconListVisible" placement="bottom-start" trigger="click" popper-class="mod-sys__menu-icon-popover">
<div class="mod-sys__menu-icon-inner">
<div class="mod-sys__menu-icon-list">
<el-button
v-for="(item, index) in iconList"
:key="index"
:class="{ 'is-active': dataForm.icon === item }"
@click="iconListCurrentChangeHandle(item)"
>
<svg class="icon-svg" aria-hidden="true"><use :xlink:href="`#${item}`" /></svg>
</el-button>
</div>
</div>
</el-popover>
<el-input v-model="dataForm.icon" v-popover:iconListPopover :readonly="true" :placeholder="$t('menu.icon')" />
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
import { getIconList } from '@/utils'
export default {
data() {
return {
visible: false,
menuList: [],
menuListVisible: false,
iconList: [],
iconListVisible: false,
dataForm: {
id: '',
menuType: 1, // 0 1
type: 0,
name: '',
pid: '0',
parentName: '',
url: '',
permissions: '',
sort: 0,
icon: ''
}
}
},
computed: {
dataRule() {
return {
name: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
parentName: [
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
]
}
}
},
watch: {
'dataForm.type'(val) {
this.$refs['dataForm'].clearValidate()
}
},
methods: {
init() {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.iconList = getIconList()
this.dataForm.parentName = this.$t('menu.parentNameDefault')
this.getMenuList().then(() => {
if (this.dataForm.id) {
this.getInfo()
}
})
})
},
//
getMenuList() {
return this.$http.get('/sys/menu/getMenuList?menuType=1&withButton=2').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.menuList = res.data
}).catch(() => {})
},
//
getInfo() {
this.$http.get(`/sys/menu/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
if (this.dataForm.pid === '0') {
return this.deptListTreeSetDefaultHandle()
}
this.$refs.menuListTree.setCurrentKey(this.dataForm.pid)
}).catch(() => {})
},
// ,
deptListTreeSetDefaultHandle() {
this.dataForm.pid = '0'
this.dataForm.parentName = this.$t('menu.parentNameDefault')
},
// ,
menuListTreeCurrentChangeHandle(data) {
this.dataForm.pid = data.id
this.dataForm.parentName = data.name
this.menuListVisible = false
},
// ,
iconListCurrentChangeHandle(icon) {
this.dataForm.icon = icon
this.iconListVisible = false
},
//
dataFormSubmitHandle: debounce(function() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/menu', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>
<style lang="scss">
.mod-sys__menu {
.menu-list,
.icon-list {
.el-input__inner,
.el-input__suffix {
cursor: pointer;
}
}
&-icon-popover {
width: 458px;
overflow: hidden;
}
&-icon-inner {
width: 478px;
max-height: 258px;
overflow-x: hidden;
overflow-y: auto;
}
&-icon-list {
width: 458px;
padding: 0;
margin: -8px 0 0 -8px;
> .el-button {
padding: 8px;
margin: 8px 0 0 8px;
> span {
display: inline-block;
vertical-align: middle;
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
}
</style>

69
src/page-subspecialty/views/modules/scientificManagement/sys/menu-project.vue

@ -1,69 +0,0 @@
<template>
<!-- 项目课题菜单 -->
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__menu">
<el-form :inline="true" :model="dataForm" @submit.native.prevent @keyup.enter.native="getDataList()">
<el-form-item>
<el-button v-if="$hasPermission('sys:menu:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="dataListLoading"
:data="dataList"
row-key="id"
border
style="width: 100%;"
>
<el-table-column prop="name" :label="$t('menu.name')" header-align="center" min-width="150" />
<el-table-column prop="icon" :label="$t('menu.icon')" header-align="center" align="center" width="100">
<template slot-scope="scope">
<svg-icon :icon-class="`${scope.row.icon}`" />
</template>
</el-table-column>
<el-table-column prop="type" :label="$t('menu.type')" header-align="center" align="center" width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.type === 0" size="small">{{ $t('menu.type0') }}</el-tag>
<el-tag v-else size="small" type="info">{{ $t('menu.type1') }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="sort" :label="$t('menu.sort')" header-align="center" align="center" width="100" />
<el-table-column prop="url" :label="$t('menu.url')" header-align="center" align="center" min-width="150" :show-overflow-tooltip="true" />
<el-table-column prop="permissions" :label="$t('menu.permissions')" header-align="center" align="left" min-width="250" :show-overflow-tooltip="true" />
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button v-if="$hasPermission('sys:menu:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button v-if="$hasPermission('sys:menu:delete')" type="text" size="small" style="color:red" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" />
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './menu-project-add-or-update'
export default {
components: {
AddOrUpdate
},
mixins: [mixinViewModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/sys/menu/getMenuList?menuType=1',
deleteURL: '/sys/menu'
}
}
}
}
</script>
<style scoped>
.svg-icon {
width: 1.5em;
height: 1.5em;
}
</style>

6
src/page-subspecialty/views/modules/scientificManagement/sys/project.vue

@ -240,9 +240,7 @@
/>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import checked from '@/mixins/checked'
@ -286,8 +284,8 @@ export default {
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/project/approvalPage',
// getDataListURL: '/project/page',
// getDataListURL: '/project/approvalPage',
getDataListURL: '/project/page',
getDataListIsPage: true,
deleteURL: '/project',
deleteIsBatch: false

168
src/page-subspecialty/views/modules/scientificManagement/sys/role-add-or-update.vue

@ -1,168 +0,0 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
<el-form
ref="dataForm"
:model="dataForm"
:rules="dataRule"
label-width="auto"
@submit.native.prevent
@keyup.enter.native="dataFormSubmitHandle()"
>
<!-- 角色类型 -->
<el-form-item prop="roleType" :label="$t('role.type')">
<el-radio-group v-model="dataForm.roleType" style="margin-bottom: 30px;" @change="radioChangeHandle()">
<el-radio-button label="1">系统角色</el-radio-button>
<el-radio-button label="2">课题角色</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item prop="name" :label="$t('role.name')">
<el-input v-model="dataForm.name" :placeholder="$t('role.name')" />
</el-form-item>
<el-form-item prop="remark" :label="$t('role.remark')">
<el-input v-model="dataForm.remark" :placeholder="$t('role.remark')" />
</el-form-item>
<el-form-item prop="menuList" :label="$t('role.menuList')">
<el-tree
ref="menuListTree"
:data="menuList"
:props="{ label: 'name', children: 'children' }"
node-key="id"
accordion
show-checkbox
/>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
// =>
const typeMap = {
// 1 =0
1: 0,
// 2 =1
2: 1
}
export default {
data() {
return {
visible: false,
menuList: [],
// deptList: [],
tempMenuIdList: [],
dataForm: {
id: '',
name: '',
menuIdList: [],
deptId: '',
// deptIdList: [],
remark: '',
roleType: 1
}
}
},
computed: {
dataRule() {
var validateTree = (rule, value, callback) => {
if (this.$refs.menuListTree.getCheckedKeys().length === 0) { return callback(new Error('请勾选菜单授权项')) }
callback()
}
return {
name: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
menuList: [
{ required: true, validator: validateTree, trigger: 'change' }
]
}
}
},
methods: {
init() {
this.visible = true
this.$nextTick(() => {
this.$refs.dataForm.resetFields()
this.$refs.menuListTree.setCheckedKeys([])
this.dataForm.roleType = this.dataForm.params.roleType || 1
Promise.all([
this.getMenuList()
// ,this.getDeptList()
]).then(() => {
if (this.dataForm.id) {
this.getInfo()
}
})
})
},
//
getMenuList() {
return this.$http.get(`/sys/menu/select?menuType=${typeMap[this.dataForm.roleType]}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.menuList = res.data
}).catch(() => {})
},
async radioChangeHandle() {
await this.getMenuList()
this.dataForm.menuIdList.forEach(item => this.$refs.menuListTree.setChecked(item, true))
},
// //
// getDeptList() {
// return this.$http.get('/sys/dept/list').then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg)
// }
// this.deptList = res.data
// }).catch(() => {})
// },
//
getInfo() {
this.$http.get(`/sys/role/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
this.dataForm.menuIdList.forEach(item => this.$refs.menuListTree.setChecked(item, true))
}).catch(() => {})
},
//
dataFormSubmitHandle: debounce(function() {
this.$refs.dataForm.validate((valid) => {
if (!valid) {
return false
}
this.dataForm.menuIdList = [
...this.$refs.menuListTree.getHalfCheckedKeys(),
...this.$refs.menuListTree.getCheckedKeys()
]
this.dataForm.deptId = this.$store.state.user.deptId // id
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { leading: true, trailing: false })
}
}
</script>

109
src/page-subspecialty/views/modules/scientificManagement/sys/role.vue

@ -1,109 +0,0 @@
<template>
<!-- 角色管理 -->
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__role">
<el-form :inline="true" :model="dataForm" @submit.native.prevent @keyup.enter.native="getDataList()">
<el-form-item>
<el-input v-model="dataForm.name" :placeholder="$t('role.name')" clearable />
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:role:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:role:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="dataListLoading"
:data="dataList"
border
style="width: 100%;"
@selection-change="dataListSelectionChangeHandle"
@sort-change="dataListSortChangeHandle"
>
<el-table-column type="selection" header-align="center" align="center" width="50" :selectable="selectable" />
<el-table-column prop="name" :label="$t('role.name')" header-align="center" align="center" />
<el-table-column prop="remark" :label="$t('role.remark')" header-align="center" align="center" />
<el-table-column prop="roleType" :label="$t('role.type')" sortable="custom" header-align="center" align="center" width="200">
<template slot-scope="scope">
<!-- 系统角色 -->
<el-tag v-if="scope.row.roleType === 1" size="small" type="primary">系统角色</el-tag>
<!-- 课题角色 -->
<el-tag v-else size="small" type="success">课题角色</el-tag>
</template>
</el-table-column>
<el-table-column prop="createDate" :label="$t('role.createDate')" sortable="custom" header-align="center" align="center" width="180" />
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template v-if="opPermission_systemRole(scope.row.isSystemRole)" slot-scope="scope">
<el-button
v-if="$hasPermission('sys:role:update')"
type="text"
size="small"
@click="addOrUpdateHandle(scope.row.id,...scope.row)"
>{{ $t('update') }}</el-button>
<el-button
v-if="$hasPermission('sys:role:delete')"
type="text"
size="small"
style="color:red"
@click="deleteHandle(scope.row.id)"
>{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"
/>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" />
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './role-add-or-update'
export default {
components: {
AddOrUpdate
},
mixins: [mixinViewModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/sys/role/page',
getDataListIsPage: true,
deleteURL: '/sys/role',
deleteIsBatch: true
},
dataForm: {
name: ''
},
order: 'asc',
orderField: 'role_type'
}
},
methods: {
opPermission_systemRole(isSystemRole) {
if (isSystemRole === 1) {
return this.$store.state.user.superAdmin === 1
}
return true
},
selectable(row, index) {
return this.opPermission_systemRole(row.isSystemRole)
}
}
}
</script>

229
src/page-subspecialty/views/modules/scientificManagement/sys/user-add-or-update.vue

@ -1,229 +0,0 @@
<template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false" :top="'3vh'">
<el-form
ref="dataForm"
:model="dataForm"
:rules="dataRule"
label-width="auto"
@submit.native.prevent
@keyup.enter.native="dataFormSubmitHandle()"
>
<!-- 用户名 -->
<el-form-item prop="username" :label="$t('user.username')">
<el-input v-model="dataForm.username" :placeholder="$t('user.username')" />
</el-form-item>
<!-- 所属机构 -->
<el-form-item prop="deptId" :label="$t('user.deptName')">
<dept-select v-model="dataForm.deptId" :placeholder="$t('dept.title')" />
</el-form-item>
<!-- 密码 -->
<el-form-item prop="password" :label="$t('user.password')" :class="{ 'is-required': !dataForm.id }">
<el-input v-model="dataForm.password" type="password" :placeholder="$t('user.password')" />
</el-form-item>
<el-form-item prop="confirmPassword" :label="$t('user.confirmPassword')" :class="{ 'is-required': !dataForm.id }">
<el-input v-model="dataForm.confirmPassword" type="password" :placeholder="$t('user.confirmPassword')" />
</el-form-item>
<!-- 工号 -->
<el-form-item prop="jobNumber" :label="'工号'">
<el-input v-model="dataForm.jobNumber" :placeholder="'工号'" />
</el-form-item>
<!-- 真实姓名 -->
<el-form-item prop="realName" :label="$t('user.realName')">
<el-input v-model="dataForm.realName" :placeholder="$t('user.realName')" />
</el-form-item>
<!-- 性别 -->
<el-form-item prop="gender" :label="$t('user.gender')">
<ren-radio-group v-model="dataForm.gender" dict-type="gender" />
</el-form-item>
<!-- 手机号 -->
<el-form-item prop="mobile" :label="$t('user.mobile')">
<el-input v-model="dataForm.mobile" :placeholder="$t('user.mobile')" />
</el-form-item>
<!-- 配置角色 -->
<el-form-item prop="" :label="'配置角色'" class="role-list">
<el-select v-model="dataForm.sysRoleId" :placeholder="$t('user.roleIdList')">
<el-option v-for="role in roleList" :key="role.id" :label="role.name" :value="role.id" />
</el-select>
</el-form-item>
<!-- 状态 -->
<el-form-item prop="status" :label="$t('user.status')" size="mini">
<el-radio-group v-model="dataForm.status">
<el-radio :label="0">{{ $t('user.status0') }}</el-radio>
<el-radio :label="1">{{ $t('user.status1') }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
import { isMobile } from '@/utils/validate'
import deptSelect from '@/components/dept-select'
export default {
components: { deptSelect },
data() {
return {
visible: false,
roleList: [],
roleIdListDefault: [],
dataForm: {
id: '',
username: '',
jobNumber: '',
deptId: '',
deptName: '',
password: '',
confirmPassword: '',
realName: '',
gender: 0,
email: '',
mobile: '',
sysRoleId: null,
roleIdList: [],
status: 1
}
}
},
computed: {
dataRule() {
var validatePassword = (rule, value, callback) => {
if (!this.dataForm.id && !/\S/.test(value)) {
return callback(new Error(this.$t('validate.required')))
}
callback()
}
var validateConfirmPassword = (rule, value, callback) => {
if (!this.dataForm.id && !/\S/.test(value)) {
return callback(new Error(this.$t('validate.required')))
}
if (this.dataForm.password !== value) {
return callback(new Error(this.$t('user.validate.confirmPassword')))
}
callback()
}
var validateMobile = (rule, value, callback) => {
if (value && !isMobile(value)) {
return callback(new Error(this.$t('validate.format', { attr: this.$t('user.mobile') })))
}
callback()
}
return {
username: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
jobNumber: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
deptId: [
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
],
password: [
{ validator: validatePassword, trigger: 'blur' }
],
confirmPassword: [
{ validator: validateConfirmPassword, trigger: 'blur' }
],
realName: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
mobile: [
{ required: true, validator: validateMobile, trigger: 'blur' }
]
}
}
},
watch: {
'dataForm.deptId': {
handler(newValue, oldValue) {
if (newValue) {
this.getRoleList()
} else {
this.roleList = []
this.roleIdListDefault = []
}
},
deep: true
}
},
methods: {
init() {
this.visible = true
// this.dataForm.deptId = this.$store.state.user.deptId
this.$nextTick(() => {
this.$refs.dataForm.resetFields()
this.roleIdListDefault = []
if (this.dataForm.deptId) {
this.getRoleList()
}
if (this.dataForm.id) {
this.getInfo()
}
})
},
//
getRoleList() {
this.$http.get(`/sys/role/getSysRoleListForSaveUser`, { params: { deptId: this.dataForm.deptId }}).then(({ data: res }) => {
this.roleList = res.data
})
},
//
getInfo() {
this.$http.get(`/sys/user/${this.dataForm.id}`).then(({ data: res }) => {
this.dataForm = {
...this.dataForm,
...res.data
// roleIdList: []
}
// // ,
// for (var i = 0; i < res.data.roleIdList.length; i++) {
// if (this.roleList.filter(item => item.id === res.data.roleIdList[i])[0]) {
// this.dataForm.roleIdList.push(res.data.roleIdList[i])
// continue
// }
// this.roleIdListDefault.push(res.data.roleIdList[i])
// }
})
},
//
dataFormSubmitHandle: debounce(function() {
this.$refs.dataForm.validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/user', {
...this.dataForm
// roleIdList: [
// ...this.dataForm.roleIdList,
// ...this.roleIdListDefault
// ]
}).then(({ data: res }) => {
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
})
})
}, 1000, { leading: true, trailing: false })
}
}
</script>
<style lang="scss">
.mod-sys__user {
.role-list {
.el-select {
width: 100%;
}
}
}
</style>

153
src/page-subspecialty/views/modules/scientificManagement/sys/user.vue

@ -1,153 +0,0 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-form
:inline="true"
:model="dataForm"
@submit.native.prevent
@keyup.enter.native="getDataList()"
>
<!-- 用户名 -->
<el-form-item>
<el-input v-model="dataForm.username" :placeholder="'用户名、姓名'" clearable />
</el-form-item>
<!-- 性别 -->
<!-- <el-form-item>
<ren-select v-model="dataForm.gender" dict-type="gender" :placeholder="$t('user.gender')" />
</el-form-item> -->
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:user:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('sys:user:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
</el-form-item>
<!-- <el-form-item>
<el-button v-if="$hasPermission('sys:user:export')" type="info" @click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item> -->
</el-form>
<el-table
v-loading="dataListLoading"
:data="dataList"
border
style="width: 100%;"
@selection-change="dataListSelectionChangeHandle"
@sort-change="dataListSortChangeHandle"
>
<el-table-column type="selection" header-align="center" align="center" width="50" :selectable="selectable" />
<!-- 用户名 -->
<el-table-column prop="username" :label="$t('user.username')" sortable="custom" header-align="center" align="center" />
<!-- 用户名 -->
<el-table-column prop="roleName" :label="'系统角色'" header-align="center" align="center" />
<!-- 所属机构 -->
<!-- <el-table-column prop="deptName" :label="'所属机构'" header-align="center" align="center" /> -->
<!-- 姓名 -->
<el-table-column prop="realName" :label="'姓名'" header-align="center" align="center" />
<!-- 性别 -->
<el-table-column prop="gender" :label="$t('user.gender')" sortable="custom" header-align="center" align="center" width="80">
<template slot-scope="scope">
{{ $getDictLabel("gender", scope.row.gender) }}
</template>
</el-table-column>
<!-- 手机号 -->
<!-- <el-table-column prop="mobile" :label="$t('user.mobile')" sortable="custom" header-align="center" align="center" /> -->
<!-- 状态 -->
<el-table-column prop="status" :label="$t('user.status')" sortable="custom" header-align="center" align="center" width="80">
<template slot-scope="scope">
<el-tag v-if="scope.row.status === 0" size="small" type="danger">{{ $t('user.status0') }}</el-tag>
<el-tag v-else size="small" type="success">{{ $t('user.status1') }}</el-tag>
</template>
</el-table-column>
<!-- 创建时间 -->
<el-table-column prop="createDate" :label="$t('user.createDate')" sortable="custom" header-align="center" align="center" />
<!-- 参与课题 -->
<el-table-column prop="projectList" :label="'参与课题'" header-align="center" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.projectList|filterList }}
</template>
</el-table-column>
<!-- 操作 -->
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button
v-if="$hasPermission('sys:user:update') && opPermission(scope.row.systemAdmin)"
type="text"
size="small"
@click="addOrUpdateHandle(scope.row.id)"
>{{ $t('update') }}</el-button>
<el-button
v-if="$hasPermission('sys:user:delete') && opPermission(scope.row.systemAdmin)"
type="text"
size="small"
style="color:red"
@click="deleteHandle(scope.row.id)"
>{{ $t('delete') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"
/>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" />
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './user-add-or-update'
export default {
components: {
AddOrUpdate
},
filters: {
filterList(arr) {
const result = []
arr.forEach(item => {
result.push(item.name)
})
return result.join(',')
}
},
mixins: [mixinViewModule],
data() {
return {
mixinViewModuleOptions: {
getDataListURL: '/sys/user/page',
getDataListIsPage: true,
deleteURL: '/sys/user',
deleteIsBatch: true
// exportURL: '/sys/user/export'
},
dataForm: {
username: ''
// deptId: '',
// gender: ''
}
}
},
methods: {
opPermission(isSystemAdmin) {
if (this.$store.state.user.superAdmin === 1) {
return isSystemAdmin > 0
}
if (this.$store.state.user.systemAdmin === 1) {
return isSystemAdmin === 0
}
return true
},
selectable(row, index) {
return this.opPermission(row.systemAdmin)
}
}
}
</script>

81
src/page-subspecialty/views/modules/systemManagement/set/SMS-template/index.vue

@ -1,81 +0,0 @@
<template>
<div class="sms-template">
<!-- 模板列表 -->
<head-template head-left="模板列表">
<el-button type="primary" size="small" icon="el-icon-plus">新增</el-button>
</head-template>
<!-- 模板内容 -->
<el-table ref="multipleTable" :data="dataList" tooltip-effect="dark" style="width: 100%">>
<el-table-column type="index" width="50" label="NO" header-align="center" align="center" />
<el-table-column label="简称" header-align="center" align="center">
<template slot-scope="scope">
<span>{{ scope.row.abbreviation }}</span>
<span v-if="scope.row.flag=='1'" class="defaultButton">默认</span>
</template>
</el-table-column>
<el-table-column prop="content" label="内容" header-align="center" align="center" />
<el-table-column prop="operation" label="操作" header-align="center" align="center">
<template slot-scope="scope">
<span style="color: #1890ff; padding-right: 8px" class="details">修改</span>
<span style="color: #ff4d4f" class="delete">删除</span>
<el-dropdown trigger="click">
<i class="el-icon-more" />
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>设置为默认</el-dropdown-item>
<el-dropdown-item>更新所有</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<el-pagination background layout="prev, pager, next" :total="total" @current-change="pageCurrentChangeHandle" />
</div>
</template>
<script>
import headTemplate from '@/components/head'
export default {
components: {
headTemplate
},
data() {
return {
total: 0,
dataList: [{
abbreviation: '青光眼',
content: '测试数据',
flag: '1'
}]
}
},
created() {
},
methods: {
// ,
pageCurrentChangeHandle(val) {
this.currentPage = val
this.getDataList()
}
}
}
</script>
<style lang="scss" scoped>
.sms-template {
.defaultButton {
display: inline-block;
border: 1px solid #1E79FF;
color: #1E79FF;
font-size: 12px;
padding: 0 10px;
border-radius: 16px;
margin-left: 10px;
}
.details,
.delete {
cursor: pointer;
}
.el-icon-more {
margin-left: 6px;
}
}
</style>

187
src/page-subspecialty/views/modules/systemManagement/set/alert-setting/add-or-update.vue

@ -1,187 +0,0 @@
<template>
<el-dialog
class="alert-setting"
:visible.sync="visible"
width="30%"
:title="dataForm.id ? '修改预警条件':'新增预警条件'"
>
<el-form ref="dataForm" :model="dataForm" :rules="dataRule">
<el-form-item label="指标名称:" label-width="100px" prop="name">
<el-select v-model="dataForm.name " placeholder="请选择指标名称" clearable>
<el-option v-for="(item,index) in targetNameList " :key="index" :value="item.name" :label="item.name" @click.native="selectOptionHandle(item)" />
</el-select>
</el-form-item>
<!-- flag=1较上次上升/下降flag=0值大于/小于 -->
<template v-if="ISFlag">
<el-form-item label="值大于:" prop="greaterThan" label-width="100px">
<el-input v-model="dataForm.greaterThan" placeholder="请填写值" />
<span class="company">{{ dataForm.targetUnit }}</span>
</el-form-item>
<el-form-item label="值小于:" label-width="100px" prop="lessThan">
<el-input v-model="dataForm.lessThan" placeholder="请填写值" />
<span class="company">{{ dataForm.targetUnit }}</span>
</el-form-item>
</template>
<template v-else>
<el-form-item label="较上次下降:" label-width="100px" prop="lowerThan">
<el-input v-model="dataForm.lowerThan" placeholder="请填写值" />
</el-form-item>
<el-form-item label="较上次上升:" label-width="100px" prop="upThan">
<el-input v-model="dataForm.upThan" up="请填写值" />
</el-form-item>
</template>
<el-form-item label="启用" label-width="90px">
<el-switch v-model="dataForm.status" :active-value="1" :inactive-value="0" />
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
props: {
targetNameList: {
type: Array,
default: () => []
}
},
data() {
return {
visible: false,
dataForm: {
greaterThan: '', //
lessThan: '', //
id: '',
status: 1, // 1 0
lowerThan: '', //
upThan: '', //
name: '', //
targetUnit: '' //
},
ISFlag: true // true
}
},
computed: {
dataRule() {
return {
name: [
{ required: true, message: '请选择指标名称', trigger: 'change' }
]
}
}
},
created() {
},
methods: {
//
selectOptionHandle(item) {
// flag=1/flag=0/
this.ISFlag = item.flag === 0
this.dataForm.targetUnit = item.targetUnit
},
//
// switchHandle(e) {
// // 1 0
// console.log(e)
// this.dataForm.status = e ? 1 : 0
// },
//
init() {
this.visible = true
this.$nextTick(() => {
this.$refs.dataForm.resetFields() //
if (this.dataForm.id) {
this.getInfo()
}
})
},
//
getInfo() {
this.$http.get(`/yzk/target/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
this.ISFlag = res.data.flag === 0
}).catch(() => { })
},
//
dataFormSubmitHandle: debounce(function() {
console.log(this.dataForm)
this.$refs.dataForm.validate((valid) => {
if (!valid) {
return false
}
if (this.ISFlag && !this.dataForm.greaterThan && !this.dataForm.lessThan) {
return this.$message.error('值必须填写一个')
} else if (!this.ISFlag) {
if (!this.dataForm.lowerThan && !this.dataForm.upThan) {
return this.$message.error('值必须填写一个')
} else if (this.dataForm.lowerThan && this.dataForm.upThan) {
return this.$message.error('值只能填写一个')
}
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/yzk/target', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { leading: true, trailing: false })
}
}
</script>
<style lang="scss">
.alert-setting {
.company {
display: inline-block;
width: 60px;
padding-left: 5px;
}
.el-form-item__content {
display: flex;
}
.el-dialog__header {
margin-bottom:12px
}
.el-dialog__body {
padding-right: 30px;
}
.formItemOne .el-form-item__content {
display: flex;
}
.el-date-editor.el-input, .el-date-editor.el-input__inner{
width: 100%;
}
.el-select{
display: block;
width: 100%;
padding-right: 50px;
}
.el-input-number {
display: block;
width: 100%;
}
.el-switch {
line-height: 40px;
display: block;
}
}
</style>

100
src/page-subspecialty/views/modules/systemManagement/set/alert-setting/index.vue

@ -1,100 +0,0 @@
<template>
<div class="sms-template">
<!-- 模板列表 -->
<head-template head-left="预警设置">
<el-button type="primary" size="small" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button>
</head-template>
<!-- 模板内容 -->
<el-table ref="multipleTable" :data="dataList" tooltip-effect="dark" style="width: 100%">>
<el-table-column label="状态">
<template slot-scope="scope">
<!-- 1开启 0关闭 -->
<el-switch :value="scope.row.status == 1 ? true : false" @change="switchHandle(scope.row,$event)" />
</template>
</el-table-column>
<el-table-column label="指标名称">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column prop="content" label="条件" />
<el-table-column prop="operation" label="操作">
<template slot-scope="scope">
<span style="color: #1890ff; padding-right: 8px" class="details" @click="addOrUpdateHandle(scope.row.id,'')">修改</span>
<span style="color: #ff4d4f" class="delete" @click="deleteHandle(scope.row.id)">删除</span>
</template>
</el-table-column>
</el-table>
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :target-name-list="targetNameList" @refreshDataList="getDataList" />
<!-- <el-pagination background layout="prev, pager, next" :total="total" @current-change="pageCurrentChangeHandle" /> -->
</div>
</template>
<script>
import headTemplate from '@/components/head'
import addOrUpdate from './add-or-update.vue'
import mixinViewModule from '@/mixins/view-module'
export default {
components: {
headTemplate,
addOrUpdate
},
mixins: [mixinViewModule],
data() {
return {
targetNameList: [],
mixinViewModuleOptions: {
getDataListURL: '/yzk/target/targetList',
deleteURL: '/yzk/target'
}
}
},
created() {
this.getTargetName()
},
methods: {
//
async getTargetName() {
const { data: res } = await this.$http.get('/yzk/target/selectTarget')
if (res.code === 0) {
this.targetNameList = res.data
} else {
this.$message.error(res.msg)
}
},
//
async switchHandle(scopeRow, e) {
console.log(scopeRow, e)
// 1 0
const { data: res } = await this.$http.post('/yzk/target/switchStatus', {
id: scopeRow.id,
status: e === false ? 0 : 1
})
if (res.code === 0) {
this.getDataList()
} else {
this.$message.error(res.msg)
}
}
}
}
</script>
<style lang="scss" scoped>
.sms-template {
.defaultButton {
display: inline-block;
border: 1px solid #1E79FF;
color: #1E79FF;
font-size: 12px;
padding: 0 10px;
border-radius: 16px;
margin-left: 10px;
}
.details,
.delete {
cursor: pointer;
}
.el-icon-more {
margin-left: 6px;
}
}
</style>

174
src/page-subspecialty/views/modules/systemManagement/set/case-template/add-or-update.vue

@ -1,174 +0,0 @@
<template>
<div class="crf-add-dialog">
<el-dialog
width="90%"
top="2vh"
:visible.sync="visible"
:title="dataForm.title||(!dataForm.id ? $t('add') : $t('update'))"
:close-on-click-modal="false"
:close-on-press-escape="false"
@close="closeDialog"
>
<el-form
ref="dataForm"
:model="dataForm"
:rules="dataRule"
label-width="auto"
@keyup.enter.native="initBaseInfo()"
>
<el-form-item prop="type" :label="'CRF类型'">
<el-radio-group v-model="dataForm.type" size="small">
<el-radio-button label="门诊" />
<el-radio-button label="手术" />
<el-radio-button label="随访" />
<el-radio-button label="其他" />
</el-radio-group>
</el-form-item>
<el-form-item prop="name" :label="'名称'">
<el-input
v-model="dataForm.name"
:placeholder="'请填写表单名称'"
size="small"
/>
</el-form-item>
<el-form-item prop="content" :label="'表单'" style="margin-top:20px;">
<!-- <crf-editor ref="crf" v-model="dataForm.content" :height="height" :is-p="true" />-->
</el-form-item>
<el-form-item prop="description" :label="'描述'">
<el-input
v-model="dataForm.description"
type="textarea"
:rows="1"
:placeholder="'相关描述'"
size="small"
/>
</el-form-item>
</el-form>
<template slot="footer">
<el-button size="small" @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" size="small" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
<!-- <el-button type="primary" @click="exportContent">引入</el-button> -->
</template>
</el-dialog>
</div>
</template>
<script>
import debounce from 'lodash/debounce'
// import crfEditor from '@/components/hm-crf'
const Base64 = require('js-base64').Base64
export default {
// components: { crfEditor },
props: {
systemInfo: {
type: Object,
default: () => {
return {}
}
}
},
data() {
return {
visible: false,
height: 'calc(100vh - 300px)',
dataForm: {
id: '',
type: '门诊',
name: '',
description: '',
content: ''
}
}
},
computed: {
dataRule() {
var validate_content = (rule, value, callback) => {
if (this.dataForm.content === '') {
return callback(new Error('请设计表单内容'))
}
callback()
}
return {
type: [
{ required: true, message: '请选择CRF类型', trigger: 'change' }
],
name: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
content: [
{ required: true, validator: validate_content, trigger: 'change' }
]
}
}
},
methods: {
init() {
this.visible = true
this.$nextTick(() => {
this.$refs.dataForm.resetFields()
if (this.dataForm.id) {
this.getInfo()
} else {
this.dataForm = { ...this.dataForm }
}
})
},
//
getInfo() {
this.$http.get(`/crf/template/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
if (res.data) {
this.dataForm.name = res.data.name
this.dataForm.type = res.data.type
this.dataForm.content = Base64.decode(res.data.content)
this.dataForm.description = res.data.description
this.$refs['crf'].renderContent()
}
}).catch(() => {})
},
//
exportContent() {
//
// console.log(document.querySelector('#myEditor_ifr').contentWindow)
this.$refs.crf.fullContent('右眼<input id="youyan" class="hminput border-1" style="width: 120px; height: 18px; text-align: center;" title="" autocomplete="off" name="youyan" type="text" placeholder="" data-hm_id="youyan" data-hm_type="text" data-hm_required="false" data-hm_bd_id="DAT1_VA.OD_VAN" data-hm_bd_eye_type="" />左眼<input id="zuoyan" class="hminput border-1 " style="width: 120px; height: 18px; text-align: center;" title="" autocomplete="off" name="zuoyan" type="text" placeholder="" data-hm_id="zuoyan" data-hm_type="text" data-hm_required="false" data-hm_bd_id="DAT1_VA.OS_VAN" data-hm_bd_eye_type="" />')
},
//
dataFormSubmitHandle: debounce(function() {
this.$refs.dataForm.validate((valid) => {
if (!valid) {
return false
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/crf/template', { ...this.dataForm, content: Base64.encode(this.dataForm.content) }).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
})
}, 1000, { leading: true, trailing: false }),
closeDialog() {
this.$emit('closeDialog')
}
}
}
</script>
<style lang="scss">
.crf-add-dialog {
.el-form-item {
margin-bottom:8px
}
}
</style>

105
src/page-subspecialty/views/modules/systemManagement/set/case-template/index.vue

@ -1,105 +0,0 @@
<template>
<div class="mod-sys__dept">
<head-template head-left="表单管理">
<el-button type="primary" size="small" icon="el-icon-plus" @click="addOrUpdateHandle(null,null,'新增表单')">新增
</el-button>
</head-template>
<el-table v-loading="dataListLoading" :data="dataList" row-key="id" style="width: 100%;" :height="tableHeight">
<!-- 名称 -->
<el-table-column prop="name" :label="'表单名称'" />
<!-- crf类型 -->
<el-table-column prop="type" :label="'表单类型'" />
<!-- 描述 -->
<el-table-column prop="description" :label="'描述'" />
<!-- 操作 -->
<el-table-column prop="operation" :label="$t('handle')">
<template slot-scope="scope">
<!-- <el-button type="text" size="small" @click="testClick1(scope.row.id,scope.row)">测试1</el-button>
<el-button type="text" size="small" @click="testClick2(scope.row.id,scope.row)">测试2</el-button> -->
<el-button type="text" size="small" @click="preview(scope.row.id,scope.row)">预览</el-button>
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id,scope.row)">编辑</el-button>
<el-button type="text" size="small" style="color:red" @click="deleteHandle([scope.row.id])">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 添加分页组件 -->
<el-pagination background layout="prev, pager, next" :total="total" @current-change="pageCurrentChangeHandle" />
<!-- 弹窗, 新增 / 修改 -->
<add-or-update
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"
@closeDialog="addOrUpdateVisible=false"
/>
<!-- 弹窗, 预览 -->
<!-- <preview v-if="previewVisible" ref="preview" :body-style-show="true" />-->
<!-- 填写测试 -->
<!-- <test v-if="testVisible" ref="Test" :exam-name="test.name" :list="test.exams" /> -->
<!-- 填写测试 -->
<!-- <follow-up v-if="followUpVisible" ref="followUp" /> -->
</div>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
import tableAutoHeight from '@/mixins/tableAutoHeight'
import AddOrUpdate from './add-or-update.vue'
// import Preview from '@/components/hm-crf/preview'
import headTemplate from '@/components/head'
//
// import test from '@/components/hm-crf/crf-data-test'
// import followUp from '@/components/hm-crf/followUp'
export default {
components: {
AddOrUpdate,
// Preview,
headTemplate
// test,
// followUp //
},
mixins: [mixinViewModule, tableAutoHeight],
data() {
return {
// testVisible: false, //
// followUpVisible: false, //
previewVisible: false,
mixinViewModuleOptions: {
getDataListURL: '/crf/template/page',
getDataListIsPage: true,
deleteURL: '/crf/template'
},
dataForm: {},
systemInfo: {}
}
},
created() {
},
methods: {
preview(id, params, title) {
console.log(123)
this.previewVisible = true
this.$nextTick(() => {
this.$refs.preview.dataForm = { id, title, ...params }
this.$refs.preview.init()
})
},
testClick1(id, params, title) {
this.testVisible = true
this.$nextTick(() => {
this.$refs.Test.init()
})
},
testClick2(id, params, title) {
console.log(params)
this.followUpVisible = true
this.$nextTick(() => {
this.$refs.followUp.crfId = params.id
this.$refs.followUp.patientIdNumber = '342826195112180617'
this.$refs.followUp.init()
})
}
}
}
</script>

382
src/page-subspecialty/views/modules/systemManagement/set/followup-potocol.vue

@ -1,382 +0,0 @@
<template>
<div class="follow-management">
<!-- 弹框 -->
<el-dialog
:title="sureEditText=='修改' ? '修改随访方案':'新增随访方案'"
:visible.sync="dialogFormVisible"
width="60%"
@close="closeDialog"
>
<el-form ref="followRuleForm" :model="form" :rules="rules">
<el-form-item label="名称:" label-width="120px" prop="name">
<el-input
v-model="form.name"
autocomplete="off"
placeholder="请输入名称"
/>
</el-form-item>
<el-form-item label="描述:" label-width="120px" prop="description">
<el-input
v-model="form.description"
type="textarea"
placeholder="方案描述"
/>
</el-form-item>
<el-form-item label="周期:" label-width="120px" class="cycle-display" prop="unit">
<el-input-number
v-model="form.period"
controls-position="right"
:min="1"
@change="handleChangeCycle"
/>
<el-checkbox-group v-model="form.unit" label-width="120px" :max="1">
<el-checkbox-button label="天" name="type" />
<el-checkbox-button label="周" name="type" />
<el-checkbox-button label="月" name="type" />
</el-checkbox-group>
</el-form-item>
<el-form-item
label="短信提醒:"
label-width="120px"
class="sms-reminder"
>
<el-select v-model="form.smsPeriod" placeholder="请选择活动区域">
<el-option label="提前1天" value="1" />
<el-option label="提前2天" value="2" />
</el-select>
<el-input
v-model="form.smsMessage"
type="textarea"
label-width="120px"
/>
</el-form-item>
<el-form-item label="设为默认:" label-width="120px">
<el-switch v-model="form.isDefault" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="sureEditFollowClick(sureEditText)">{{ sureEditText }}</el-button>
</div>
</el-dialog>
<!-- 头部 -->
<head-template head-left="随访方案列表">
<el-button type="primary" size="small" icon="el-icon-plus" @click="addFollowClick">新增方案</el-button>
</head-template>
<el-table
ref="multipleTable"
:data="followList"
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column prop="name" label="随访方案" />
<el-table-column label="随访周期">
<template slot-scope="scope">
<span>{{ scope.row.period }}{{ scope.row.unit }}</span>
</template>
</el-table-column>
<el-table-column prop="description" label="描述" />
<el-table-column label="提醒时间">
<template slot-scope="scope">
<span>提前{{ scope.row.smsPeriod }}</span>
</template>
</el-table-column>
<el-table-column prop="operation" label="操作">
<template slot-scope="scope">
<span
style="color: #1890ff; padding-right: 8px"
class="operation-details"
@click="editClick(scope.row)"
>编辑</span>
<span
style="color: #ff4d4f"
class="operation-delete"
@click="deleteClick(scope.row)"
>删除</span>
</template>
</el-table-column>
</el-table>
<el-pagination
background
layout="prev, pager, next"
:total="total"
@current-change="currentChange"
@prev-click="upPageClick"
@next-click="nextPageClick"
/>
</div>
</template>
<script>
import dialogjs from '@/mixins/dialog'
import { confirm } from '@/utils/confirm'
import headTemplate from '@/components/head'
export default {
inject: ['refresh'],
components: {
headTemplate
},
mixins: [dialogjs],
data() {
return {
inputSearchValue: '',
projectId: '',
followList: [],
limit: 10,
currentPage: 1,
total: 0,
searchTime: '',
//
form: {
name: '',
//
description: '',
//
period: 1,
//
unit: [],
//
smsPeriod: '',
//
smsMessage: '',
// 0: 1:
isDefault: false
},
rules: {
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
],
description: [
{ required: true, message: '请填写描述', trigger: 'blur' }
],
unit: [
{ type: 'array', required: true, message: '请选择周期单位', trigger: 'change' }
]
},
sureEditText: '确定',
currentId: ''
}
},
created() {
this.projectId = window.SITE_CONFIG['projectId']
this.getFollowList()
},
methods: {
//
addFollowClick() {
this.sureEditText = '确定'
this.dialogFormVisible = true
},
// /访
sureEditFollowClick(sureEditText) {
this.$refs.followRuleForm.validate((valid) => {
if (valid) {
this.setAddEditFollow(sureEditText)
} else {
console.log('error submit!!')
return false
}
})
},
// /访
async setAddEditFollow(sureEditText) {
this.dialogFormVisible = true
const { data: res } = await this.$http({
method: sureEditText === '确定' ? 'post' : 'put',
url: '/visit',
data: {
name: this.form.name,
description: this.form.description,
period: this.form.period,
unit: this.form.unit[0],
smsPeriod: this.form.smsPeriod,
smsMessage: this.form.smsMessage,
isDefault: this.form.isDefault ? 1 : 0,
projectId: this.projectId,
id: this.currentId
}
})
if (res.code === 0) {
this.$message({
type: 'success',
message: sureEditText === '确定' ? '添加成功!' : '修改成功'
})
this.dialogFormVisible = false
this.formFormat()
this.refresh()
this.currentId = ''
} else {
this.$message.error(res.msg)
}
},
//
handleChangeCycle() {},
// 访
async getFollowList(e) {
const { data: res } = await this.$http.get('/visit/page', {
params: {
limit: this.limit,
page: this.currentPage,
name: this.inputSearchValue,
projectId: this.projectId
}
})
this.followList = res.data.list
this.total = res.data.total
},
//
deleteClick(scopeRow) {
confirm('').then(async() => {
const { data: res } = await this.$http.delete('/visit', {
params: {
id: scopeRow.id
}
})
if (res.code === 0) {
this.$message({
type: 'success',
message: '删除成功!'
})
this.refresh()
} else {
this.$message.error(res.msg)
}
})
},
//
editClick(scopeRow) {
this.sureEditText = '修改'
this.currentId = scopeRow.id
this.getVisitInfo(scopeRow)
},
// 访
async getVisitInfo(scopeRow) {
const { data: res } = await this.$http.get('/visit/getInfo', {
params: {
id: scopeRow.id
}
})
if (res.code === 0) {
this.dialogFormVisible = true
this.form = res.data
this.form.isDefault === 0 ? this.form.isDefault = false : this.form.isDefault = true
this.form.unit = [this.form.unit]
} else {
this.$message.error(res.msg)
}
},
//
closeDialog() {
this.dialogFormVisible = false
this.formFormat()
},
//
formFormat() {
this.form = {
name: '',
//
description: '',
//
period: 1,
//
unit: [],
//
smsPeriod: '',
//
smsMessage: '',
// 0: 1:
isDefault: false
}
},
//
currentChange(e) {
this.currentPage = e
this.getFollowList()
},
//
upPageClick(e) {
},
//
nextPageClick(e) {
}
}
}
</script>
<style lang='scss' scoped>
.follow-management {
background-color: #fff;
padding: 16px;
.sms-reminder {
.el-select {
margin-bottom: 24px;
display: flex;
}
}
.title {
height: 64px;
padding-left: 24px;
line-height: 64px;
font-size: 16px;
background-color: #fff;
box-shadow: inset 0px -1px 0px #f0f0f0;
border-radius: 2px 2px 0px 0px;
}
.state-circle {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 8px;
}
.state-circle-green {
background-color: #52c41a;
}
.state-circle-red {
background-color: #ff4d4f;
}
.operation-details,
.operation-delete {
cursor: pointer;
}
}
</style>
<style lang="scss">
.follow-management {
.cycle-display {
.el-form-item__content {
display: flex;
}
.el-input-number {
width: 100px;
margin-right: 16px;
}
}
.el-dialog__footer {
border-top: 1px solid #f0f0f0;
padding: 10px 20px;
}
}
.input-search {
display: flex;
.el-icon-d-arrow-right {
transform: rotate(-90deg);
}
}
.el-transfer__button:first-child {
margin-bottom: 4px;
}
.el-transfer__buttons {
.el-button {
display: block;
padding: 0;
width: 24px;
height: 24px;
}
.el-button:nth-child(2) {
margin-left: 0;
}
}
</style>

65
src/page-subspecialty/views/modules/systemManagement/set/index.vue

@ -1,65 +0,0 @@
<template>
<div class="set-management">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<!-- <el-tab-pane label="随访方案" name="followUpProtocol">
<followup-potocol />
</el-tab-pane> -->
<el-tab-pane label="样式模板" name="caseTemplate">
<case-template />
</el-tab-pane>
<!-- <el-tab-pane label="短信模板" name="SMSTemplate">
<sms-template />
</el-tab-pane> -->
<!-- <el-tab-pane label="预警设置" name="alertSetting">
<alert-setting />
</el-tab-pane> -->
</el-tabs>
</div>
</template>
<script>
// import smsTemplate from './SMS-template'
import caseTemplate from './case-template'
// import alertSetting from './alert-setting'
export default {
components: {
// smsTemplate,
caseTemplate
// alertSetting
},
data() {
return {
activeName: 'caseTemplate'
}
},
created() {
},
methods: {
handleClick() {
}
}
}
</script>
<style lang="scss" soped>
.set-management {
}
</style>
<style lang="scss">
.set-management {
.el-tabs__header {
margin: 0;
}
.el-tabs__nav {
background: #fff;
}
.el-tabs__content {
padding: 16px;
background: #fff;
height: calc( 100vh - 50px - 32px - 42px);
}
.el-tabs--card>.el-tabs__header .el-tabs__nav {
border: 1px solid #f0f0f0;
}
}
</style>

48
src/page-subspecialty/views/pages/imageEdit.vue

@ -1,48 +0,0 @@
<template>
<el-dialog
width="90%"
top="2vh"
:visible.sync="visible"
:title="'预览'"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
>
123
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="submit">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
const Base64 = require('js-base64').Base64
export default {
props: {
bodyStyleShow: {
type: Boolean,
default: false
},
//
title: {
type: String,
default: ''
}
},
data() {
return {
visible: false,
height: 'calc(100vh - 200px)'
}
},
methods: {
init() {
this.visible = true
this.$nextTick(() => {
})
}
}
}
</script>

216
src/page-subspecialty/views/pages/satusScreen.vue

@ -1,216 +0,0 @@
<template>
<!-- 手术实时状态大屏 -->
<div class="statusScreen" @click="screenFull">
<el-row class="head">
<el-col :span="6"> <svg-icon icon-class="icon-logo-one" class="icon-logo" /></el-col>
<el-col :span="12" class="patient-status">
<img src="../../../assets/img/tixing.png" alt="">
<span>患者手术实时状态</span>
</el-col>
<el-col :span="6" class="right-date">
<span>{{ date }}</span>
<span>{{ time }}</span>
</el-col>
</el-row>
<div class="content">
<!-- 头部 -->
<el-row class="table-head">
<el-col :span="2">NO</el-col>
<el-col :span="6">姓名</el-col>
<el-col :span="8">手术名称</el-col>
<el-col :span="8">状态</el-col>
</el-row>
<!-- 内容 -->
<el-row v-for="(item,index) in surgicalStatus" :key="index" class="table-content">
<el-col :span="2">{{ ((index+1 + ((dataForm.page - 1) * 6)) < 10 ? '00': ((index+1 + ((dataForm.page - 1) * 6)) >= 10 && (index+1 + ((dataForm.page - 1) * 6)) < 100 ? '0' : '')) + (index+1 + ((dataForm.page - 1) * 6)) }}</el-col>
<el-col :span="6">{{ item.patientName }}</el-col>
<el-col :span="8">{{ item.operaName }}</el-col>
<!-- status 1:进入手术区域2:手术准备3:等待手术4:开始手术5:手术结束6:准备离开手术区域 -->
<el-col :span="8" class="col-stauts">{{ item.status === 1 ? '进入手术区域' :
(item.status === 2 ? '手术准备' :
(item.status === 3 ? '等待手术' :
(item.status === 4 ? '开始手术' :
(item.status === 5 ? '手术结束' :
(item.status === 6 ? '准备离开手术区域' : '手术结束'))))) }}</el-col>
</el-row>
</div>
<div class="footers">
<span>温馨提示</span>
<span>请您耐心等待</span>
</div>
</div>
</template>
<script>
import screenfull from 'screenfull'
export default {
data() {
return {
surgicalStatus: [],
time: '',
date: '',
dataForm: {
page: 1,
limit: 6,
centreCode: 'WZYSG_QG'
},
currentPage: 1,
total: '',
pages: null,
screenTimer: null
}
},
created() {
setInterval(() => {
this.time = this.$moment().format('LTS')
this.date = this.$moment().format('ll')
}, 1000)
this.getScreenData()
this.screenTimer = setInterval(() => {
this.pages && (this.dataForm.page < this.pages) ? this.dataForm.page++ : this.dataForm.page = 1
// this.surgicalStatus = []
this.getScreenData('time')
}, 8000)
},
destroyed() {
this.dataForm.page = 1
this.surgicalStatus = []
clearInterval(this.screenTimer)
},
methods: {
async getScreenData(flag) {
const { data: res } = await this.$http.get('/pda', {
params: this.dataForm
})
if (res.code === 0) {
this.surgicalStatus = res.data.list
res.data.list.forEach(item => {
if (item.patientName.length === 2) {
item.patientName = item.patientName.substring(0, 1) + '*' // name
} else if (item.patientName.length === 3) {
item.patientName = item.patientName.substring(0, 1) + '*' + item.patientName.substring(2, 3)//
} else if (item.patientName.length > 3) {
item.patientName = item.patientName.substring(0, 1) + '*' + '*' + item.patientName.substring(3, item.patientName.length)// 4
}
})
this.total = res.data.total
this.pages = Math.ceil(this.total / 6)
} else {
this.$message.error(res.msg)
}
},
//
screenFull() {
// screenfullenabled
console.log(screenfull)
if (!screenfull.enabled) {
//
this.$message({
message: '不支持全屏',
type: 'warning'
})
return
}
screenfull.toggle(document.getElementById('full-screen'))
}
}
}
</script>
<style lang="scss" scoped>
.statusScreen {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100vh;
.head {
padding: 0 38px;
display: flex;
align-items: center;
height: 140px;
width: 100vw;
background: #1e4972;
color: #fff;
.icon-logo {
font-size: 250px;
}
.patient-status {
position: relative;
width: 700px;
img {
width: 100%;
height: 140px;
}
span {
width: 100%;
font-size: 48px;
position: absolute;
text-align: center;
left: 50%;
top: 50%;
transform: translate(-50%,-50%)
}
}
.right-date {
width: 33.33%;
text-align: right;
span {
color: #A1FFF9;
}
span:nth-child(1) {
font-size: 32px;
padding-right: 16px;
}
span:nth-child(2) {
font-size: 58px;
}
}
}
.content {
height: calc(100vh - 140px - 100px);
overflow: hidden;
.table-head,.table-content {
padding: 0 48px;
font-size: 48px;
}
.table-head {
height: calc(100% / 7);
color: #00417C;
background: linear-gradient(180deg, #EEF8FF 0%, #CDEDFF 100%);
}
.table-content {
height: calc(100% / 7);
.col-stauts {
color:#058B2B;
}
}
.table-content:nth-of-type(odd) {
background: #DDF2FF;
}
.table-content:nth-of-type(even) {
background: #F9FFFF;
}
.el-col {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
}
.footers {
height: 100px;
line-height: 100px;
padding: 0 48px;
color: #fff;
font-size: 32px;
background: #1e4972;
}
}
@media screen and (min-width: 320px) {
}
</style>
<style lang="scss">
.statusScreen {
}
</style>

744
src/page-subspecialty/views/pages/schedule.vue

@ -1,744 +0,0 @@
<template>
<div class="schedule-date">
<div class="date-head">
<div class="date-head-left">手术日程安排</div>
<div class="date-head-right">
<el-button-group style="margin-right:10px;">
<el-button type="primary" icon="el-icon-arrow-left" size="small" @click="weekPre">上周</el-button>
<el-button type="primary" size="small" @click="weekNext">上周<i class="el-icon-arrow-right el-icon--right" />
</el-button>
</el-button-group>
<span>选择日期</span>
<el-date-picker
v-model="newDate"
class="right-pick-btn"
:clearable="false"
type="date"
size="small"
placeholder="按日期查询"
@change="pickDate"
/>
</div>
</div>
<div class="date-content">
<el-row class="weeks">
<el-col :span="3" class="doctor-list-text">医生列表</el-col>
<el-col
v-for="(day, index) in days"
:key="index"
:span="3"
class="date-item"
:class="{selected: index == tabIndex}"
@click="pick(day, index)"
>
<!--本月-->
<div class="date-day">
<span class="hidden-sm-and-down">{{ day | dateFormat }}</span>
<p>{{ day | getWeekFormat }}</p>
</div>
<div class="morning-after">
<span>上午</span>
<span>下午</span>
</div>
</el-col>
</el-row>
<el-row v-for="(item,index) in doctorList" :key="index" :gutter="10" class="content">
<el-col :span="3">
<div class="doctorList">
<div class="list">
<div class="list-img">
<img src="@/assets/img/avatar.png" alt="">
</div>
<p>{{ item.name }}</p>
<p>{{ item.expertise }}</p>
</div>
</div>
</el-col>
<el-col v-for="(weekInfoItem,weekInfoIndex) in item.weekInfo" :key="weekInfoIndex" :span="3">
<div class="surplu-num">
<!-- 上午 -->
<div
class="morning"
:class="weekInfoItem.morning.surplusNum<=0 ? 'morningAfterClass' :'' "
@mouseover.stop="mouseoverHandle(index,weekInfoIndex,'morning')"
@mouseout="mouseoutHandle"
>
<p></p>
<p :style="{'color':weekInfoItem.morning.surplusNum<=0 ? 'red':'#00BB61'}">
{{ weekInfoItem.morning.surplusNum }}</p>
<div
v-show="currentIndex===index && currentWeekIndex===weekInfoIndex && plusIsShow && showMorningAfterText==='morning' && weekInfoItem.morning.surplusNum>0"
class="show-plus"
>
<i class="el-icon-plus" />
</div>
</div>
<!-- 下午 -->
<div
class="after"
:class="weekInfoItem.after.surplusNum<=0 ? 'morningAfterClass' :'' "
@mouseover.stop="mouseoverHandle(index,weekInfoIndex,'after')"
@mouseout="mouseoutHandle"
>
<p></p>
<p :style="{'color':weekInfoItem.after.surplusNum<=0 ? 'red':'#00BB61'}">
{{ weekInfoItem.after.surplusNum }}</p>
<div
v-show="currentIndex===index && currentWeekIndex===weekInfoIndex && plusIsShow && showMorningAfterText==='after' && weekInfoItem.morning.surplusNum>0"
class="show-plus"
@click="addPatientHandle"
>
<i class="el-icon-plus" />
</div>
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import moment from 'moment'
import _ from 'lodash'
/* eslint-disable */
export default {
props: {
dateValue: {
type: String,
default: moment(new Date()).format("YYYY-MM-DD")
},
timeValue: {
type: String,
default: "00:00"
}
},
data() {
return {
currentYear: 1970, //
currentMonth: 1, //
currentDay: 1, //
currentWeek: 1, //
days: [],
value1: "",
tabIndex: null,
newDate: moment(new Date()).format("YYYY-MM-DD"),
tabTimeIndex: 4,
times: [
{ time: "00:00:00~06:00:00", label: "00:00~06:00" },
{ time: "06:00:00~12:00:00", label: "06:00~12:00" },
{ time: "12:00:00~18:00:00", label: "12:00~18:00" },
{ time: "18:00:00~24:00:00", label: "18:00~24:00" },
{ time: "00:00:00~24:00:00", label: "今日全部" }
],
plusIsShow: false,
currentIndex: null,
currentWeekIndex: null,
showMorningAfterText: '',
doctorList: [{
image: '@/assets/img/avatar.png',
name: '李浩',
expertise: '激光手术',
weekInfo: [{
date: '',
morning: {
surplusNum: 12, //
scheduled_patients: []
},
after: {
surplusNum: 0, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
}, {
date: '',
morning: {
surplusNum: 12, //
scheduled_patients: []
},
after: {
surplusNum: 12, //
scheduled_patients: []
},
}, {
date: '',
morning: {
surplusNum: 0, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
after: {
surplusNum: 5, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
}, {
date: '',
morning: {
surplusNum: 0, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
after: {
surplusNum: 8, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
}, {
date: '',
morning: {
surplusNum: 5, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
after: {
surplusNum: 9, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
}, {
date: '',
morning: {
surplusNum: 12, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
after: {
surplusNum: 7, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
}, {
date: '',
morning: {
surplusNum: 4, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
after: {
surplusNum: 7, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
}]
}, {
image: '@/assets/img/avatar.png',
name: '李浩',
expertise: '激光手术',
weekInfo: [{
date: '',
morning: {
surplusNum: 0, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
after: {
surplusNum: 12, //
scheduled_patients: [0]
},
}, {
date: '',
morning: {
surplusNum: 0, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
after: {
surplusNum: 12, //
scheduled_patients: []
},
}, {
date: '',
morning: {
surplusNum: 0, //
scheduled_patients: []
},
after: {
surplusNum: 4, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
}, {
date: '',
morning: {
surplusNum: 7, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
after: {
surplusNum: 9, //
scheduled_patients: [{
name: '李二狗',
sex: '男',
age: '45'
}, {
name: '李二狗',
sex: '男',
age: '45'
}]
},
}, {
date: '',
morning: {
surplusNum: 12, //
scheduled_patients: []
},
after: {
surplusNum: 12, //
scheduled_patients: []
},
}, {
date: '',
morning: {
surplusNum: 12, //
scheduled_patients: []
},
after: {
surplusNum: 12, //
scheduled_patients: []
},
}, {
date: '',
morning: {
surplusNum: 12, //
scheduled_patients: []
},
after: {
surplusNum: 12, //
scheduled_patients: []
},
}]
}]
};
},
filters: {
dateFormat(date) {
return moment(date).format("YYYY-MM-DD");
},
getWeekFormat(date) {
const weeksObj = {
1: "周一",
2: "周二",
3: "周三",
4: "周四",
5: "周五",
6: "周六",
7: "周日"
};
let weekNumber = moment(date).isoWeekday();
return weeksObj[weekNumber];
}
},
mounted() {
const index = _.findIndex(this.days, function (o) {
// console.log('o: ', o.getDate());
// console.log('new Date().getDate(): ', new Date().getDate());
return o.getDate() === new Date().getDate();
});
console.log("index: ", index);
this.tabIndex = index;
},
created() {
this.initData(null);
},
methods: {
formatDate(year, month, day) {
const y = year;
let m = month;
if (m < 10) m = `0${m}`;
let d = day;
if (d < 10) d = `0${d}`;
return `${y}-${m}-${d}`;
},
pickDate(date) {
let that = this;
that.newDate = moment(date).format("YYYY-MM-DD");
that.$emit("dateValue", that.newDate);
console.log("this.newDate: ", that.newDate);
that.initData(that.newDate);
const index = _.findIndex(that.days, function (o) {
return o.getDate() === new Date(that.newDate).getDate();
});
// console.log("index: ", index);
this.tabIndex = index;
},
initData(cur) {
let date = "";
if (cur) {
date = new Date(cur);
} else {
date = new Date();
}
this.currentDay = date.getDate(); //
this.currentYear = date.getFullYear(); //
this.currentMonth = date.getMonth() + 1; //
this.currentWeek = date.getDay(); // 1...6,0 //
if (this.currentWeek === 0) {
this.currentWeek = 7;
}
const str = this.formatDate(
this.currentYear,
this.currentMonth,
this.currentDay
); // --
this.days.length = 0;
// 76 i<= 35- this.currentWeek
/* eslint-disabled */
//
for (let i = this.currentWeek - 1; i >= 0; i -= 1) {
const d = new Date(str);
d.setDate(d.getDate() - i);
// console.log(y:" + d.getDate())
// console.log('d: ', d);
this.days.push(d);
}
//
for (let i = 1; i <= 7 - this.currentWeek; i += 1) {
const d = new Date(str);
d.setDate(d.getDate() + i);
this.days.push(d);
// console.log('d1: ', d);
}
},
//
weekPre() {
const d = this.days[0]; // 77
d.setDate(d.getDate() - 7);
this.initData(d);
},
//
weekNext() {
const d = this.days[6]; // 77
d.setDate(d.getDate() + 7);
this.initData(d);
},
//
pickPre(year, month) {
const d = new Date(this.formatDate(year, month, 1));
d.setDate(0);
this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1));
},
//
pickNext(year, month) {
const d = new Date(this.formatDate(year, month, 1));
d.setDate(35);
this.initData(this.formatDate(d.getFullYear(), d.getMonth() + 1, 1));
},
//
pick(date, index) {
this.newDate = moment(date).format("YYYY-MM-DD");
this.$emit("dateValue", this.newDate);
// console.log("index: ", index);
this.tabIndex = index;
// alert(
// this.formatDate(date.getFullYear(), date.getMonth() + 1, date.getDate())
// );
},
pickTime(time, index) {
// console.log('time: ', time);
let timeArr = [];
timeArr.push(_.split(time.time, "~"));
// console.log("timeArr: ", timeArr);
this.$emit("timeValue", _.join(timeArr), "");
// console.log("index: ", index);
this.tabTimeIndex = index;
// alert(
// this.formatDate(date.getFullYear(), date.getMonth() + 1, date.getDate())
// );
},
//
mouseoverHandle(index, weekInfoIndex, showMorngingAfterText) {
this.currentIndex = index
this.currentWeekIndex = weekInfoIndex
this.showMorningAfterText = showMorningAfterText
this.plusIsShow = true
},
//
mouseoutHandle() {
this.currentIndex = null
this.currentWeekIndex = null
this.showMorningAfterText = ''
this.plusIsShow = false
},
//
addPatientHandle() {
}
}
};
</script>
<style lang="scss" scoped>
.schedule-date {
font-size: 14px;
margin-top: 15px;
padding: 16px;
.date-head {
display: flex;
justify-content: space-between;
margin-bottom: 16px;
}
.date-content {
background: #f7f9fd;
padding: 10px 0;
.weeks {
display: flex;
padding-bottom: 10px;
border-bottom: 1px solid #e2ebf9;
color: #88939d;
.doctor-list-text {
display: flex;
justify-content: center;
align-items: center;
}
.date-day {
text-align: center;
margin-bottom: 10px;
}
.morning-after {
display: flex;
justify-content: space-around;
}
.date-item {
cursor: pointer;
padding: 5px 10px;
border-right: none;
list-style: none;
flex: 1;
text-align: center;
&:hover {
background: #dff0d8;
}
&:active {
background: #dff0d8;
}
}
}
.content {
border-bottom: 1px solid #e2ebf9;
padding: 16px 0;
display: flex;
align-items: center;
.doctorList {
text-align: center;
.list {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.list-img {
width: 64px;
height: 64px;
border-radius: 50%;
overflow: hidden;
img {
width: 64px;
height: 64px;
}
}
}
.surplu-num {
display: flex;
.morning {
margin-right: 6px;
}
.morning,
.after {
position: relative;
color: #88939d;
width: 45%;
height: 120px;
border-radius: 3px;
border-top: 2px solid #00bb61;
background: #fff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
cursor: pointer;
p:nth-child(2) {
font-size: 24px;
}
}
.morningAfterClass {
border-top: 2px solid #e1e1e1;
background: #fcfdfe;
}
.morning:hover,
.after:hover {
border-top: 2px solid #1b5bfb !important;
box-shadow: 0px 0px 16px rgba(8, 115, 215, 0.24);
}
.show-plus {
width: 100%;
height: 100%;
background: #fff;
position: absolute;
left: 0;
top: 0;
text-align: center;
font-size: 24px;
line-height: 120px;
}
}
}
}
.time-range {
display: flex;
justify-content: space-around;
align-items: center;
padding: 10px 0;
span {
cursor: pointer;
padding-bottom: 5px;
border-bottom: 3px solid #fff;
&:hover {
border-bottom: 3px solid rgb(151, 198, 245);
}
}
}
}
.today-item {
cursor: pointer;
line-height: 45px;
}
.selected {
box-sizing: border-box;
}
.item-wrapper {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.doctor-list-text,
.prev-btn,
.next-btn {
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
.fa-icon {
font-size: 18px;
}
}
</style>
<style lang="scss">
.schedule-date {
}
</style>
Loading…
Cancel
Save