Commit 0464b366 authored by 李苏's avatar 李苏 💬

完善树接口

parent 1702f85e
<template>
<div style="display: flex;">
<div class="min_full" style="width: 200px;border-right: 0px;">
<TreeBase :app='app' @selected='selectedTree'></TreeBase>
<TreeBase :app='app' @selected='selectedTree' :dgtype='3' ></TreeBase>
</div>
<div class="min_full" style="width: calc(100% - 200px)">
<!-- 查询条件-->
......@@ -71,6 +71,9 @@
doDelete,
doExport
} from "@/api/dangerManagement/enterSafetyRecords.js"
import {
doQuerRoot
} from "@/api/dangerManagement/yhfl.js"
/* edit页面*/
import Edit from './edit'
import {
......@@ -97,7 +100,9 @@
treeTitle: '隐患分类',
treeDefaultProps: {
children: 'children',
label: 'bmmc'
label: 'name',
fatherId:'pid',
sonId:'id'
},
/* 表格标题对应参数*/
tableTitle: [
......@@ -133,7 +138,7 @@
},
methods: {
selectedTree(e){
this.queryParams.bmid=e.id||'root'
this.queryParams.pid=e.id||'root'
this.$refs['TablePager'].pageQuery()
},
tybz(a) {
......@@ -150,7 +155,7 @@
/* 删除操作*/
apiDelete: doDelete,
/* treeQuery */
apiTreeQuery: doQuery,
apiTreeQuery: doQuerRoot,
/* 初始化赋值操作*/
init() {
......
<template>
<div style="display: flex;">
<div class="min_full" style="width: 200px;border-right: 0px;">
<TreeBase :app='app' @selected='selectedTree'></TreeBase>
<TreeBase :app='app' @selected='selectedTree' :dgtype='3'></TreeBase>
</div>
<div class="min_full" style="width: calc(100% - 200px)">
<!-- 查询条件-->
......@@ -55,6 +55,9 @@
doDelete,
doExport
} from "@/api/dangerManagement/maintenanceDg.js"
import {
doQuerRoot
} from "@/api/dangerManagement/yhbzfl.js"
/* edit页面*/
import Edit from './edit'
import {
......@@ -80,7 +83,9 @@
treeTitle: '隐患检查标准分类',
treeDefaultProps: {
children: 'children',
label: 'bmmc'
label: 'name',
fatherId:'pid',
sonId:'id'
},
/* 表格标题对应参数*/
tableTitle: [
......@@ -100,7 +105,7 @@
},
methods: {
selectedTree(e){
this.queryParams.bmid=e.id||'root'
this.queryParams.pid=e.id||'root'
this.$refs['TablePager'].pageQuery()
},
/* 基础查询*/
......@@ -112,7 +117,7 @@
/* 删除操作*/
apiDelete: doDelete,
/* treeQuery */
apiTreeQuery: doQuery,
apiTreeQuery: doQuerRoot,
/* 初始化赋值操作*/
init() {
......
......@@ -89,6 +89,9 @@
doDelete,
doExport
} from "@/api/dangerManagement/enterSafetyRecords.js"
import {
QueryBm,
} from "common/src/api/system/dmgSystem.js";
/* edit页面*/
import Edit from './edit'
import {
......@@ -117,7 +120,7 @@
},
/* 树的标题 */
treeTitle: '隐患检查标准分类',
treeTitle: '单位列表',
treeDefaultProps: {
children: 'children',
label: 'bmmc'
......@@ -174,7 +177,7 @@
/* 删除操作*/
apiDelete: doDelete,
/* treeQuery */
apiTreeQuery: doQuery,
apiTreeQuery: QueryBm,
/* 初始化赋值操作*/
init() {
......
<template>
<div style="display: flex;">
<div class="min_full" style="width: 200px;border-right: 0px;">
<TreeBase :app='app' @selected='selectedTree'></TreeBase>
<TreeBase :app='app' @selected='selectedTree' :dgtype='3' ></TreeBase>
</div>
<div class="min_full" style="width: calc(100% - 200px)">
<!-- 查询条件-->
......@@ -72,6 +72,9 @@
doDelete,
doExport
} from "@/api/dangerManagement/enterSafetyRecords.js"
import {
doQuerRoot
} from "@/api/dangerManagement/yhbzfl.js"
/* edit页面*/
import Edit from './edit'
import {
......@@ -100,7 +103,9 @@
treeTitle: '隐患检查标准分类',
treeDefaultProps: {
children: 'children',
label: 'bmmc'
label: 'name',
fatherId:'pid',
sonId:'id'
},
/* 表格标题对应参数*/
/* 表格标题对应参数*/
......@@ -148,7 +153,7 @@
/* 删除操作*/
apiDelete: doDelete,
/* treeQuery */
apiTreeQuery: doQuery,
apiTreeQuery: doQuerRoot,
/* 初始化赋值操作*/
init() {
......
......@@ -11,8 +11,8 @@
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="父ID" ref="pid" prop="pid">
<el-input :readonly="readonly" v-model="form.pid" ></el-input>
<el-form-item label="上层分类" ref="pid" prop="pid">
<RelSelect :hasRool='true' style="width: 100%;" src='aqgl/yhgl/yhbzfl/query' :match="{value:'id',label:'name'}" v-model='form.pid' ></RelSelect>
</el-form-item>
</el-col>
</el-row>
......@@ -30,13 +30,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="系统版本" ref="sysversion" prop="sysversion">
<el-input :readonly="readonly" v-model="form.sysversion" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-row>
</el-form>
</RelDialog>
......@@ -92,14 +85,10 @@
},
/* form提交时的规则,具体规则参考官网*/
rules: {
roleid: [{
required: true,
trigger: 'blur'
}, ],
rolename: [{
required: true,
trigger: 'blur'
}, ]
pid: [
{ required: true, trigger: 'change' }
]
}
}
},
......@@ -112,5 +101,3 @@
<style scoped lang="scss">
</style>
......@@ -14,14 +14,10 @@
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<PrintButton :app='app'></PrintButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<AttachFileButton :app='app' ></AttachFileButton>
<FieldButton :app='app'></FieldButton>
<ExcelButton :app='app'></ExcelButton>
<!-- 额外按钮-->
<!-- 表头设置 -->
......@@ -29,9 +25,8 @@
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem' type='treeTable'
@getRow='getRow'>
</TablePager>
</div>
</div>
......@@ -61,6 +56,13 @@
},
data() {
return {
treeDefaultProps:{
fatherId : 'pid',
sonId : 'id',
rootId : 'root',
label : 'name',
rootName :'隐患检查标准分类'
},
/*需要的额外参数 */
showDialog: false,
DialogName: '',
......@@ -74,8 +76,8 @@
},
/* 表格标题对应参数*/
tableTitle: [
{label: "序号", prop: "xh", fieldType: "int"},
{label: "父ID", prop: "pid", fieldType: "ftString",width:192},
// {label: "序号", prop: "xh", fieldType: "int"},
// {label: "父ID", prop: "pid", fieldType: "ftString",width:192},
{label: "名称", prop: "name", fieldType: "ftString",width:300},
{label: "备注", prop: "bz", fieldType: "ftString",width:300},
{label: "维护人", prop: "whr", fieldType: "ftString"},
......@@ -111,4 +113,3 @@
<style scoped>
</style>
......@@ -11,22 +11,22 @@
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="名称" ref="name" prop="name">
<el-input :readonly="readonly" v-model="form.name" ></el-input>
<el-form-item label="上层分类" ref="pid" prop="pid">
<RelSelect :hasRool='true' style="width: 100%;" src='aqgl/yhgl/yhfl/query' :match="{value:'id',label:'name'}" v-model='form.pid' ></RelSelect>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz" ></el-input>
<el-form-item label="名称" ref="name" prop="name">
<el-input :readonly="readonly" v-model="form.name" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="系统版本" ref="sysversion" prop="sysversion">
<el-input :readonly="readonly" v-model="form.sysversion" ></el-input>
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz" ></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -84,19 +84,15 @@
},
/* form提交时的规则,具体规则参考官网*/
rules: {
roleid: [{
required: true,
trigger: 'blur'
}, ],
rolename: [{
required: true,
trigger: 'blur'
}, ]
pid: [
{ required: true, trigger: 'change' }
]
}
}
},
methods: {
}
}
</script>
......@@ -104,5 +100,3 @@
<style scoped lang="scss">
</style>
......@@ -14,14 +14,10 @@
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<PrintButton :app='app'></PrintButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<AttachFileButton :app='app' ></AttachFileButton>
<FieldButton :app='app'></FieldButton>
<ExcelButton :app='app'></ExcelButton>
<!-- 额外按钮-->
<!-- 表头设置 -->
......@@ -29,7 +25,7 @@
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem' type='treeTable'
@getRow='getRow'>
</TablePager>
......@@ -61,6 +57,13 @@
},
data() {
return {
treeDefaultProps:{
fatherId : 'pid',
sonId : 'id',
rootId : 'root',
label : 'name',
rootName :'隐患检查标准分类'
},
/*需要的额外参数 */
showDialog: false,
DialogName: '',
......@@ -74,7 +77,7 @@
},
/* 表格标题对应参数*/
tableTitle: [
{label: "序号", prop: "xh", fieldType: "int"},
// {label: "序号", prop: "xh", fieldType: "int"},
{label: "名称", prop: "name", fieldType: "ftString",width:300},
{label: "备注", prop: "bz", fieldType: "ftString",width:300},
{label: "维护人", prop: "whr", fieldType: "ftString"},
......@@ -110,4 +113,3 @@
<style scoped>
</style>
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