59 changed files with 1631 additions and 522 deletions
@ -1,75 +1,158 @@ |
|||
<template> |
|||
<el-card shadow="never" class="aui-card--fill"> |
|||
<div class="mod-job__schedule"> |
|||
<el-table :data="dataList" style="width: 100%;"> |
|||
<el-table-column prop="operaName" label="手术名称" /> |
|||
<el-table-column prop="bieMing" label="手术别名" /> |
|||
<el-table-column prop="operaId" label="手术ID" /> |
|||
<el-table-column prop="operation" label="操作" header-align="center" align="center" width="100px"> |
|||
<template slot-scope="scope"> |
|||
<span style="color: #1890ff; padding-right: 8px;cursor: pointer;" class="details" |
|||
@click="addOrUpdateHandle(scope.row.id,scope.row)">编辑</span> |
|||
<span style="color: #ff4d4f;cursor: pointer;" class="delete" @click="deleteHandle([scope.row.id])">删除</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-pagination background layout="total,prev,pager,next" :total="total" :current-page.sync="page" |
|||
@current-change="pageCurrentChangeHandle" /> |
|||
<!-- 弹窗, 新增 / 修改 --> |
|||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" |
|||
@addOrUpdateVisible="addOrUpdateVisible=false" /> |
|||
<div class="operaFs-management"> |
|||
<div class="operaFs-management-head"> |
|||
<el-form :inline="true" :model="dataForm"> |
|||
<el-form-item label="手术ID:" label-width="120px"> |
|||
<el-input v-model="dataForm.operationId" placeholder="请输入手术ID" size="small" clearable |
|||
@clear="getDataListInitial()" @keyup.enter.native="getDataListInitial('operationId')" /> |
|||
</el-form-item> |
|||
<el-form-item label="手术方式:" label-width="110px"> |
|||
<!-- <el-select v-model="dataForm.operaName" placeholder="请选择手术方式" size="small" clearable |
|||
@clear="getDataListInitial()" @change="getDataListInitial()"> |
|||
<el-option v-for="(item,index) in operaList" :key="index" :label="item.operaName" :value="item.operaName" /> |
|||
</el-select> --> |
|||
<el-input v-model="dataForm.operationName" placeholder="请输入手术名称" size="small" clearable |
|||
@clear="getDataListInitial()" @keyup.enter.native="getDataListInitial('operationName')" /> |
|||
</el-form-item> |
|||
<el-form-item class="button-form"> |
|||
<el-button type="primary" size="small" icon="el-icon-search" @click="getDataListInitial()">查询</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
</el-card> |
|||
<div class="operaFs-management-content"> |
|||
<head-template head-left="手术方式管理"> |
|||
<el-button type="primary" size="small" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> |
|||
</head-template> |
|||
<div class="mod-job__schedule"> |
|||
<el-table :data="dataList" style="width: 100%;"> |
|||
<el-table-column prop="sortIndex" label="排序" width="60" align="center" /> |
|||
<el-table-column prop="operationName" label="手术方式" /> |
|||
<el-table-column prop="bieMing" label="手术别名" width="200" /> |
|||
<el-table-column prop="operationId" label="手术ID" width="100" /> |
|||
<el-table-column prop="flag" :label="'开启状态'" width="100"> |
|||
<template slot-scope="scope"> |
|||
<!-- 1:启用,0:关闭 --> |
|||
<el-switch :value="scope.row.flag == 1 ? true : false" active-color="#13ce66" inactive-color="#ff4949" |
|||
@change="changeStatus(scope.row,scope.$index)" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="operation" label="操作" header-align="center" align="center" width="100px"> |
|||
<template slot-scope="scope"> |
|||
<span style="color: #1890ff; padding-right: 8px;cursor: pointer;" class="details" |
|||
@click="addOrUpdateHandle(scope.row.id,scope.row)">编辑</span> |
|||
<span style="color: #ff4d4f;cursor: pointer;" class="delete" @click="deleteHandle(scope.row.id)">删除</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-pagination background layout="total,prev,pager,next" :total="total" :current-page.sync="page" |
|||
@current-change="pageCurrentChangeHandle" /> |
|||
<!-- 弹窗, 新增 / 修改 --> |
|||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" |
|||
@addOrUpdateVisible="addOrUpdateVisible=false" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import tableAutoHeight from '@/mixins/tableAutoHeight' |
|||
import mixinViewModule from '@/mixins/view-module' |
|||
import AddOrUpdate from './operaAdd.vue' |
|||
import headTemplate from '@/components/head' |
|||
export default { |
|||
components: { |
|||
AddOrUpdate |
|||
AddOrUpdate, |
|||
headTemplate |
|||
}, |
|||
inject: ['refresh'], |
|||
mixins: [mixinViewModule, tableAutoHeight], |
|||
data() { |
|||
return { |
|||
mixinViewModuleOptions: { |
|||
getDataListURL: '/hz_quguang/sys/schedule/page', |
|||
getDataListURL: '/hz_quguang/dict/his/opera/page', |
|||
deleteURL: '/hz_quguang/dict/his/opera/delete', |
|||
getDataListIsPage: true |
|||
}, |
|||
dataForm: { |
|||
beanName: '' |
|||
operationId: '', |
|||
operationName: '', |
|||
|
|||
}, |
|||
operaList: [], |
|||
currentTableList: [], |
|||
logVisible: false |
|||
} |
|||
}, |
|||
created() { |
|||
this.getOperaList() |
|||
}, |
|||
methods: { |
|||
// 删除操作 |
|||
async deleteHandle(scopeRow) { |
|||
const idArr = scopeRow ? [scopeRow] : this.currentTableList.map(item => item.id) |
|||
this.$confirmFun('您确定要删除吗?').then(async () => { |
|||
const { data: res } = await this.$http({ |
|||
method: 'delete', |
|||
url: '/hz_quguang/sys/schedule', |
|||
data: idArr |
|||
}) |
|||
if (res.code === 0) { |
|||
this.$message.success('删除成功') |
|||
this.refresh() |
|||
} else { |
|||
this.$message.error(res.msg) |
|||
} |
|||
}) |
|||
// 获取手术列表 |
|||
async getOperaList() { |
|||
const { data: res } = await this.$http.get('/hz_quguang/opera/patient/getOperaList') |
|||
if (res.code === 0) { |
|||
this.operaList = res.data |
|||
} else { |
|||
this.$message.error(res.msg) |
|||
} |
|||
}, |
|||
// 日志列表 |
|||
logHandle() { |
|||
this.logVisible = true |
|||
this.$nextTick(() => { |
|||
this.$refs.log.init() |
|||
}) |
|||
// 状态是否开启 |
|||
async changeStatus(scopeRow, index) { |
|||
scopeRow.flag = scopeRow.flag == 1 ? 0 : 1 |
|||
const { data: res } = await this.$http.put('/hz_quguang/dict/his/opera', scopeRow) |
|||
if (res.code === 0) { |
|||
this.$message({ |
|||
message: this.dataList[index].flag == 1 ? '当前手术方式状态已开启' : '当前手术方式状态已关闭', |
|||
type: this.dataList[index].flag == 1 ? 'success' : 'warning' |
|||
}) |
|||
} else { |
|||
this.$message.error(res.msg) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.operaFs-management { |
|||
.operaFs-management-head { |
|||
background: #fff; |
|||
padding: 10px; |
|||
} |
|||
.operaFs-management-content { |
|||
margin-top: 10px; |
|||
background: #fff; |
|||
padding: 10px 16px; |
|||
.details, |
|||
.delete { |
|||
cursor: pointer; |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
<style lang="scss"> |
|||
.operaFs-management { |
|||
.operaFs-management-head { |
|||
.el-form { |
|||
display: flex; |
|||
} |
|||
.el-form-item { |
|||
display: flex; |
|||
flex: 1; |
|||
margin-bottom: 0; |
|||
} |
|||
.el-form-item__label { |
|||
width: 80px; |
|||
} |
|||
.el-form-item__content { |
|||
flex: 1; |
|||
} |
|||
.button-form { |
|||
width: 65 px; |
|||
flex: none; |
|||
} |
|||
} |
|||
.el-select { |
|||
width: 100%; |
|||
} |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,120 @@ |
|||
<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="name" :label="'宣教名称'"> |
|||
<el-input v-model="dataForm.name" :placeholder="'请填写宣教名称'" size="small" /> |
|||
</el-form-item> |
|||
<el-form-item prop="substance" :label="'宣教内容'" style="margin-top:20px;"> |
|||
<crf-editor ref="crf" v-model="dataForm.substance" :height="height" :is-p="true" /> |
|||
</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> |
|||
</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: { |
|||
name: '', |
|||
substance: '', |
|||
id: '' |
|||
}, |
|||
loading: null, |
|||
} |
|||
}, |
|||
computed: { |
|||
dataRule() { |
|||
return { |
|||
name: [ |
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
|||
] |
|||
} |
|||
} |
|||
}, |
|||
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(`/hz_quguang/article/${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.substance = Base64.decode(res.data.substance) |
|||
this.$refs['crf'].renderContent() |
|||
} |
|||
}).catch(() => { }) |
|||
}, |
|||
// 表单提交 |
|||
dataFormSubmitHandle: debounce(function () { |
|||
this.$refs.dataForm.validate((valid) => { |
|||
if (!valid) { |
|||
return false |
|||
} |
|||
this.$http[!this.dataForm.id ? 'post' : 'put']('/hz_quguang/article', { ...this.dataForm, substance: Base64.encode(this.dataForm.substance) }).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> |
@ -0,0 +1,100 @@ |
|||
<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="'宣教名称'" /> |
|||
<!-- 操作 --> |
|||
<el-table-column prop="operation" :label="$t('handle')" width="150"> |
|||
<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: '/hz_quguang/article/page', |
|||
getDataListIsPage: true, |
|||
deleteURL: '/hz_quguang/article' |
|||
}, |
|||
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> |
Loading…
Reference in new issue