班组&能源基础
This commit is contained in:
@@ -108,20 +108,22 @@ export default {
|
||||
],
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
{
|
||||
type: 'cancel',
|
||||
btnName: '作废',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'status',
|
||||
value: '不可用'
|
||||
}
|
||||
]
|
||||
this.$auth.hasPermi('base:group-classes:cancel')
|
||||
? {
|
||||
type: 'cancel',
|
||||
btnName: '作废',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'status',
|
||||
value: '不可用'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
: undefined,
|
||||
this.$auth.hasPermi('base:group-classes:update')
|
||||
? {
|
||||
type: 'edit',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-form ref="form" :rules="rules" label-width="80px" :model="form">
|
||||
<el-form ref="form" :rules="rules" label-width="100px" :model="form">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班组名称" prop="name">
|
||||
@@ -14,13 +14,20 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班组人数" prop="num">
|
||||
<el-input-number v-model="form.num" :min="1" :max="99999999" style="width: 100%;"></el-input-number>
|
||||
<el-form-item label="班组组长" prop="leaderId">
|
||||
<el-select v-model="form.leaderId" placeholder="请选择" style="width: 100%;" @change="selectLeader">
|
||||
<el-option
|
||||
v-for="item in workerList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班组组长" prop="leaderName">
|
||||
<el-input v-model="form.leaderName"></el-input>
|
||||
<el-form-item label="手机号" prop="telephone">
|
||||
<el-input v-model="form.telephone" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -28,6 +35,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { getGroupTeam, updateGroupTeam, createGroupTeam, getCode } from '@/api/base/groupTeam'
|
||||
import { getWorkerList } from '@/api/base/worker'
|
||||
export default {
|
||||
name: 'groupTeamAdd',
|
||||
data() {
|
||||
@@ -36,23 +44,28 @@ export default {
|
||||
id: '',
|
||||
name: '',
|
||||
code: '',
|
||||
num: null,
|
||||
leaderName: ''
|
||||
leaderId: '',
|
||||
telephone: ''
|
||||
},
|
||||
isEdit: false, //是否是编辑
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入班组名称', trigger: 'blur' }]
|
||||
}
|
||||
name: [{ required: true, message: '请输入班组名称', trigger: 'blur' }],
|
||||
code: [{ required: true, message: '请输入班组编码', trigger: 'blur' }],
|
||||
leaderId: [{ required: true, message: '请选择组长', trigger: 'select' }]
|
||||
},
|
||||
workerList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.getWorkerList()
|
||||
if (id) {
|
||||
this.isEdit = true
|
||||
this.form.id = id
|
||||
getGroupTeam( id ).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.form = res.data
|
||||
this.selectLeader()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -63,6 +76,24 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取员工list
|
||||
getWorkerList() {
|
||||
getWorkerList().then(res => {
|
||||
this.workerList = res.data
|
||||
})
|
||||
},
|
||||
// 获取手机号
|
||||
selectLeader() {
|
||||
if (this.form.leaderId) {
|
||||
this.workerList.map(item => {
|
||||
if (item.id === this.form.leaderId) {
|
||||
this.form.telephone = item.telephone || ''
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.form.telephone = ''
|
||||
}
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
@@ -12,8 +12,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
state: false,
|
||||
payload: {}
|
||||
state: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -31,9 +30,16 @@ export default {
|
||||
}
|
||||
},
|
||||
changeHandler() {
|
||||
this.payload.id = this.injectData.id
|
||||
this.payload.enabled = this.state ? '1' : '0'
|
||||
this.$emit('emitData', this.payload)
|
||||
let params = {}
|
||||
let payload = {}
|
||||
params.name = 'state'
|
||||
payload.id = this.injectData.id
|
||||
payload.enabled = this.state ? '1' : '0'
|
||||
payload.code = this.injectData.code
|
||||
payload.name = this.injectData.name
|
||||
payload.leaderId = this.injectData.leaderId
|
||||
params.payload = payload
|
||||
this.$emit('emitData', params)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
298
src/views/group/base/groupTeam/components/workerEdit.vue
Normal file
298
src/views/group/base/groupTeam/components/workerEdit.vue
Normal file
@@ -0,0 +1,298 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-drawer :title="title" :visible.sync="visible" size="70%" @close='closeD'>
|
||||
<div class="box">
|
||||
<el-row class="topBox">
|
||||
<el-col :span="6">
|
||||
<p class="boldTitle">班组名称</p>
|
||||
<p class="lightText">{{ teamData.teamName }}</p>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<p class="boldTitle">班组长</p>
|
||||
<p class="lightText">{{ teamData.leaderName }}</p>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<p class="boldTitle">班组人数</p>
|
||||
<p class="lightText">{{ teamData.teamNum }}</p>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<p class="boldTitle">手机号</p>
|
||||
<p class="lightText">{{ teamData.leaderTelephone }}</p>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="bottomBox">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
v-if="visible"
|
||||
:formConfigs="formConfig"
|
||||
@headBtnClick="buttonClick"
|
||||
/>
|
||||
<base-table
|
||||
:page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize"
|
||||
:table-props="tableProps"
|
||||
:table-data="tableData"
|
||||
:max-height="tableH"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="100"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<!-- 新增编辑组员 -->
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="centervisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
>
|
||||
<worker-team-add ref="workerTeamAdd" @successSubmit="successSubmit" />
|
||||
</base-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'workerName',
|
||||
label: '人员姓名'
|
||||
},
|
||||
{
|
||||
prop: 'workerMajorName',
|
||||
label: '专业'
|
||||
},
|
||||
{
|
||||
prop: 'workerTelephone',
|
||||
label: '手机'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注'
|
||||
}
|
||||
]
|
||||
import { groupTeamPage, teamDetDelete } from '@/api/base/groupTeam'
|
||||
import { getWorker } from '@/api/base/worker'
|
||||
import WorkerTeamAdd from './workerTeamAdd.vue'
|
||||
export default {
|
||||
name: 'WorkerEdit',
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
title: '',
|
||||
formConfig: [],
|
||||
teamData: {
|
||||
teamName: '',
|
||||
leaderName: '',
|
||||
teamNum: '',
|
||||
leaderTelephone: '-',
|
||||
teamId: ''
|
||||
},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
teamId: '',
|
||||
workerName: ''
|
||||
},
|
||||
tableProps,
|
||||
tableData: [],
|
||||
tableBtn: [],
|
||||
tableH: this.tableHeight(320),
|
||||
total: 0,
|
||||
// 弹出层标题
|
||||
addOrEditTitle: "",
|
||||
// 是否显示弹出层
|
||||
centervisible: false
|
||||
}
|
||||
},
|
||||
components: { WorkerTeamAdd },
|
||||
created() {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(320)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
init(val) {
|
||||
this.visible = true
|
||||
this.teamData.teamName = val.payload.name
|
||||
this.teamData.leaderName = val.payload.leaderName
|
||||
this.teamData.teamNum = val.payload.num
|
||||
this.teamData.teamId = val.payload.teamId
|
||||
this.queryParams.teamId = val.payload.id
|
||||
getWorker({id:val.payload.leaderId}).then(res => {// 获取组长手机号
|
||||
this.teamData.leaderTelephone = res.data.telephone || '-'
|
||||
})
|
||||
this.getList()
|
||||
if (val.name === 'view') {
|
||||
this.title = '查看组员'
|
||||
this.tableBtn = []
|
||||
this.formConfig = [
|
||||
{
|
||||
type: 'input',
|
||||
label: '关键字',
|
||||
placeholder: '关键字',
|
||||
param: 'workerName'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary'
|
||||
}
|
||||
]
|
||||
}else{
|
||||
this.title = '编辑组员'
|
||||
this.tableBtn = [
|
||||
{
|
||||
type: 'edit',
|
||||
btnName: '编辑'
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
btnName: '删除'
|
||||
}
|
||||
]
|
||||
this.formConfig = [
|
||||
{
|
||||
type: 'input',
|
||||
label: '关键字',
|
||||
placeholder: '关键字',
|
||||
param: 'workerName'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary'
|
||||
},
|
||||
{
|
||||
type: 'separate'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
plain: true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
groupTeamPage({ ...this.queryParams }).then(res => {
|
||||
if (res.code === 0 && res.data.list.length > 0) {
|
||||
let arr = []
|
||||
res.data.list.map(item => {
|
||||
let obj = {}
|
||||
obj.workerName = item.worker.name
|
||||
obj.workerMajorName = item.worker.majorName
|
||||
obj.workerTelephone = item.worker.telephone
|
||||
obj.remark = item.remark
|
||||
obj.id = item.id
|
||||
arr.push(obj)
|
||||
})
|
||||
this.tableData = arr
|
||||
this.total = res.data.total
|
||||
} else {
|
||||
this.tableData = []
|
||||
this.total = 0
|
||||
}
|
||||
})
|
||||
},
|
||||
buttonClick(val) {
|
||||
console.log(val)
|
||||
if (val.btnName === 'search') {
|
||||
this.queryParams.workerName = val.workerName
|
||||
this.queryParams.pageNo = 1
|
||||
this.getList()
|
||||
}else if (val.btnName === 'add') {
|
||||
this.addNew()
|
||||
}
|
||||
},
|
||||
// 新增
|
||||
addNew() {
|
||||
this.addOrEditTitle = '新增'
|
||||
this.centervisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.workerTeamAdd.init({'teamId': this.queryParams.teamId, id: ''})
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.$refs.workerTeamAdd.formClear()
|
||||
this.centervisible = false
|
||||
this.addOrEditTitle = ''
|
||||
},
|
||||
handleConfirm() {
|
||||
this.$refs.workerTeamAdd.submitForm()
|
||||
},
|
||||
successSubmit() {
|
||||
this.handleCancel()
|
||||
this.getList()
|
||||
},
|
||||
handleClick(val) {
|
||||
switch (val.type) {
|
||||
case 'edit':
|
||||
this.addOrEditTitle = '编辑'
|
||||
this.centervisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.workerTeamAdd.init({'teamId': this.queryParams.teamId, id: val.data.id})
|
||||
})
|
||||
break
|
||||
default:
|
||||
this.handleDelete(val.data)
|
||||
}
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row)
|
||||
this.$modal.confirm('是否确认删除人员"' + row.workerName + '"的数据项?').then(function() {
|
||||
return teamDetDelete({id: row.id});
|
||||
}).then(() => {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
closeD() {
|
||||
this.$emit('closeDrawer')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.box {
|
||||
padding:0 30px;
|
||||
.topBox {
|
||||
padding-bottom: 30px;
|
||||
border-bottom: 1px solid #E9E9E9;
|
||||
.boldTitle {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: rgba(0,0,0,0.85);
|
||||
margin: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.lightText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: rgba(102,102,102,0.75);
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.bottomBox {
|
||||
padding-top: 30px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
41
src/views/group/base/groupTeam/components/workerOperate.vue
Normal file
41
src/views/group/base/groupTeam/components/workerOperate.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div class="workerOperate">
|
||||
<div class="operateBtn">
|
||||
<span class="view" v-if="this.$auth.hasPermi('base:group-team:view-worker')" @click="emitParams('view')">查看</span>
|
||||
<span class="edit" v-if="this.$auth.hasPermi('base:group-team:edit-worker')" @click="emitParams('edit')">编辑</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'WorkerOperate',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
emitParams(data) {
|
||||
let params = {}
|
||||
params.name = data
|
||||
params.payload = this.injectData
|
||||
this.$emit('emitData', params)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.workerOperate {
|
||||
.operateBtn{
|
||||
color: #0B58FF;
|
||||
.view {
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.edit {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
113
src/views/group/base/groupTeam/components/workerTeamAdd.vue
Normal file
113
src/views/group/base/groupTeam/components/workerTeamAdd.vue
Normal file
@@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<el-form ref="form" :rules="rules" label-width="100px" :model="form">
|
||||
<el-form-item label="员工" prop="workerId">
|
||||
<el-select v-model="form.workerId" placeholder="请选择" filterable style="width: 100%;" @change="selectWorker()">
|
||||
<el-option
|
||||
v-for="item in workerList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="专业" prop="majorName">
|
||||
<el-input v-model="form.majorName" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { getWorkerList } from '@/api/base/worker'
|
||||
import { teamDetCreate, teamDetUpdate, groupTeamDet } from '@/api/base/groupTeam'
|
||||
export default {
|
||||
name: 'WorkerTeamAdd',
|
||||
data() {
|
||||
return {
|
||||
workerList: [],
|
||||
form: {
|
||||
teamId: '',
|
||||
workerId: '',
|
||||
remark: '',
|
||||
majorName: '',
|
||||
id: ''
|
||||
},
|
||||
rules: {
|
||||
workerId: [{ required: true, message: '员工不能为空', trigger: 'change' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(param) {
|
||||
this.form.teamId = param.teamId
|
||||
getWorkerList().then(res => {
|
||||
this.workerList = res.data || []
|
||||
if (param.id) {
|
||||
this.isEdit = true
|
||||
this.form.id = param.id
|
||||
groupTeamDet({id: this.form.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.form.workerId = res.data.workerId
|
||||
this.selectWorker()
|
||||
this.form.remark = res.data.remark
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.isEdit = false
|
||||
this.form.id = ''
|
||||
}
|
||||
})
|
||||
},
|
||||
selectWorker() {
|
||||
if (this.form.workerId) {
|
||||
this.workerList.map(item => {
|
||||
if (item.id === this.form.workerId) {
|
||||
this.form.majorName = item.majorName
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.form.majorName = ''
|
||||
}
|
||||
},
|
||||
// 确定
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.isEdit) {
|
||||
// 编辑
|
||||
teamDetUpdate({
|
||||
teamId: this.form.teamId,
|
||||
workerId: this.form.workerId,
|
||||
remark: this.form.remark,
|
||||
id: this.form.id
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.$emit('successSubmit')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
teamDetCreate({
|
||||
teamId: this.form.teamId,
|
||||
workerId: this.form.workerId,
|
||||
remark: this.form.remark
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
this.$emit('successSubmit')
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
formClear() {
|
||||
this.$refs.form.resetFields()
|
||||
this.isEdit = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -41,14 +41,18 @@
|
||||
>
|
||||
<group-team-add ref="groupList" @successSubmit="successSubmit" />
|
||||
</base-dialog>
|
||||
<!-- 组员编辑 -->
|
||||
<worker-edit v-if='paramVisible' ref='workerEditParam' @closeDrawer="closeDrawer"></worker-edit>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getGroupTeamPage, deleteGroupTeam, updateGroupTeam } from "@/api/base/groupTeam";
|
||||
import { parseTime } from '@/utils/ruoyi'
|
||||
import GroupTeamAdd from './components/groupTeamAdd.vue'
|
||||
import GroupTeamAdd from './components/groupTeamAdd'
|
||||
import StatusBtn from './components/statusBtn.vue'
|
||||
import WorkerOperate from './components/workerOperate.vue'
|
||||
import WorkerEdit from './components/workerEdit.vue';
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
@@ -62,7 +66,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '班组编码',
|
||||
label: '编码',
|
||||
minWidth: 220
|
||||
},
|
||||
{
|
||||
@@ -71,17 +75,22 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'leaderName',
|
||||
label: '班组组长'
|
||||
label: '组长'
|
||||
},
|
||||
{
|
||||
prop: 'enabled',
|
||||
label: '班组状态',
|
||||
subcomponent: StatusBtn
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'workerName',
|
||||
label: '组员',
|
||||
subcomponent: WorkerOperate
|
||||
},
|
||||
]
|
||||
export default {
|
||||
name: "GroupTeam",
|
||||
components: { GroupTeamAdd },
|
||||
components: { GroupTeamAdd, WorkerEdit },
|
||||
data() {
|
||||
return {
|
||||
formConfig: [
|
||||
@@ -93,9 +102,9 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '班组编码',
|
||||
placeholder: '班组编码',
|
||||
param: 'code'
|
||||
label: '组长',
|
||||
placeholder: '组长',
|
||||
param: 'leaderName'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@@ -144,7 +153,8 @@ export default {
|
||||
pageSize: 20,
|
||||
name: null,
|
||||
code: null
|
||||
}
|
||||
},
|
||||
paramVisible: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -158,8 +168,8 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.queryParams.pageNo = 1;
|
||||
this.queryParams.leaderName = val.leaderName
|
||||
this.queryParams.name = val.name
|
||||
this.queryParams.code = val.code
|
||||
this.getList()
|
||||
break
|
||||
default:
|
||||
@@ -191,12 +201,20 @@ export default {
|
||||
}
|
||||
},
|
||||
// 班组状态
|
||||
handleTableEvents(data) {
|
||||
updateGroupTeam({ ...data }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
}
|
||||
})
|
||||
handleTableEvents(params) {
|
||||
console.log(params)
|
||||
if (params.name === 'state') {// 班组状态
|
||||
updateGroupTeam({ ...params.payload }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
}
|
||||
})
|
||||
}else {// 编辑&查看
|
||||
this.paramVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.workerEditParam.init(params)
|
||||
})
|
||||
}
|
||||
},
|
||||
handleCancel() {
|
||||
this.$refs.groupList.formClear()
|
||||
@@ -219,6 +237,9 @@ export default {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
closeDrawer() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user