Browse Source

解决冲突

360view
bianyaqi 2 years ago
parent
commit
e1313ef82d
  1. 234
      src/components/360View/afterPart/index.vue
  2. 291
      src/components/360View/forePart/index.vue
  3. 6
      src/components/360View/specialExamine/index.vue

234
src/components/360View/afterPart/index.vue

@ -5,95 +5,29 @@
<p style="margin-top: 5px" @click="moveAll(2)"><i class="el-icon-back" style="transform: rotateY(180deg)" /></p>
</div>
<div style="display: flex;margin-top: 32px">
<div style="width: 200px;padding-right: 8px;text-align: left;overflow-x: auto">
<div style="width: 200px;padding-right: 8px;text-align: left">
<p style="font-weight: bold;margin-bottom: 12px;text-align: left">描述项模板</p>
<el-button v-if="!treeCaseList.length" type="primary" size="small" @click="append(1)">+新增</el-button>
<el-tree
ref="tree"
:data="treeCaseList"
:props="treeProps"
:render-content="renderContent"
:default-expand-all="true"
:expand-on-click-node="false"
node-key="id"
highlight-current
@node-click="templateData"
>
<span slot-scope="{ node, data }" class="custom-tree-node">
<span style="display: inline-block;min-width: 80px">
<span>{{ node.label }}</span>
</span>
<span>
<el-button v-if="!data.treeId" icon="el-icon-plus" style="font-size: 12px;color: #409EFF" type="text" @click.stop="append(2, data)"></el-button>
<el-button icon="el-icon-delete" style="font-size: 12px;color: #F56C6C" type="text" @click.stop="remove(node, data)"></el-button>
</span>
</span>
</el-tree>
</div>
<el-table
id="foreCheck"
ref="multipleTable"
:data="tableData"
style="margin: 8px 8px 0 0"
@select="selection"
>
<el-table-column
type="selection"
width="55"
/>
<el-table-column
align="center"
label="OD"
>
<template slot-scope="scope">
<div>
<span v-if="scope.row.sort === 99">
<treeSelect v-model="scope.row.od" :options="scope.row.data" :props="treeProps" :multiple="true" :filterable="true" :check-strictly="true" :default-expand-all="true" @handleNode="handleNode(scope.$index,'od', $event)" @add="addTree(scope.row, $event)" @remove="removeTree" />
</span>
<span v-if="!scope.row.sort && !scope.row.id">{{ scope.row.name }}</span>
<span v-if="scope.row.sort === 3">
<span style="margin-right: 16px">视盘视神经</span><treeSelect v-model="scope.row.od" :props="treeProps" style="display: inline-block;width: 60%" :options="scope.row.data" :multiple="true" :filterable="true" :check-strictly="true" :default-expand-all="true" @handleNode="handleNode(scope.$index,'od', $event)" @add="addTree(scope.row, $event)" />
</span>
<span v-if="scope.row.sort === 4">
<span style="margin-right: 16px">视盘CDR</span><treeSelect v-model="scope.row.od" :props="treeProps" style="display: inline-block;width: 60%" :options="scope.row.data" :multiple="true" :filterable="true" :check-strictly="true" :default-expand-all="true" @handleNode="handleNode(scope.$index,'od', $event)" @add="addTree(scope.row, $event)" />
</span>
</div>
</template>
</el-table-column>
<el-table-column
class="move"
align="center"
width="120"
>
<template slot-scope="scope">
<div>
<p @click="moveHandle(scope.$index,1, scope.row)"><i class="el-icon-back" /></p>
<p style="margin-top: 5px" @click="moveHandle(scope.$index,2, scope.row)"><i class="el-icon-back" style="transform: rotateY(180deg)" /></p>
</div>
</template>
</el-table-column>
<el-table-column
align="center"
label="OS"
width="300"
>
<template slot-scope="scope">
<div>
<span v-if="scope.row.sort === 99">
<treeSelect v-model="scope.row.os" :options="scope.row.data" :props="treeProps" :multiple="true" :filterable="true" :check-strictly="true" :default-expand-all="true" @handleNode="handleNode(scope.$index,'os', $event)" @add="addTree(scope.row, $event)" />
</span>
<span v-if="!scope.row.sort && !scope.row.id">{{ scope.row.name }}</span>
<span v-if="scope.row.sort === 3">
<span style="margin-right: 16px">视盘视神经</span><treeSelect v-model="scope.row.os" :props="treeProps" style="display: inline-block;width: 60%" :options="scope.row.data" :multiple="true" :filterable="true" :check-strictly="true" :default-expand-all="true" @handleNode="handleNode(scope.$index,'os', $event)" @add="addTree(scope.row, $event)" />
</span>
<span v-if="scope.row.sort === 4">
<span style="margin-right: 16px">视盘CDR</span><treeSelect v-model="scope.row.os" :props="treeProps" style="display: inline-block;width: 60%" :options="scope.row.data" :multiple="true" :filterable="true" :check-strictly="true" :default-expand-all="true" @handleNode="handleNode(scope.$index,'os', $event)" @add="addTree(scope.row, $event)" />
</span>
</div>
</template>
</el-table-column>
</el-table>
<after-form
:table-data="tableData"
@handleNode="handleNode"
@addTree="addTree"
@moveHandle="moveHandle"
@handleSelectionChange="handleSelectionChange"
@removeTree="removeTree"
/>
</div>
<el-dialog :title="title" :visible.sync="dialogFormVisible" width="40%">
<el-dialog :title="title" :visible.sync="dialogFormVisible">
<el-form :model="form" style="margin-top: 16px">
<el-form-item label="名称:" label-width="120px">
<el-input v-model="form.name" auto-complete="off" style="width: 300px" />
@ -104,20 +38,18 @@
<el-button type="primary" @click="handSaveBtn"> </el-button>
</div>
</el-dialog>
<el-dialog title="新建模板" :visible.sync="templateFlag" width="40%">
<el-dialog title="保存模板" :visible.sync="templateFlag">
<el-form :model="form" style="margin-top: 16px">
<el-form-item label="名称:" label-width="120px">
<el-input v-model="form.name" auto-complete="off" style="width: 300px" />
</el-form-item>
<el-form-item label="目录:" label-width="120px">
<el-form-item label="选择节点:" label-width="120px">
<el-tree
ref="tree"
:data="treeTemplate"
:props="treeProps"
:default-expand-all="true"
:expand-on-click-node="false"
node-key="id"
highlight-current
@node-click="templateNodeClick"
/>
</el-form-item>
@ -136,9 +68,11 @@ import eventBus from '@/page-subspecialty/utils/eventBus'
import treeSelect from '@/components/360View/itemSelect'
import axios from 'axios'
import Cookies from 'js-cookie'
import AfterForm from '@/components/360View/medicalRecord/outPatientRecord/afterForm.vue'
const Base64 = require('js-base64').Base64
export default {
components: {
AfterForm,
treeSelect
},
mixins: [],
@ -150,10 +84,6 @@ export default {
patientId: {
type: String,
default: ''
},
isSearch: {
type: String,
default: ''
}
},
inject: ['refresh'],
@ -294,61 +224,32 @@ export default {
const { data: res } = await this.$http.get('/case/getCase', {
params: {
patientId: this.patientId,
platform: this.isSearch,
platform: 1,
flag: flag // 1234
}
})
if (res.code === 0) {
this.tableData = res.data ? JSON.parse(res.data.jsonText) : []
this.tableData.forEach(item => {
item.flag = false
})
// this.tableData = res.data ? JSON.parse(res.data.jsonText) : []
this.collectId = res.data ? res.data.id : ''
} else {
this.$message.error(res.msg)
}
},
//
selection(selection, val) {
if (!val.id) {
const data = this.tableData.filter(item => item.name === val.name)
if (val.flag) {
data.forEach(row => {
row.flag = false
this.$refs.multipleTable.toggleRowSelection(row, false);
})
} else {
data.forEach(row => {
row.flag = true
this.$refs.multipleTable.toggleRowSelection(row, true);
})
}
} else {
const data = this.tableData.filter(item => item.id === val.id)
if (val.flag) {
data.forEach(row => {
row.flag = false
});
} else {
data.forEach(row => {
row.flag = true
})
}
}
handleSelectionChange(val) {
this.multipleSelection = val
},
// label
handleNode(index, type, event) {
if (type === 'os') {
this.tableData[index].osValue = event
handleNode(val) {
if (val.type === 'os') {
this.tableData[val.index].osValue = val.event
} else {
this.tableData[index].odValue = event
this.tableData[val.index].odValue = val.event
}
},
//
addAfterData() {
const selectData = this.tableData.filter(item => item.flag === true)
if (!selectData.length) return this.$message.warning('请勾选数据!')
const data = selectData.filter(item => {
if (!this.multipleSelection.length) return this.$message.warning('请勾选数据!')
const data = this.multipleSelection.filter(item => {
return item.type !== undefined
})
eventBus.$emit('sendForData', data)
@ -414,47 +315,17 @@ export default {
}
},
//
moveHandle(index, type, row) {
if (row.id) {
if (type === 1) {
this.tableData[index].od = row.os
this.tableData[index].odValue = row.osValue
moveHandle(value) {
if (value.type === 1) {
this.tableData[value.index].od = value.row
} else {
this.tableData[index].os = row.od
this.tableData[index].osValue = row.odValue
this.tableData[value.index].os = value.row
}
const sort = this.tableData[index].sort
this.tableData[index].sort = ''
this.$nextTick(() => {
this.tableData[index].sort = sort
})
} else {
if (type === 1) {
this.tableData.forEach(item => {
if (item.name === row.name) {
item.od = item.os
item.odValue = item.osValue
const sort = item.sort
item.sort = ''
this.$nextTick(() => {
item.sort = sort
})
}
})
} else {
this.tableData.forEach(item => {
if (item.name === row.name) {
item.os = item.od
item.osValue = item.odValue
const sort = item.sort
item.sort = ''
this.$nextTick(() => {
item.sort = sort
})
}
})
}
}
},
//
async saveAfter() {
@ -463,7 +334,7 @@ export default {
jsonText: JSON.stringify(this.tableData),
name: '后段检查',
patientId: this.patientId,
platform: this.isSearch
platform: '1'
}
let url = ''
if (this.collectId) {
@ -488,13 +359,12 @@ export default {
}
},
//
addTree(item, event) {
addTree(value) {
this.title = '新增子级'
this.addType = 1
this.form.name = ''
this.type = event.type
this.parentId = event.id
this.treeFlag = event.flag
this.type = value.event.type
this.parentId = value.event.id
this.dialogFormVisible = true
},
// -
@ -505,7 +375,7 @@ export default {
flag: this.treeFlag, // 1,2
type: this.type,
parentId: this.parentId,
platform: this.isSearch
platform: 1
}
const { data: res } = await this.$http.post('/treetag/addTree', params)
if (res.code === 0) {
@ -566,7 +436,7 @@ export default {
params: {
doctorId: this.doctorId,
type: type,
platform: this.isSearch
platform: 1
}
}).then(res => {
if (res.data.code === 0) {
@ -584,13 +454,6 @@ export default {
if (data && data.caseJson) {
this.tableData = JSON.parse(data.caseJson)
//
this.$nextTick(() => {
this.tableData.forEach(item => {
if (item.flag) {
this.$refs.multipleTable.toggleRowSelection(item, true)
}
})
})
} else {
this.tableData = _.cloneDeep(this.sourceData)
}
@ -641,7 +504,7 @@ export default {
name: this.form.name,
weight: this.weight,
parentId: this.parentId,
platform: this.isSearch
platform: 1
}
const { data: res } = await this.$http.post('/treetemplate/addTree', params)
if (res.code === 0) {
@ -687,11 +550,26 @@ export default {
this.$message.error(res.msg)
}
},
//
renderContent(h, { node, data, store }) {
return (
<span style='flex: 1; display: flex; align-items: center; justify-content: space-between; font-size: 14px; padding-right: 8px;'>
<span>
<span>{node.label}</span>
</span>
<span>
<el-button icon='el-icon-plus' style='font-size: 12px;color: black' type='text' on-click={ () => this.append(2, data) }>
</el-button>
<el-button icon='el-icon-delete' style='font-size: 12px;color: black' type='text' on-click={ () => this.remove(node, data) }>
</el-button>
</span>
</span>)
},
//
async queryTemplate() {
const { data: res } = await this.$http.get('/treetemplate/findTree', {
params: {
platform: this.isSearch,
platform: 1,
doctorId: this.doctorId
}
})
@ -719,7 +597,7 @@ export default {
const { data: res } = await this.$http.get('/treetemplate/findTreeCase', {
params: {
type: 3, // 2 3
platform: this.isSearch,
platform: 1,
doctorId: this.doctorId
}
})
@ -754,9 +632,6 @@ export default {
top: 40px;
z-index: 9;
}
.custom-tree-node{
width: 100%;
}
}
</style>
<style lang="scss">
@ -764,8 +639,5 @@ export default {
.el-form-item__content{
text-align: left;
}
.el-tree-node>.el-tree-node__children{
overflow-x: auto;
}
}
</style>

291
src/components/360View/forePart/index.vue

@ -1,147 +1,38 @@
<template>
<div class="foreBox">
<!-- <div class="btnBox">-->
<!-- <el-button v-print="'#foreCheck'" size="small">打印</el-button>-->
<!-- <el-button type="primary" size="small" @click="saveFore('2', '前段检查')">保存</el-button>-->
<!-- <el-button type="primary" size="small" @click="handleTemplate">保存为模板</el-button>-->
<!-- <div size="small" style="display:inline-block;margin-left:10px;text-align:center;width: 32px;height: 32px;background-color: #1e79ff;border-radius: 4px;vertical-align: bottom" @click="addForeData">-->
<!-- <img :src="require('@/assets/img/data.png')" alt="" style="width: 17px;height: 16px;margin-top: 5px">-->
<!-- </div>-->
<!-- </div>-->
<div class="moveIcon">
<p @click="moveAll(1)"><i class="el-icon-back" /></p>
<p style="margin-top: 5px" @click="moveAll(2)"><i class="el-icon-back" style="transform: rotateY(180deg)" /></p>
</div>
<div style="display: flex;margin-top: 32px">
<div style="width: 200px;padding-right: 8px;text-align: left;overflow-x: auto">
<div style="width: 200px;padding-right: 8px;text-align: left">
<p style="font-weight: bold;margin-bottom: 12px;text-align: left">描述项模板</p>
<el-button v-if="!treeCaseList.length" type="primary" size="small" @click="append(1)">+新增</el-button>
<el-tree
ref="tree"
:data="treeCaseList"
:props="treeProps"
:render-content="renderContent"
:default-expand-all="true"
:expand-on-click-node="false"
node-key="id"
highlight-current
@node-click="templateData"
>
<span slot-scope="{ node, data }" class="custom-tree-node">
<span style="display: inline-block;min-width: 80px">
<span>{{ node.label }}</span>
</span>
<span>
<el-button v-if="!data.treeId" icon="el-icon-plus" style="font-size: 12px;color: #409EFF" type="text" @click.stop="append(2, data)"></el-button>
<el-button icon="el-icon-delete" style="font-size: 12px;color: #F56C6C" type="text" @click.stop="remove(node, data)"></el-button>
</span>
</span>
</el-tree>
</div>
<el-table
id="foreCheck"
ref="multipleTable"
:data="tableData"
style="margin: 8px 8px 0 0"
@select="selection"
>
<el-table-column
type="selection"
width="55"
/>
<el-table-column
align="center"
label="OD"
>
<template slot-scope="scope">
<div>
<span v-if="scope.row.sort === 1">
<span style="margin-right: 16px">结膜充血</span><treeSelect
v-model="scope.row.od"
:props="treeProps"
style="display: inline-block;width: 60%"
:options="scope.row.data"
:multiple="true"
:filterable="true"
:check-strictly="true"
:default-expand-all="true"
@handleNode="handleNode(scope.$index,'od', $event)"
@add="addTree(scope.row, $event)"
@remove="removeTree"
/>
</span>
<span v-if="scope.row.sort === 2">
<span style="margin-right: 16px">结膜分泌物</span><treeSelect
v-model="scope.row.od"
:props="treeProps"
style="display: inline-block;width: 60%"
:options="scope.row.data"
:multiple="true"
:filterable="true"
:check-strictly="true"
:default-expand-all="true"
@handleNode="handleNode(scope.$index,'od', $event)"
@add="addTree(scope.row, $event)"
@remove="removeTree"
/>
</span>
<span v-if="scope.row.sort === 99">
<treeSelect v-model="scope.row.od" :options="scope.row.data" :props="treeProps" :multiple="true" :filterable="true" :check-strictly="true" :default-expand-all="true" @handleNode="handleNode(scope.$index,'od', $event)" @add="addTree(scope.row, $event)" @remove="removeTree" />
</span>
<span v-if="!scope.row.sort && !scope.row.id">{{ scope.row.name }}</span>
</div>
</template>
</el-table-column>
<el-table-column
class="move"
align="center"
width="120"
>
<template slot-scope="scope">
<div>
<p @click="moveHandle(scope.$index,1, scope.row)"><i class="el-icon-back" /></p>
<p style="margin-top: 5px" @click="moveHandle(scope.$index,2, scope.row)"><i class="el-icon-back" style="transform: rotateY(180deg)" /></p>
</div>
</template>
</el-table-column>
<el-table-column
align="center"
label="OS"
width="300"
>
<template slot-scope="scope">
<div>
<span v-if="scope.row.sort === 1">
<span style="margin-right: 16px">结膜充血</span><treeSelect
v-model="scope.row.os"
:props="treeProps"
style="display: inline-block;width: 60%"
:options="scope.row.data"
:multiple="true"
:filterable="true"
:check-strictly="true"
:default-expand-all="true"
@handleNode="handleNode(scope.$index,'os', $event)"
@add="addTree(scope.row, $event)"
@remove="removeTree"
<fore-form
:table-data="tableData"
@handleSelectionChange="handleSelectionChange"
@addTree="addTree"
/>
</span>
<span v-if="scope.row.sort === 2">
<span style="margin-right: 16px">结膜分泌物</span><treeSelect
v-model="scope.row.os"
:props="treeProps"
style="display: inline-block;width: 60%"
:options="scope.row.data"
:multiple="true"
:filterable="true"
:check-strictly="true"
:default-expand-all="true"
@handleNode="handleNode(scope.$index,'os', $event)"
@add="addTree(scope.row, $event)"
@remove="removeTree"
/>
</span>
<span v-if="scope.row.sort === 99">
<treeSelect v-model="scope.row.os" :options="scope.row.data" :props="treeProps" :multiple="true" :filterable="true" :check-strictly="true" :default-expand-all="true" @handleNode="handleNode(scope.$index,'os', $event)" @add="addTree(scope.row, $event)" @remove="removeTree" />
</span>
<span v-if="!scope.row.sort && !scope.row.id">{{ scope.row.name }}</span>
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-dialog :title="title" :visible.sync="dialogFormVisible" width="40%">
<el-dialog :title="title" :visible.sync="dialogFormVisible">
<el-form :model="form" style="margin-top: 16px">
<el-form-item label="名称:" label-width="120px">
<el-input v-model="form.name" auto-complete="off" style="width: 300px" />
@ -152,20 +43,18 @@
<el-button type="primary" @click="handSaveBtn"> </el-button>
</div>
</el-dialog>
<el-dialog title="新建模板" :visible.sync="templateFlag" width="40%">
<el-dialog title="保存模板" :visible.sync="templateFlag">
<el-form :model="form" style="margin-top: 16px">
<el-form-item label="名称:" label-width="120px">
<el-input v-model="form.name" auto-complete="off" style="width: 300px" />
</el-form-item>
<el-form-item label="目录:" label-width="120px">
<el-form-item label="选择节点:" label-width="120px">
<el-tree
ref="tree"
:data="treeTemplate"
:props="treeProps"
:default-expand-all="true"
:expand-on-click-node="false"
node-key="id"
highlight-current
@node-click="templateNodeClick"
/>
</el-form-item>
@ -180,15 +69,15 @@
<script>
import _ from 'lodash'
import eventBus from '@/page-subspecialty/utils/eventBus'
import treeSelect from '@/components/360View/itemSelect'
// import treeSelect from '@/components/360View/itemSelect'
import axios from 'axios'
import Cookies from 'js-cookie'
import ForeForm from '@/components/360View/medicalRecord/outPatientRecord/foreForm.vue'
const Base64 = require('js-base64').Base64
export default {
components: {
ForeForm,
treeSelect
ForeForm
// treeSelect
},
mixins: [],
props: {
@ -199,10 +88,6 @@ export default {
patientId: {
type: String,
default: ''
},
isSearch: {
type: String,
default: ''
}
},
inject: ['refresh'],
@ -379,62 +264,25 @@ export default {
const { data: res } = await this.$http.get('/case/getCase', {
params: {
patientId: this.patientId,
platform: this.isSearch,
platform: 1,
flag: flag // 1234
}
})
if (res.code === 0) {
this.tableData = res.data ? JSON.parse(res.data.jsonText) : []
this.tableData.forEach(item => {
item.flag = false
})
console.log(123, this.tableData)
this.collectId = res.data ? res.data.id : ''
} else {
this.$message.error(res.msg)
}
},
//
selection(selection, val) {
if (!val.id) {
const data = this.tableData.filter(item => item.name === val.name)
if (val.flag) {
data.forEach(row => {
row.flag = false
this.$refs.multipleTable.toggleRowSelection(row, false)
})
} else {
data.forEach(row => {
row.flag = true
this.$refs.multipleTable.toggleRowSelection(row, true)
})
}
} else {
const data = this.tableData.filter(item => item.id === val.id)
if (val.flag) {
data.forEach(row => {
row.flag = false
})
} else {
data.forEach(row => {
row.flag = true
})
}
}
},
// label
handleNode(index, type, event) {
if (type === 'os') {
this.tableData[index].osValue = event
} else {
this.tableData[index].odValue = event
}
handleSelectionChange(val) {
this.multipleSelection = val
},
//
addForeData() {
const selectData = this.tableData.filter(item => item.flag === true)
if (!selectData.length) return this.$message.warning('请勾选数据!')
const data = selectData.filter(item => {
if (!this.multipleSelection.length) return this.$message.warning('请勾选数据!')
const data = this.multipleSelection.filter(item => {
return item.type !== undefined
})
eventBus.$emit('sendForData', data)
@ -449,6 +297,7 @@ export default {
}
})
Promise.all(treeList).then((result) => {
console.log(result)
if (result.length) {
result.forEach(item => {
item.forEach(row => {
@ -498,49 +347,6 @@ export default {
})
}
},
//
moveHandle(index, type, row) {
if (row.id) {
if (type === 1) {
this.tableData[index].od = row.os
this.tableData[index].odValue = row.osValue
} else {
this.tableData[index].os = row.od
this.tableData[index].osValue = row.odValue
}
const sort = this.tableData[index].sort
this.tableData[index].sort = ''
this.$nextTick(() => {
this.tableData[index].sort = sort
})
} else {
if (type === 1) {
this.tableData.forEach(item => {
if (item.name === row.name) {
item.od = item.os
item.odValue = item.osValue
const sort = item.sort
item.sort = ''
this.$nextTick(() => {
item.sort = sort
})
}
})
} else {
this.tableData.forEach(item => {
if (item.name === row.name) {
item.os = item.od
item.osValue = item.odValue
const sort = item.sort
item.sort = ''
this.$nextTick(() => {
item.sort = sort
})
}
})
}
}
},
//
async saveFore() {
const params = {
@ -548,7 +354,7 @@ export default {
jsonText: JSON.stringify(this.tableData),
name: '前段检查',
patientId: this.patientId,
platform: this.isSearch
platform: '1'
}
let url = ''
if (this.collectId) {
@ -573,13 +379,10 @@ export default {
}
},
//
addTree(item, event) {
addTree() {
this.title = '新增子级'
this.addType = 1
this.form.name = ''
this.type = event.type
this.parentId = event.id
this.treeFlag = event.flag
this.dialogFormVisible = true
},
// -
@ -590,7 +393,7 @@ export default {
flag: this.treeFlag, // // 1,2
type: this.type,
parentId: this.parentId,
platform: this.isSearch
platform: 1
}
const { data: res } = await this.$http.post('/treetag/addTree', params)
if (res.code === 0) {
@ -603,6 +406,7 @@ export default {
},
//
removeTree(item) {
console.log(123, item)
this.type = item.type
this.deleteId = item.id
this.$confirm('确定删除该节点?', '提示', {
@ -654,7 +458,7 @@ export default {
params: {
doctorId: this.doctorId,
type: type,
platform: this.isSearch
platform: 1
}
}).then(res => {
if (res.data.code === 0) {
@ -674,9 +478,7 @@ export default {
//
this.$nextTick(() => {
this.tableData.forEach(item => {
if (item.flag) {
this.$refs.multipleTable.toggleRowSelection(item, true)
}
})
})
} else {
@ -696,7 +498,7 @@ export default {
},
//
async saveTreeTemplete() {
if (!this.treeId) return this.$message.warning('请选择目录!')
if (!this.treeId) return this.$message.warning('请选择节点!')
const params = {
caseJson: JSON.stringify(this.tableData),
doctorId: this.doctorId,
@ -728,7 +530,7 @@ export default {
name: this.form.name,
weight: this.weight,
parentId: this.parentId,
platform: this.isSearch
platform: 1
}
const { data: res } = await this.$http.post('/treetemplate/addTree', params)
if (res.code === 0) {
@ -774,11 +576,26 @@ export default {
this.$message.error(res.msg)
}
},
//
renderContent(h, { node, data, store }) {
return (
<span style='flex: 1; display: flex; align-items: center; justify-content: space-between; font-size: 14px; padding-right: 8px;'>
<span>
<span>{node.label}</span>
</span>
<span>
<el-button icon='el-icon-plus' style='font-size: 12px;color: black' type='text' on-click={ () => this.append(2, data) }>
</el-button>
<el-button icon='el-icon-delete' style='font-size: 12px;color: black' type='text' on-click={ () => this.remove(node, data) }>
</el-button>
</span>
</span>)
},
//
async queryTemplate() {
const { data: res } = await this.$http.get('/treetemplate/findTree', {
params: {
platform: this.isSearch,
platform: 1,
doctorId: this.doctorId
}
})
@ -806,7 +623,7 @@ export default {
const { data: res } = await this.$http.get('/treetemplate/findTreeCase', {
params: {
type: 2,
platform: this.isSearch,
platform: 1,
doctorId: this.doctorId
}
})
@ -823,6 +640,8 @@ export default {
.foreBox{
width: 100%;
height: 100%;
//padding: 16px;
box-sizing: border-box;
overflow-y: auto;
position: relative;
.btnBox{
@ -839,9 +658,6 @@ export default {
top: 40px;
z-index: 9;
}
.custom-tree-node{
width: 100%;
}
}
</style>
<style lang="scss">
@ -849,8 +665,5 @@ export default {
.el-form-item__content{
text-align: left;
}
.el-tree-node>.el-tree-node__children{
overflow-x: auto;
}
}
</style>

6
src/components/360View/specialExamine/index.vue

@ -1,5 +1,5 @@
<template>
<!-- 专科检查-->
<!-- 专科检查-->
<div class="examineBox">
<div style="display: flex;margin-top: 32px">
<el-table
@ -251,12 +251,12 @@ export default {
const isDown = list[$index + 1]
list.splice($index + 1, 1)
list.splice($index, 0, isDown)
}
}
},
//
handleDel(index, list) {
list = list.splice(index, 1)
},
}
}
}
</script>

Loading…
Cancel
Save