Commit dc1af00c authored by 盖献康's avatar 盖献康

Merge remote-tracking branch 'origin/master'

parents 860baa3d d959365d
#!/usr/bin/env sh #!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh" . "$(dirname -- "$0")/_/husky.sh"
npm run lint
...@@ -119,12 +119,19 @@ export const constantRoutes = [ ...@@ -119,12 +119,19 @@ export const constantRoutes = [
meta: { title: '设备管理', icon: 'date' } meta: { title: '设备管理', icon: 'date' }
}, },
{ {
path: 'equipment-detail', path: 'equipment-detail/:id',
props: true, props: true,
component: () => import('@/views/equipment-management/equipment-management/equipment-detail'), component: () => import('@/views/equipment-management/equipment-management/equipment-detail'),
name: 'EquipmentDetail', name: 'EquipmentDetail',
meta: { title: '设备详情' } meta: { title: '设备详情' }
}, },
{
path: 'equipment-add',
props: true,
component: () => import('@/views/equipment-management/equipment-management/equipment-add'),
name: 'EquipmentAdd',
meta: { title: '设备新增' }
},
{ {
path: 'use-management', path: 'use-management',
props: true, props: true,
...@@ -164,6 +171,16 @@ export const constantRoutes = [ ...@@ -164,6 +171,16 @@ export const constantRoutes = [
meta: { meta: {
title: '病历详情', icon: 'component' title: '病历详情', icon: 'component'
} }
},
// 病历编辑
{
path: 'medical-edit/:id',
component: () => import('@/views/medical-record-management/medical-edit'),
name: 'MedicalEdit',
props: true,
meta: {
title: '病历编辑', icon: 'component'
}
} }
] ]
}, },
...@@ -416,6 +433,7 @@ export const dynamicRoutes = [ ...@@ -416,6 +433,7 @@ export const dynamicRoutes = [
} }
] ]
}, },
// 数据字典
{ {
path: '/system/dict-data', path: '/system/dict-data',
component: Layout, component: Layout,
......
...@@ -47,17 +47,16 @@ color: #333333;" ...@@ -47,17 +47,16 @@ color: #333333;"
<el-form-item label="状态" prop="articleStatus"> <el-form-item label="状态" prop="articleStatus">
<div style="display: flex; "> <div style="display: flex; ">
<div style="padding-right: 15px;"> <div style="padding-right: 15px;">
<el-switch <el-select v-model="form.articleStatus" disabled>
v-model="form.articleStatus" <el-option
active-color="#13ce66" v-for="({value, label}) in statusList"
active-value="0" :label="label"
disabled :value="value"
inactive-color="#ff4949" />
inactive-value="1" </el-select>
/>
</div> </div>
<div v-if="form.articleStatus==='0'" style="padding-top: 1px;">已上架</div> <!-- <div v-if="form.articleStatus==='0'" style="padding-top: 1px;">已上架</div>-->
<div v-else-if="form.articleStatus==='1'" style="padding-top: 1px;">已下架</div> <!-- <div v-else-if="form.articleStatus==='1'" style="padding-top: 1px;">已下架</div>-->
</div> </div>
</el-form-item> </el-form-item>
<!-- 2-- 文章信息--文章内容 --> <!-- 2-- 文章信息--文章内容 -->
...@@ -109,13 +108,18 @@ export default { ...@@ -109,13 +108,18 @@ export default {
return { return {
// 图片访问 // 图片访问
baseURL: process.env.VUE_APP_TEST_API, baseURL: process.env.VUE_APP_TEST_API,
// 状态下拉框
statusList: [{
label: '已上架',
value: '0'
}, {
label: '已下架',
value: '1'
}],
// 弹出层标题 // 弹出层标题
title: '', title: '',
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 状态位
value: true,
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
......
...@@ -39,16 +39,14 @@ color: #333333;" ...@@ -39,16 +39,14 @@ color: #333333;"
<el-form-item label="状态" prop="articleStatus"> <el-form-item label="状态" prop="articleStatus">
<div style="display: flex;"> <div style="display: flex;">
<div style="padding-right: 15px;"> <div style="padding-right: 15px;">
<el-switch <el-select v-model="form.articleStatus">
v-model="form.articleStatus" <el-option
active-color="#13ce66" v-for="({value, label}) in statusList"
active-value="0" :label="label"
inactive-color="#ff4949" :value="value"
inactive-value="1" />
/> </el-select>
</div> </div>
<div v-if="form.articleStatus==='0'" style="padding-top: 1px;">已上架</div>
<div v-else-if="form.articleStatus==='1'" style="padding-top: 1px;">已下架</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="文章内容" prop="articleContent"> <el-form-item label="文章内容" prop="articleContent">
...@@ -89,6 +87,14 @@ export default { ...@@ -89,6 +87,14 @@ export default {
}, },
data() { data() {
return { return {
// 状态下拉框
statusList: [{
label: '已上架',
value: '0'
}, {
label: '已下架',
value: '1'
}],
user: {}, user: {},
isShow: true, isShow: true,
...@@ -96,8 +102,6 @@ export default { ...@@ -96,8 +102,6 @@ export default {
title: '', title: '',
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 状态位
value: true,
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
......
...@@ -34,16 +34,16 @@ color: #333333;" ...@@ -34,16 +34,16 @@ color: #333333;"
<el-form-item label="状态" prop="articleStatus"> <el-form-item label="状态" prop="articleStatus">
<div style="display: flex;"> <div style="display: flex;">
<div style="padding-right: 15px;"> <div style="padding-right: 15px;">
<el-switch <el-select v-model="form.articleStatus">
v-model="form.articleStatus" <el-option
active-color="#13ce66" v-for="({value, label}) in statusList"
active-value="0" :label="label"
inactive-color="#ff4949" :value="value"
inactive-value="1" />
/> </el-select>
</div> </div>
<div v-if="form.articleStatus==='0'" style="padding-top: 1px;">已上架</div> <!-- <div v-if="form.articleStatus==='0'" style="padding-top: 1px;">已上架</div>-->
<div v-else-if="form.articleStatus==='1'" style="padding-top: 1px;">已下架</div> <!-- <div v-else-if="form.articleStatus==='1'" style="padding-top: 1px;">已下架</div>-->
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="文章内容" prop="articleContent"> <el-form-item label="文章内容" prop="articleContent">
...@@ -84,6 +84,14 @@ export default { ...@@ -84,6 +84,14 @@ export default {
}, },
data() { data() {
return { return {
// 状态下拉框
statusList: [{
label: '已上架',
value: '0'
}, {
label: '已下架',
value: '1'
}],
// 弹出层标题 // 弹出层标题
title: '', title: '',
// 是否显示弹出层 // 是否显示弹出层
......
...@@ -111,7 +111,6 @@ ...@@ -111,7 +111,6 @@
border border
row-key="id" row-key="id"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
@select-all="selectAll($event, false)"
> >
<el-table-column align="center" reserve-selection type="selection" width="55" /> <el-table-column align="center" reserve-selection type="selection" width="55" />
<el-table-column align="center" label="序号" min-width="80" show-overflow-tooltip type="index" /> <el-table-column align="center" label="序号" min-width="80" show-overflow-tooltip type="index" />
......
...@@ -59,10 +59,10 @@ ...@@ -59,10 +59,10 @@
@change="handleSort" @change="handleSort"
> >
<el-option <el-option
v-for="item in sortedList" v-for="index in sortedList"
:key="item.id" :key="index.id"
:label="item.sortedColumn" :label="index.sortedColumn"
:value="item" :value="index"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<el-row> <el-row>
<el-col :span="12" style="padding-bottom: 20px;"> <el-col :span="12" style="padding-bottom: 20px;">
<el-button <el-button
v-hasPermi="['business:device:add']" v-hasPermi="['system:device:add']"
class="fourWordsBtn" class="fourWordsBtn"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleAdd" @click="handleAdd"
...@@ -85,18 +85,18 @@ ...@@ -85,18 +85,18 @@
<el-button <el-button
icon="el-icon-top-right" icon="el-icon-top-right"
class="fourWordsBtn" class="fourWordsBtn"
@click="reverseSelect(userList)" @click="reverseSelect(deviceList)"
>反向选择 >反向选择
</el-button> </el-button>
<el-button <el-button
v-hasPermi="['business:device:import']" v-hasPermi="['system:device:import']"
class="fourWordsBtn" class="fourWordsBtn"
icon="el-icon-bottom-left" icon="el-icon-bottom-left"
@click="handleImport" @click="handleImport"
>批量导入 >批量导入
</el-button> </el-button>
<el-button <el-button
v-hasPermi="['business:device:export']" v-hasPermi="['system:device:export']"
class="fourWordsBtn" class="fourWordsBtn"
icon="el-icon-top-right" icon="el-icon-top-right"
@click="handleExport" @click="handleExport"
...@@ -128,13 +128,22 @@ ...@@ -128,13 +128,22 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="服务地点" align="center" prop="reservationMethod" show-overflow-tooltip /> <el-table-column label="服务地点" align="center" prop="reservationMethod" show-overflow-tooltip />
<el-table-column v-if="userType=== '3'" label="服务价格" align="center" prop="servicePrice" /> <el-table-column v-if="userType=== '3'" label="服务价格" align="center" prop="orderPrice">
<template slot-scope="scope">
<span>{{ scope.row.orderPrice || "-" }}</span>
</template>
</el-table-column>
<el-table-column label="设备服务费" align="center" prop="servicePrice"> <el-table-column label="设备服务费" align="center" prop="servicePrice">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.servicePrice || "-" }}</span> <span>{{ scope.row.servicePrice || "-" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="creatTime" show-overflow-tooltip /> <el-table-column label="创建时间" align="center" prop="createTime" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ replace(scope.row.createTime) || '-' }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -146,22 +155,23 @@ ...@@ -146,22 +155,23 @@
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-hasPermi="['system:person:edit']" v-hasPermi="['system:device:edit']"
size="mini" size="mini"
type="success" type="success"
icon="el-icon-document" icon="el-icon-document"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(123, 213, 102);" style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(123, 213, 102);"
plain plain
@click="detailsDevice(scope.row.deviceId)" @click="detailsDevice(scope.row.id)"
>详情 >详情
</el-button> </el-button>
<el-button <el-button
v-hasPermi="['system:device:edit']"
plain plain
size="mini" size="mini"
type="success" type="success"
icon="el-icon-edit" icon="el-icon-edit"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(52, 144, 206);color: #3490CE;background: rgba(52,144,206,0.1);" style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(52, 144, 206);color: #3490CE;background: rgba(52,144,206,0.1);"
@click="editDevice(scope.row.deviceId)" @click="editDevice(scope.row.id)"
>编辑 >编辑
</el-button> </el-button>
</template> </template>
...@@ -322,12 +332,14 @@ ...@@ -322,12 +332,14 @@
<script> <script>
import { regionData, CodeToText } from 'element-china-area-data' import { regionData, CodeToText } from 'element-china-area-data'
import { listDevice, getDevice, delDevice, addDevice } from '@/api/business/device' import { listDevice, getDevice, delDevice } from '@/api/business/device'
import { getInfo } from '@/api/login' import { getInfo } from '@/api/login'
import { parseTime } from '@/utils/ruoyi'
export default { export default {
name: 'EquipmentManagement', name: 'EquipmentManagement',
dicts: ['device_status', 'device_type', 'exam_type'], dicts: ['device_status', 'device_type', 'exam_type'],
data() { data() {
return { return {
// 支持检查类型 // 支持检查类型
...@@ -398,6 +410,8 @@ export default { ...@@ -398,6 +410,8 @@ export default {
citys: regionData, citys: regionData,
// 遮罩层 // 遮罩层
loading: false, loading: false,
// 用户类型
userType: '',
// 选中数组 // 选中数组
ids: [], ids: [],
// 非单个禁用 // 非单个禁用
...@@ -443,9 +457,17 @@ export default { ...@@ -443,9 +457,17 @@ export default {
serviceArea: [], serviceArea: [],
// 表单参数 // 表单参数
form: { form: {
useTime: [], deviceName: '',
appointmentMethod: '', useTime: '',
serviceArea: '' // appointmentMethod: '',
serviceArea: '',
head: '',
phone: '',
deviceType: '',
reservationMethod: '',
status: '',
remark: ''
}, },
// 表单校验 // 表单校验
rules: { rules: {
...@@ -519,6 +541,10 @@ export default { ...@@ -519,6 +541,10 @@ export default {
} }
}) })
}, },
// 日期格式化
replace(time) {
return parseTime(time, '{y}/{m}/{d}')
},
showStatus(date) { showStatus(date) {
if (date === null) { if (date === null) {
return null return null
...@@ -530,26 +556,7 @@ export default { ...@@ -530,26 +556,7 @@ export default {
return '• 已报废' return '• 已报废'
} }
}, },
/** 跳转到编辑页*/
editDevice(id) {
this.$router.push({
name: 'EquipmentDetail',
params: {
id: id,
identify: '1'
}
})
},
/** 跳转到详情页*/
detailsDevice(id) {
this.$router.push({
name: 'EquipmentDetail',
params: {
id: id,
identify: '2'
}
})
},
// 选择排序规则 // 选择排序规则
handleSort(val) { handleSort(val) {
this.sortedColumn = val.sortedColumn this.sortedColumn = val.sortedColumn
...@@ -568,14 +575,20 @@ export default { ...@@ -568,14 +575,20 @@ export default {
} }
this.form.serviceArea = codeArray.join(';') this.form.serviceArea = codeArray.join(';')
}, },
/** 导入按钮操作 */
handleImport() {
this.upload.title = '用户导入'
this.upload.open = true
},
/** 查询设备列表 */ /** 查询设备列表 */
getList() { getList() {
this.loading = true this.loading = true
listDevice(this.queryParams).then(response => { listDevice(this.queryParams).then(response => {
this.deviceList = response.rows this.deviceList = response.rows
this.deviceList.forEach(item => { console.log('this.deviceList', this.deviceList)
this.$set(item, 'checkTypeArr', item.checkType.split(',')) // this.deviceList.forEach(item => {
}) // this.$set(item, 'checkTypeArr', item.checkType.split(','))
// })
console.log('deviceList', this.deviceList) console.log('deviceList', this.deviceList)
this.total = response.total this.total = response.total
this.loading = false this.loading = false
...@@ -645,11 +658,31 @@ export default { ...@@ -645,11 +658,31 @@ export default {
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 跳转到编辑页*/
editDevice(id) {
this.$router.push({
name: 'EquipmentDetail',
params: {
identify: '1',
id: id
}
})
},
/** 跳转到详情页*/
detailsDevice(id) {
this.$router.push({
name: 'EquipmentDetail',
params: {
identify: '2',
id: id
}
})
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset() this.$router.push({
this.open = true name: 'EquipmentAdd'
this.title = '添加设备' })
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
...@@ -667,23 +700,51 @@ export default { ...@@ -667,23 +700,51 @@ export default {
} }
}) })
}, },
/** 提交按钮 */ // 全部选择
submitForm() { selectAll() {
if (this.form.checkType != null && this.form.checkType !== '') { this.$refs.table.toggleAllSelection()
this.form.checkType = this.form.checkType.toString() },
} // 反向选择
this.form.useTime = JSON.stringify(this.useTime) reverseSelect(rows) {
this.$refs['form'].validate(valid => { rows.forEach(row => {
if (valid) { this.$refs.table.toggleRowSelection(row)
console.log(this.form)
addDevice(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}) })
}, },
// /**
// * 全部选择
// * @param selection 已选择内容
// * @param all 是否永远进行全选操作
// */
// async selectAll(selection = [], all = true) {
// if (this.veterinarianList.length !== selection.length && !all) {
// this.effectTableSelect([])
// } else {
// await this.changeTableSelect()
// }
// },
// // 反向选择
// reverseSelect(rows) {
// rows.forEach(row => {
// this.$refs.table.toggleRowSelection(row)
// })
// },
// /** 提交按钮 */
// submitForm() {
// if (this.form.checkType != null && this.form.checkType !== '') {
// this.form.checkType = this.form.checkType.toString()
// }
// this.form.useTime = JSON.stringify(this.useTime)
// this.$refs['form'].validate(valid => {
// if (valid) {
// console.log(this.form)
// addDevice(this.form).then(response => {
// this.$modal.msgSuccess('新增成功')
// this.open = false
// this.getList()
// })
// }
// })
// },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
console.log(row) console.log(row)
...@@ -699,7 +760,7 @@ export default { ...@@ -699,7 +760,7 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('business/device/export', { this.download('system/device/export', {
...this.queryParams ...this.queryParams
}, `device_${new Date().getTime()}.xlsx`) }, `device_${new Date().getTime()}.xlsx`)
} }
......
This diff is collapsed.
...@@ -438,7 +438,7 @@ export default { ...@@ -438,7 +438,7 @@ export default {
this.reset() this.reset()
console.log('start to edit...') console.log('start to edit...')
this.$router.push({ this.$router.push({
name: 'medical-edit', params: { id: row.id } name: 'MedicalEdit', params: { id: row.id }
}) })
} }
} }
......
...@@ -151,7 +151,6 @@ ...@@ -151,7 +151,6 @@
<script> <script>
import { listManage, getManage, delManage, addManage, updateManage } from '@/api/business/manage' import { listManage, getManage, delManage, addManage, updateManage } from '@/api/business/manage'
export default { export default {
name: 'MedicalRecordManagement', name: 'MedicalRecordManagement',
dicts: ['exam_type'], dicts: ['exam_type'],
......
...@@ -114,7 +114,6 @@ ...@@ -114,7 +114,6 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment