|
|
|
@ -9,12 +9,14 @@ |
|
|
|
<div style="background-color: #fff; border-radius: 8px; padding: 15px"> |
|
|
|
<el-table |
|
|
|
:data="tableData" |
|
|
|
:height=" |
|
|
|
window.pageHeight < 600 ? 450 : window.pageHeight - 130 |
|
|
|
" |
|
|
|
:height="window.pageHeight < 600 ? 450 : window.pageHeight - 130" |
|
|
|
row-key="id" |
|
|
|
:key="tableKey" |
|
|
|
default-expand-all |
|
|
|
:tree-props="{children: 'treeChildren', hasChildren: 'hasChildren'}" |
|
|
|
:tree-props="{ |
|
|
|
children: 'treeChildren', |
|
|
|
hasChildren: 'hasChildren', |
|
|
|
}" |
|
|
|
highlight-current-row |
|
|
|
@row-click="treeclick" |
|
|
|
ref="tableData" |
|
|
|
@ -28,14 +30,25 @@ |
|
|
|
class="el-icon-document-remove" |
|
|
|
v-if="data.parentId == null" |
|
|
|
></i> --> |
|
|
|
<img style="width:20px;height:20px;vertical-align: sub;" src="@/assets/images/order.png" |
|
|
|
v-if="scope.row.parentId == null" /> |
|
|
|
<img |
|
|
|
style="width: 20px; height: 20px; vertical-align: sub" |
|
|
|
src="@/assets/images/order.png" |
|
|
|
v-if="scope.row.parentId == null" |
|
|
|
/> |
|
|
|
</span> |
|
|
|
<span :class="scope.row.parentId == null ? 'maxtitle' : 'mintitle'">{{ scope.row.displayName }}</span> |
|
|
|
<span |
|
|
|
:class=" |
|
|
|
scope.row.parentId == null ? 'maxtitle' : 'mintitle' |
|
|
|
" |
|
|
|
>{{ scope.row.displayName }}</span |
|
|
|
> |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="simpleCode" label="拼音简码"></el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="simpleCode" |
|
|
|
label="拼音简码" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column label="操作" width="" align="center"> |
|
|
|
<template> |
|
|
|
<el-tag |
|
|
|
@ -58,62 +71,148 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 按钮区域 --> |
|
|
|
<div style="margin-left: 10px;margin-top: 3%;position: absolute;top: 0;right: 0;"> |
|
|
|
<div |
|
|
|
style=" |
|
|
|
margin-left: 10px; |
|
|
|
margin-top: 3%; |
|
|
|
position: absolute; |
|
|
|
top: 0; |
|
|
|
right: 0; |
|
|
|
" |
|
|
|
> |
|
|
|
<!-- <el-button type="" @click="addll" class="commonbutton">新增</el-button> --> |
|
|
|
<div v-if="tableData.length == '0' ? true : false" style="margin-bottom: 10px"> |
|
|
|
<el-button type="" class="commonbutton" @click="append">新增项目类别</el-button> |
|
|
|
<div |
|
|
|
v-if="tableData.length == '0' ? true : false" |
|
|
|
style="margin-bottom: 10px" |
|
|
|
> |
|
|
|
<el-button type="" class="commonbutton" @click="append" |
|
|
|
>新增项目类别</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="" @click="addll" :disabled="isshow" class="commonbutton">新增同级</el-button> |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
@click="addll" |
|
|
|
:disabled="isshow" |
|
|
|
class="commonbutton" |
|
|
|
>新增同级</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" @click="append" :disabled="isshow" class="commonbutton">新增子级</el-button> |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
@click="append" |
|
|
|
:disabled="isshow" |
|
|
|
class="commonbutton" |
|
|
|
>新增子级</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" @click="rena" :disabled="isshow" class="commonbutton">编辑</el-button> |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
@click="rena" |
|
|
|
:disabled="isshow" |
|
|
|
class="commonbutton" |
|
|
|
>编辑</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="" @click="deleates" :disabled="isshow" class="deleteButton">删除</el-button> |
|
|
|
<el-button |
|
|
|
type="" |
|
|
|
@click="deleates" |
|
|
|
:disabled="isshow" |
|
|
|
class="deleteButton" |
|
|
|
>删除</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-dialog :title="title == 1 ? '新增' : '修改'" :visible.sync="dialogVisible" width="40%" :close-on-click-modal="false"> |
|
|
|
<el-dialog |
|
|
|
:title="title == 1 ? '新增' : '修改'" |
|
|
|
:visible.sync="dialogVisible" |
|
|
|
width="40%" |
|
|
|
:close-on-click-modal="false" |
|
|
|
> |
|
|
|
<span v-if="title == 2 ? true : false">上级部门</span> |
|
|
|
<el-cascader v-if="title == 2" ref="depref" @change="cascaderchang" :show-all-levels="false" |
|
|
|
v-model="departmentname" style="margin-left: 10px" :options="itemtypedata" :props="{ |
|
|
|
<el-cascader |
|
|
|
v-if="title == 2" |
|
|
|
ref="depref" |
|
|
|
@change="cascaderchang" |
|
|
|
:show-all-levels="false" |
|
|
|
v-model="departmentname" |
|
|
|
style="margin-left: 10px" |
|
|
|
:options="itemtypedata" |
|
|
|
:props="{ |
|
|
|
checkStrictly: true, |
|
|
|
children: 'treeChildren', |
|
|
|
label: 'displayName', |
|
|
|
value: 'id', |
|
|
|
}" clearable size="small"></el-cascader> |
|
|
|
}" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
></el-cascader> |
|
|
|
<el-form :model="form" label-width="80px" :rules="rules" ref="ruleForm"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="名称" prop="displayName"> |
|
|
|
<el-input v-model="form.displayName" ref="refinput" size="small"></el-input> |
|
|
|
<el-input |
|
|
|
v-model="form.displayName" |
|
|
|
ref="refinput" |
|
|
|
size="small" |
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="指引类别" prop="guidTypeId"> |
|
|
|
<el-select v-model="form.guidTypeId" placeholder="请选择" style="width: 100%" size="small"> |
|
|
|
<el-option v-for="item in guideoptions" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
<el-select |
|
|
|
v-model="form.guidTypeId" |
|
|
|
placeholder="请选择" |
|
|
|
style="width: 100%" |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in guideoptions" |
|
|
|
:key="item.id" |
|
|
|
:label="item.displayName" |
|
|
|
:value="item.id" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="检查类别" prop="checkTypeFlag"> |
|
|
|
<el-select v-model="form.checkTypeFlag" placeholder="请选择" style="width: 100%" size="small"> |
|
|
|
<el-option v-for="item in checkTypeFlag" :key="item.value" :label="item.label" :value="item.value"> |
|
|
|
<el-select |
|
|
|
v-model="form.checkTypeFlag" |
|
|
|
placeholder="请选择" |
|
|
|
style="width: 100%" |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in checkTypeFlag" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="体检报告" prop="medicalReportTypeId"> |
|
|
|
<el-select style="width: 100%" v-model="form.medicalReportTypeId" placeholder="请选择" size="small"> |
|
|
|
<el-option v-for="item in medicalReportType" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
<el-select |
|
|
|
style="width: 100%" |
|
|
|
v-model="form.medicalReportTypeId" |
|
|
|
placeholder="请选择" |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in medicalReportType" |
|
|
|
:key="item.id" |
|
|
|
:label="item.displayName" |
|
|
|
:value="item.id" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
@ -124,19 +223,35 @@ |
|
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> --> |
|
|
|
<el-checkbox v-model="form.isMergeAsbitem" true-label="Y" false-label="N" /> |
|
|
|
<el-checkbox |
|
|
|
v-model="form.isMergeAsbitem" |
|
|
|
true-label="Y" |
|
|
|
false-label="N" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="结果是否换行" prop="isWrap" label-width="100px"> |
|
|
|
<el-checkbox v-model="form.isWrap" true-label="Y" false-label="N" /> |
|
|
|
<el-form-item |
|
|
|
label="结果是否换行" |
|
|
|
prop="isWrap" |
|
|
|
label-width="100px" |
|
|
|
> |
|
|
|
<el-checkbox |
|
|
|
v-model="form.isWrap" |
|
|
|
true-label="Y" |
|
|
|
false-label="N" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="dialogVisible = false" class="difference">取 消</el-button> |
|
|
|
<el-button type="" @click="addoredit" class="commonbutton">确 定</el-button> |
|
|
|
<el-button @click="dialogVisible = false" class="difference" |
|
|
|
>取 消</el-button |
|
|
|
> |
|
|
|
<el-button type="" @click="addoredit" class="commonbutton" |
|
|
|
>确 定</el-button |
|
|
|
> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
@ -220,14 +335,14 @@ export default { |
|
|
|
tableHeight: window.innerHeight - 180, //表格动态高度 |
|
|
|
screenHeight: window.innerHeight, //内容区域高度 |
|
|
|
form: { |
|
|
|
id:'', |
|
|
|
id: "", |
|
|
|
displayName: "", |
|
|
|
parentId: "", |
|
|
|
isMergeAsbitem: "N", |
|
|
|
checkTypeFlag: "", |
|
|
|
guidTypeId: "", |
|
|
|
medicalReportTypeId: "", |
|
|
|
isWrap: 'N', // 是否换行 |
|
|
|
isWrap: "N", // 是否换行 |
|
|
|
lineModeFlagBox: false, // 是否换行box |
|
|
|
}, |
|
|
|
value: "", //指引类别选择的数据 |
|
|
|
@ -236,7 +351,8 @@ export default { |
|
|
|
row: {}, |
|
|
|
isshow: true, |
|
|
|
activeRows: [], |
|
|
|
message:true |
|
|
|
message: true, |
|
|
|
tableKey:'' |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
@ -249,42 +365,56 @@ export default { |
|
|
|
...mapState(["window"]), |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
cascaderchang(v) { |
|
|
|
this.departmentname = v[v.length - 1]; |
|
|
|
}, |
|
|
|
|
|
|
|
treeToTable (tree, arr = []){ |
|
|
|
treeToTable(tree, level, arr = []) { |
|
|
|
tree.map((item, index) => { |
|
|
|
this.$set(item, "level", level); |
|
|
|
arr.push(item); |
|
|
|
if (item.treeChildren && item.treeChildren != []) { |
|
|
|
arr.push(...this.treeToTable(item.treeChildren)); |
|
|
|
arr.push(...this.treeToTable(item.treeChildren, level + 1)); |
|
|
|
} |
|
|
|
}); |
|
|
|
// 返回结果 |
|
|
|
return arr; |
|
|
|
}, |
|
|
|
flatToTree(flatData, idProp, parentIdProp) { |
|
|
|
const treeData = [] |
|
|
|
const idMap = {} |
|
|
|
const treeData = []; |
|
|
|
const idMap = {}; |
|
|
|
|
|
|
|
// 将所有节点存储到 idMap 中,方便快速查找节点 |
|
|
|
for (const node of flatData) { |
|
|
|
idMap[node[idProp]] = node |
|
|
|
node.treeChildren = [] |
|
|
|
idMap[node[idProp]] = node; |
|
|
|
node.treeChildren = []; |
|
|
|
} |
|
|
|
|
|
|
|
// 遍历所有节点,将它们添加到树形结构中 |
|
|
|
for (const node of flatData) { |
|
|
|
const parent = idMap[node[parentIdProp]] |
|
|
|
const parent = idMap[node[parentIdProp]]; |
|
|
|
if (parent) { |
|
|
|
parent.treeChildren.push(node) |
|
|
|
parent.treeChildren.push(node); |
|
|
|
} else { |
|
|
|
treeData.push(node) |
|
|
|
treeData.push(node); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return treeData |
|
|
|
return treeData; |
|
|
|
}, |
|
|
|
screenData(tree,row,increase,arr = []){ |
|
|
|
if(increase){ |
|
|
|
arr.push(row) |
|
|
|
} |
|
|
|
tree.map((item,index)=>{ |
|
|
|
if(item.parentId===row.id){ |
|
|
|
arr.push(item) |
|
|
|
if(item.treeChildren && item.treeChildren != []){ |
|
|
|
arr.push(...this.screenData(item.treeChildren,item)); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
return arr; |
|
|
|
}, |
|
|
|
//初始化 |
|
|
|
rowDrop() { |
|
|
|
@ -298,37 +428,74 @@ flatToTree(flatData, idProp, parentIdProp) { |
|
|
|
// _this.activeRows = _this.treeToTable(_this.tableData) // 把树形的结构转为列表再进行拖拽 |
|
|
|
// }, |
|
|
|
onMove({ dragged, related }) { |
|
|
|
const oldRow = _this.activeRows[dragged.rowIndex] |
|
|
|
const newRow = _this.activeRows[related.rowIndex] |
|
|
|
if (oldRow.parentId !== newRow.parentId) { |
|
|
|
// if(dragged.rowIndex<related.rowIndex){ |
|
|
|
// if (_this.message) { |
|
|
|
// _this.$message.warning("不允许向下拖拽"); |
|
|
|
// _this.message = false; |
|
|
|
// } |
|
|
|
// return false; |
|
|
|
// } |
|
|
|
const oldRow = _this.activeRows[dragged.rowIndex]; |
|
|
|
const newRow = _this.activeRows[related.rowIndex]; |
|
|
|
if ( |
|
|
|
oldRow.level !== newRow.level || |
|
|
|
oldRow.parentId !== newRow.parentId |
|
|
|
) { |
|
|
|
if (_this.message) { |
|
|
|
_this.$message.warning("不允许跨父级拖拽") |
|
|
|
_this.message=false |
|
|
|
_this.$message.warning("不允许跨级拖拽"); |
|
|
|
_this.message = false; |
|
|
|
} |
|
|
|
return false |
|
|
|
return false; |
|
|
|
} |
|
|
|
}, |
|
|
|
// onChoose({oldIndex}){ |
|
|
|
onChoose({ oldIndex }) { |
|
|
|
// _this.$nextTick(() => { |
|
|
|
// _this.$refs['tableData'].setCurrentRow(_this.activeRows[oldIndex]); |
|
|
|
// _this.treeclick(_this.activeRows[oldIndex]) |
|
|
|
// }, |
|
|
|
// // _this.treeclick(_this.activeRows[oldIndex]) |
|
|
|
// }) |
|
|
|
}, |
|
|
|
onEnd({ newIndex, oldIndex }) { |
|
|
|
_this.message = true; |
|
|
|
const oldRow = _this.activeRows[oldIndex] // 移动的那个元素 |
|
|
|
const newRow = _this.activeRows[newIndex] // 新的元素 |
|
|
|
if (oldIndex === newIndex || oldRow.parentId !== newRow.parentId || oldRow.level != newRow.level) return |
|
|
|
if (oldIndex !== newIndex || oldRow.level === newRow.level || oldRow.parentId === newRow.parentId) { |
|
|
|
let oldRowSuffixData=_this.screenData(_this.activeRows,oldRow,true) |
|
|
|
let newRowSuffixData=_this.screenData(_this.activeRows,newRow,true) |
|
|
|
const targetRows = _this.activeRows.splice(oldIndex, oldRowSuffixData.length) |
|
|
|
if (oldIndex > newIndex) { |
|
|
|
_this.activeRows.splice(newIndex, 0, ...targetRows) |
|
|
|
} else if (oldIndex < newIndex) { |
|
|
|
_this.activeRows.splice(newIndex + newRowSuffixData.length - oldRowSuffixData.length, 0, ...targetRows) |
|
|
|
} |
|
|
|
let data = _this.flatToTree( |
|
|
|
_this.activeRows, |
|
|
|
"id", |
|
|
|
"parentId" |
|
|
|
); |
|
|
|
_this.$set(_this,'tableData',data) |
|
|
|
_this.isshow = false; |
|
|
|
_this.message=true |
|
|
|
const currRow = _this.activeRows.splice(oldIndex, 1)[0]; |
|
|
|
_this.activeRows.splice(newIndex, 0, currRow); |
|
|
|
_this.tableData=_this.flatToTree(_this.activeRows,'id','parentId') |
|
|
|
let beforeScrollTop = _this.$refs.tableData.$el.querySelector('div.el-table__body-wrapper').scrollTop |
|
|
|
_this.tableKey = new Date().getTime() |
|
|
|
_this.$nextTick(() => { |
|
|
|
_this.$refs['tableData'].setCurrentRow(_this.activeRows[newIndex]); |
|
|
|
_this.treeclick(_this.activeRows[newIndex]) |
|
|
|
}) |
|
|
|
}, |
|
|
|
_this.$refs.tableData.doLayout() |
|
|
|
_this.$refs["tableData"].setCurrentRow( |
|
|
|
oldRow |
|
|
|
); |
|
|
|
_this.treeclick(oldRow); |
|
|
|
setTimeout(() => { |
|
|
|
_this.$refs.tableData.$el.querySelector('div.el-table__body-wrapper').scrollTop = beforeScrollTop |
|
|
|
}, 0) |
|
|
|
_this.rowDrop() |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
}, |
|
|
|
//编辑弹框 |
|
|
|
rena() { |
|
|
|
let id = this.row.id |
|
|
|
let id = this.row.id; |
|
|
|
let a = this.row.parentId; |
|
|
|
this.departmentname = a; |
|
|
|
this.title = 2; |
|
|
|
@ -348,7 +515,7 @@ flatToTree(flatData, idProp, parentIdProp) { |
|
|
|
}); |
|
|
|
projecttype(id).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
objCopy(res.data,this.form) |
|
|
|
objCopy(res.data, this.form); |
|
|
|
} |
|
|
|
}); |
|
|
|
// getapi(`/api/app/item/in-item-type/${data.id}`).then((res) => { |
|
|
|
@ -366,26 +533,27 @@ flatToTree(flatData, idProp, parentIdProp) { |
|
|
|
}, |
|
|
|
// 删除 |
|
|
|
deleates() { |
|
|
|
let id = this.row.id |
|
|
|
let id = this.row.id; |
|
|
|
this.$confirm("是否删除, 是否继续?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
cancelButtonClass: "difference", |
|
|
|
confirmButtonClass: "commonbutton" |
|
|
|
}).then(() => { |
|
|
|
confirmButtonClass: "commonbutton", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
projecteditid(id).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.$message.success("删除成功"); |
|
|
|
this.row=this.$options.data().row |
|
|
|
this.row = this.$options.data().row; |
|
|
|
this.getlist(); |
|
|
|
this.isshow = true |
|
|
|
this.isshow = true; |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message("取消成功"); |
|
|
|
}) |
|
|
|
}); |
|
|
|
}, |
|
|
|
append() { |
|
|
|
// this.form = {}; |
|
|
|
@ -393,7 +561,7 @@ flatToTree(flatData, idProp, parentIdProp) { |
|
|
|
// this.form.parentId = data.id; |
|
|
|
// } |
|
|
|
// Object.assign(this.$data.form, this.$options.data().form); |
|
|
|
this.form=this.$options.data().form |
|
|
|
this.form = this.$options.data().form; |
|
|
|
this.form.parentId = this.row.id; |
|
|
|
this.dialogVisible = true; |
|
|
|
if (this.$refs.ruleForm !== undefined) { |
|
|
|
@ -418,8 +586,8 @@ flatToTree(flatData, idProp, parentIdProp) { |
|
|
|
// this.form = {}; |
|
|
|
// this.form.parentId = data.parentId; |
|
|
|
// Object.assign(this.$data.form, this.$options.data().form); |
|
|
|
this.form=this.$options.data().form |
|
|
|
this.form.parentId = this.row.parentId |
|
|
|
this.form = this.$options.data().form; |
|
|
|
this.form.parentId = this.row.parentId; |
|
|
|
this.dialogVisible = true; |
|
|
|
this.title = 1; |
|
|
|
if (this.$refs.ruleForm !== undefined) { |
|
|
|
@ -451,13 +619,13 @@ flatToTree(flatData, idProp, parentIdProp) { |
|
|
|
checkTypeFlag: this.form.checkTypeFlag, |
|
|
|
guidTypeId: this.form.guidTypeId, |
|
|
|
medicalReportTypeId: this.form.medicalReportTypeId, |
|
|
|
isWrap: this.form.isWrap |
|
|
|
isWrap: this.form.isWrap, |
|
|
|
}).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.$message.success("新增成功"); |
|
|
|
this.getlist(); |
|
|
|
this.dialogVisible = false; |
|
|
|
this.isshow = true |
|
|
|
this.isshow = true; |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
@ -468,13 +636,13 @@ flatToTree(flatData, idProp, parentIdProp) { |
|
|
|
checkTypeFlag: this.form.checkTypeFlag, |
|
|
|
guidTypeId: this.form.guidTypeId, |
|
|
|
medicalReportTypeId: this.form.medicalReportTypeId, |
|
|
|
isWrap: this.form.isWrap |
|
|
|
isWrap: this.form.isWrap, |
|
|
|
}).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.$message.success("新增成功"); |
|
|
|
this.getlist(); |
|
|
|
this.dialogVisible = false; |
|
|
|
this.isshow = true |
|
|
|
this.isshow = true; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
@ -488,13 +656,13 @@ flatToTree(flatData, idProp, parentIdProp) { |
|
|
|
checkTypeFlag: this.form.checkTypeFlag, |
|
|
|
guidTypeId: this.form.guidTypeId, |
|
|
|
medicalReportTypeId: this.form.medicalReportTypeId, |
|
|
|
isWrap: this.form.isWrap |
|
|
|
isWrap: this.form.isWrap, |
|
|
|
}).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.$message.success("修改成功"); |
|
|
|
this.getlist(); |
|
|
|
this.dialogVisible = false; |
|
|
|
this.isshow = true |
|
|
|
this.isshow = true; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
@ -503,14 +671,14 @@ flatToTree(flatData, idProp, parentIdProp) { |
|
|
|
}, |
|
|
|
// 点击获取每一列 |
|
|
|
treeclick(row) { |
|
|
|
this.row = {...row} |
|
|
|
this.isshow = false |
|
|
|
this.row = { ...row }; |
|
|
|
this.isshow = false; |
|
|
|
}, |
|
|
|
getlist() { |
|
|
|
projectlist(this.pages).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.tableData = [...res.data]; |
|
|
|
this.activeRows=this.treeToTable(this.tableData) |
|
|
|
this.activeRows = this.treeToTable(this.tableData, 1); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|