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

Merge remote-tracking branch 'origin/master'

parents 860baa3d d959365d
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npm run lint
......@@ -119,12 +119,19 @@ export const constantRoutes = [
meta: { title: '设备管理', icon: 'date' }
},
{
path: 'equipment-detail',
path: 'equipment-detail/:id',
props: true,
component: () => import('@/views/equipment-management/equipment-management/equipment-detail'),
name: 'EquipmentDetail',
meta: { title: '设备详情' }
},
{
path: 'equipment-add',
props: true,
component: () => import('@/views/equipment-management/equipment-management/equipment-add'),
name: 'EquipmentAdd',
meta: { title: '设备新增' }
},
{
path: 'use-management',
props: true,
......@@ -164,6 +171,16 @@ export const constantRoutes = [
meta: {
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 = [
}
]
},
// 数据字典
{
path: '/system/dict-data',
component: Layout,
......
......@@ -47,17 +47,16 @@ color: #333333;"
<el-form-item label="状态" prop="articleStatus">
<div style="display: flex; ">
<div style="padding-right: 15px;">
<el-switch
v-model="form.articleStatus"
active-color="#13ce66"
active-value="0"
disabled
inactive-color="#ff4949"
inactive-value="1"
/>
<el-select v-model="form.articleStatus" disabled>
<el-option
v-for="({value, label}) in statusList"
:label="label"
:value="value"
/>
</el-select>
</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-if="form.articleStatus==='0'" style="padding-top: 1px;">已上架</div>-->
<!-- <div v-else-if="form.articleStatus==='1'" style="padding-top: 1px;">已下架</div>-->
</div>
</el-form-item>
<!-- 2-- 文章信息--文章内容 -->
......@@ -109,13 +108,18 @@ export default {
return {
// 图片访问
baseURL: process.env.VUE_APP_TEST_API,
// 状态下拉框
statusList: [{
label: '已上架',
value: '0'
}, {
label: '已下架',
value: '1'
}],
// 弹出层标题
title: '',
// 是否显示弹出层
open: false,
// 状态位
value: true,
// 表单参数
form: {},
// 表单校验
......
......@@ -39,16 +39,14 @@ color: #333333;"
<el-form-item label="状态" prop="articleStatus">
<div style="display: flex;">
<div style="padding-right: 15px;">
<el-switch
v-model="form.articleStatus"
active-color="#13ce66"
active-value="0"
inactive-color="#ff4949"
inactive-value="1"
/>
<el-select v-model="form.articleStatus">
<el-option
v-for="({value, label}) in statusList"
:label="label"
:value="value"
/>
</el-select>
</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>
</el-form-item>
<el-form-item label="文章内容" prop="articleContent">
......@@ -89,6 +87,14 @@ export default {
},
data() {
return {
// 状态下拉框
statusList: [{
label: '已上架',
value: '0'
}, {
label: '已下架',
value: '1'
}],
user: {},
isShow: true,
......@@ -96,8 +102,6 @@ export default {
title: '',
// 是否显示弹出层
open: false,
// 状态位
value: true,
// 表单参数
form: {},
// 表单校验
......
......@@ -34,16 +34,16 @@ color: #333333;"
<el-form-item label="状态" prop="articleStatus">
<div style="display: flex;">
<div style="padding-right: 15px;">
<el-switch
v-model="form.articleStatus"
active-color="#13ce66"
active-value="0"
inactive-color="#ff4949"
inactive-value="1"
/>
<el-select v-model="form.articleStatus">
<el-option
v-for="({value, label}) in statusList"
:label="label"
:value="value"
/>
</el-select>
</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-if="form.articleStatus==='0'" style="padding-top: 1px;">已上架</div>-->
<!-- <div v-else-if="form.articleStatus==='1'" style="padding-top: 1px;">已下架</div>-->
</div>
</el-form-item>
<el-form-item label="文章内容" prop="articleContent">
......@@ -84,6 +84,14 @@ export default {
},
data() {
return {
// 状态下拉框
statusList: [{
label: '已上架',
value: '0'
}, {
label: '已下架',
value: '1'
}],
// 弹出层标题
title: '',
// 是否显示弹出层
......
......@@ -111,7 +111,6 @@
border
row-key="id"
@selection-change="handleSelectionChange"
@select-all="selectAll($event, false)"
>
<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" />
......
......@@ -59,10 +59,10 @@
@change="handleSort"
>
<el-option
v-for="item in sortedList"
:key="item.id"
:label="item.sortedColumn"
:value="item"
v-for="index in sortedList"
:key="index.id"
:label="index.sortedColumn"
:value="index"
/>
</el-select>
</el-form-item>
......@@ -70,7 +70,7 @@
<el-row>
<el-col :span="12" style="padding-bottom: 20px;">
<el-button
v-hasPermi="['business:device:add']"
v-hasPermi="['system:device:add']"
class="fourWordsBtn"
icon="el-icon-plus"
@click="handleAdd"
......@@ -85,18 +85,18 @@
<el-button
icon="el-icon-top-right"
class="fourWordsBtn"
@click="reverseSelect(userList)"
@click="reverseSelect(deviceList)"
>反向选择
</el-button>
<el-button
v-hasPermi="['business:device:import']"
v-hasPermi="['system:device:import']"
class="fourWordsBtn"
icon="el-icon-bottom-left"
@click="handleImport"
>批量导入
</el-button>
<el-button
v-hasPermi="['business:device:export']"
v-hasPermi="['system:device:export']"
class="fourWordsBtn"
icon="el-icon-top-right"
@click="handleExport"
......@@ -128,13 +128,22 @@
</template>
</el-table-column>
<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">
<template slot-scope="scope">
<span>{{ scope.row.servicePrice || "-" }}</span>
</template>
</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">
<template slot-scope="scope">
......@@ -146,22 +155,23 @@
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
v-hasPermi="['system:person:edit']"
v-hasPermi="['system:device:edit']"
size="mini"
type="success"
icon="el-icon-document"
style="width: 50px; border-radius: 6px 6px 6px 6px;border: 1px solid rgb(123, 213, 102);"
plain
@click="detailsDevice(scope.row.deviceId)"
@click="detailsDevice(scope.row.id)"
>详情
</el-button>
<el-button
v-hasPermi="['system:device:edit']"
plain
size="mini"
type="success"
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);"
@click="editDevice(scope.row.deviceId)"
@click="editDevice(scope.row.id)"
>编辑
</el-button>
</template>
......@@ -322,12 +332,14 @@
<script>
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 { parseTime } from '@/utils/ruoyi'
export default {
name: 'EquipmentManagement',
dicts: ['device_status', 'device_type', 'exam_type'],
data() {
return {
// 支持检查类型
......@@ -398,6 +410,8 @@ export default {
citys: regionData,
// 遮罩层
loading: false,
// 用户类型
userType: '',
// 选中数组
ids: [],
// 非单个禁用
......@@ -443,9 +457,17 @@ export default {
serviceArea: [],
// 表单参数
form: {
useTime: [],
appointmentMethod: '',
serviceArea: ''
deviceName: '',
useTime: '',
// appointmentMethod: '',
serviceArea: '',
head: '',
phone: '',
deviceType: '',
reservationMethod: '',
status: '',
remark: ''
},
// 表单校验
rules: {
......@@ -519,6 +541,10 @@ export default {
}
})
},
// 日期格式化
replace(time) {
return parseTime(time, '{y}/{m}/{d}')
},
showStatus(date) {
if (date === null) {
return null
......@@ -530,26 +556,7 @@ export default {
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) {
this.sortedColumn = val.sortedColumn
......@@ -568,14 +575,20 @@ export default {
}
this.form.serviceArea = codeArray.join(';')
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = '用户导入'
this.upload.open = true
},
/** 查询设备列表 */
getList() {
this.loading = true
listDevice(this.queryParams).then(response => {
this.deviceList = response.rows
this.deviceList.forEach(item => {
this.$set(item, 'checkTypeArr', item.checkType.split(','))
})
console.log('this.deviceList', this.deviceList)
// this.deviceList.forEach(item => {
// this.$set(item, 'checkTypeArr', item.checkType.split(','))
// })
console.log('deviceList', this.deviceList)
this.total = response.total
this.loading = false
......@@ -645,11 +658,31 @@ export default {
this.single = selection.length !== 1
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() {
this.reset()
this.open = true
this.title = '添加设备'
this.$router.push({
name: 'EquipmentAdd'
})
},
/** 修改按钮操作 */
handleUpdate(row) {
......@@ -667,23 +700,51 @@ export default {
}
})
},
/** 提交按钮 */
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()
})
}
// 全部选择
selectAll() {
this.$refs.table.toggleAllSelection()
},
// 反向选择
reverseSelect(rows) {
rows.forEach(row => {
this.$refs.table.toggleRowSelection(row)
})
},
// /**
// * 全部选择
// * @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) {
console.log(row)
......@@ -699,7 +760,7 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
this.download('business/device/export', {
this.download('system/device/export', {
...this.queryParams
}, `device_${new Date().getTime()}.xlsx`)
}
......
This diff is collapsed.
......@@ -438,7 +438,7 @@ export default {
this.reset()
console.log('start to edit...')
this.$router.push({
name: 'medical-edit', params: { id: row.id }
name: 'MedicalEdit', params: { id: row.id }
})
}
}
......
......@@ -151,7 +151,6 @@
<script>
import { listManage, getManage, delManage, addManage, updateManage } from '@/api/business/manage'
export default {
name: 'MedicalRecordManagement',
dicts: ['exam_type'],
......
......@@ -114,7 +114,6 @@
</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