|
@@ -35,11 +35,23 @@
|
|
<p class="page-inquire-common-style-button" @click="userHandleQueryLeft" style="width:60px;margin-right:10px;">搜索</p>
|
|
<p class="page-inquire-common-style-button" @click="userHandleQueryLeft" style="width:60px;margin-right:10px;">搜索</p>
|
|
<p class="page-reset-common-style-button" @click="userResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
|
|
<p class="page-reset-common-style-button" @click="userResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
|
|
</el-form>
|
|
</el-form>
|
|
- <el-table class="table-box" ref="leftUserTable" border :data="userTableListLeft" @selection-change="userChangeLeft" :row-key="getRowKeys">
|
|
|
|
|
|
+ <el-table border
|
|
|
|
+ class="table-box"
|
|
|
|
+ :data="userTableListLeft"
|
|
|
|
+ ref="leftUserTable"
|
|
|
|
+ :row-key="getRowKeys"
|
|
|
|
+ default-expand-all
|
|
|
|
+ :select-on-indeterminate="false"
|
|
|
|
+ @select="select"
|
|
|
|
+ @select-all="selectAll"
|
|
|
|
+ @selection-change="userChangeLeft"
|
|
|
|
+ :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
|
<el-table-column v-if="editType" type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
<el-table-column v-if="editType" type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
- <el-table-column label="序号" align="center" prop="userName" show-overflow-tooltip width="150"/>
|
|
|
|
- <el-table-column label="检查项目" align="center" prop="userNumber" show-overflow-tooltip />
|
|
|
|
|
|
+ <el-table-column label="序号" align="center" prop="code" show-overflow-tooltip width="150"/>
|
|
|
|
+ <el-table-column label="检查项目" align="center" prop="name" show-overflow-tooltip />
|
|
</el-table>
|
|
</el-table>
|
|
|
|
+
|
|
|
|
+
|
|
<pagination :page-sizes="[20, 30, 40, 50]"
|
|
<pagination :page-sizes="[20, 30, 40, 50]"
|
|
v-show="userTotalLeft>0"
|
|
v-show="userTotalLeft>0"
|
|
:total="userTotalLeft"
|
|
:total="userTotalLeft"
|
|
@@ -60,7 +72,7 @@
|
|
<div class="dept-table-max-box">
|
|
<div class="dept-table-max-box">
|
|
<el-form :model="userQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
|
|
<el-form :model="userQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
|
|
<el-form-item label="" prop="deptId">
|
|
<el-form-item label="" prop="deptId">
|
|
- <el-select v-model="userQueryParamsRight.deptId" clearable @change="userHandleQueryRight" placeholder="选择部门" style="width: 214px">
|
|
|
|
|
|
+ <el-select v-model="userQueryParamsRight.deptId" clearable @change="userHandleQueryRight" placeholder="一级检查项" style="width: 214px">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in deptSelectList"
|
|
v-for="item in deptSelectList"
|
|
:key="item.deptId"
|
|
:key="item.deptId"
|
|
@@ -82,10 +94,20 @@
|
|
<p class="page-inquire-common-style-button" @click="userHandleQueryRight" style="width:60px;margin-right:10px;">搜索</p>
|
|
<p class="page-inquire-common-style-button" @click="userHandleQueryRight" style="width:60px;margin-right:10px;">搜索</p>
|
|
<p class="page-reset-common-style-button" @click="userResetQueryRight" style="width:60px;margin-right:0;">重置</p>
|
|
<p class="page-reset-common-style-button" @click="userResetQueryRight" style="width:60px;margin-right:0;">重置</p>
|
|
</el-form>
|
|
</el-form>
|
|
- <el-table class="table-box" ref="rightUserTable" border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
|
|
|
|
|
|
+ <el-table border
|
|
|
|
+ class="table-box"
|
|
|
|
+ :data="userTableListRight"
|
|
|
|
+ ref="rightUserTable"
|
|
|
|
+ :row-key="getRowKeys"
|
|
|
|
+ default-expand-all
|
|
|
|
+ :select-on-indeterminate="false"
|
|
|
|
+ @select="select"
|
|
|
|
+ @select-all="selectAll"
|
|
|
|
+ @selection-change="userChangeRight"
|
|
|
|
+ :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
|
<el-table-column v-if="editType" type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
<el-table-column v-if="editType" type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
- <el-table-column label="序号" align="center" prop="userName" show-overflow-tooltip width="150"/>
|
|
|
|
- <el-table-column label="检查项目" align="center" prop="userNumber" show-overflow-tooltip />
|
|
|
|
|
|
+ <el-table-column label="序号" align="center" prop="code" show-overflow-tooltip width="150"/>
|
|
|
|
+ <el-table-column label="检查项目" align="center" prop="name" show-overflow-tooltip />
|
|
</el-table>
|
|
</el-table>
|
|
<pagination :page-sizes="[20, 30, 40, 50]"
|
|
<pagination :page-sizes="[20, 30, 40, 50]"
|
|
v-show="userTotalRight>0"
|
|
v-show="userTotalRight>0"
|
|
@@ -183,6 +205,59 @@
|
|
addUserButton(){
|
|
addUserButton(){
|
|
this.$parent.tableButton(5)
|
|
this.$parent.tableButton(5)
|
|
},
|
|
},
|
|
|
|
+ /**- 选择框 -**/
|
|
|
|
+ // 单选
|
|
|
|
+ select (selection, row) {
|
|
|
|
+ if (selection.some(el => { return row.id === el.id })) {
|
|
|
|
+ if (row.children) {
|
|
|
|
+ this.setChildren(row.children, true)
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (row.children) {
|
|
|
|
+ this.setChildren(row.children, false)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 全选
|
|
|
|
+ selectAll (selection) {
|
|
|
|
+ const isSelect = selection.some(el => {
|
|
|
|
+ const tableDataIds = this.tableData.map(j => j.id)
|
|
|
|
+ return tableDataIds.includes(el.id)
|
|
|
|
+ })
|
|
|
|
+ const isCancel = !this.tableData.every(el => {
|
|
|
|
+ const selectIds = selection.map(j => j.id)
|
|
|
|
+ return selectIds.includes(el.id)
|
|
|
|
+ })
|
|
|
|
+ if (isSelect) {
|
|
|
|
+ selection.map(el => {
|
|
|
|
+ if (el.children) {
|
|
|
|
+ this.setChildren(el.children, true)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if (isCancel) {
|
|
|
|
+ this.tableData.map(el => {
|
|
|
|
+ if (el.children) {
|
|
|
|
+ this.setChildren(el.children, false)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ setChildren (children, type) {
|
|
|
|
+ children.map(j => {
|
|
|
|
+ this.toggleSelection(j, type)
|
|
|
|
+ if (j.children) {
|
|
|
|
+ this.setChildren(j.children, type)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ toggleSelection (row, select) {
|
|
|
|
+ if (row) {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs.multipleTable && this.$refs.multipleTable.toggleRowSelection(row, select)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
/*===================================人员选择相关===================================*/
|
|
/*===================================人员选择相关===================================*/
|
|
//查询
|
|
//查询
|
|
userHandleQueryLeft(){
|
|
userHandleQueryLeft(){
|