【修改】修改表格数据
This commit is contained in:
@@ -1,99 +1,104 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="调整处理人" :visible.sync="dialogVisible" width="500px">
|
||||
<div class="label-input-form addModel">
|
||||
<el-form ref="form" :model="form" label-width="120px" :rules="rules" class="formData">
|
||||
<el-form-item label="选择人员" prop="assignee" class="el-form-item">
|
||||
<el-select v-model="form.assignee" class="icon-auth" collapse-tags
|
||||
placeholder="请选择">
|
||||
<template v-for="item in userList">
|
||||
<el-option :label="item.USNAME" :value="item.USID" :key="item.USID"></el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<div>
|
||||
<el-dialog title="调整处理人" :visible.sync="dialogVisible" width="500px">
|
||||
<div class="label-input-form addModel">
|
||||
<el-form ref="form" :model="form" label-width="120px" :rules="rules" class="formData">
|
||||
<el-form-item label="选择人员" prop="assignee" class="el-form-item">
|
||||
<el-select v-model="form.assignee" class="icon-auth" collapse-tags
|
||||
placeholder="请选择">
|
||||
<template v-for="item in userList">
|
||||
<el-option :label="item.USNAME" :value="item.USID" :key="item.USID"></el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false" class="btn">取 消</el-button>
|
||||
<el-button type="primary" @click="submit" class="btn">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'modal',
|
||||
data() {
|
||||
return {
|
||||
userList: [],
|
||||
dialogVisible: false,
|
||||
form: {
|
||||
assignee:''
|
||||
},
|
||||
rules: {
|
||||
assignee: [
|
||||
{
|
||||
required: 'true',
|
||||
trigger: 'change',
|
||||
message: '请选择调整处理人'
|
||||
}
|
||||
]
|
||||
},
|
||||
taskId:'',
|
||||
pId:''
|
||||
};
|
||||
},
|
||||
name: 'modal',
|
||||
data() {
|
||||
return {
|
||||
userList: [],
|
||||
dialogVisible: false,
|
||||
form: {
|
||||
assignee: ''
|
||||
},
|
||||
rules: {
|
||||
assignee: [
|
||||
{
|
||||
required: 'true',
|
||||
trigger: 'change',
|
||||
message: '请选择调整处理人'
|
||||
}
|
||||
]
|
||||
},
|
||||
taskId: '',
|
||||
pId: ''
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.sysUserList()
|
||||
mounted() {
|
||||
this.sysUserList()
|
||||
},
|
||||
methods: {
|
||||
changeSelect(val) {
|
||||
this.checked = (val.length || this.reportF.reportUserIdList.length) === this.userList.length;
|
||||
// this.$emit('update:updateMultipleSelect',this.reportF.reportUserIdList);
|
||||
},
|
||||
methods: {
|
||||
changeSelect(val) {
|
||||
this.checked = (val.length || this.reportF.reportUserIdList.length) === this.userList.length;
|
||||
// this.$emit('update:updateMultipleSelect',this.reportF.reportUserIdList);
|
||||
},
|
||||
// 获取所有用户
|
||||
sysUserList() {
|
||||
this.$api.user.sysUserList({ pageNo: 1, pageSize: 999999 }).then(({ data }) => {
|
||||
this.userList = data.records;
|
||||
})
|
||||
},
|
||||
open(taskId,pId) {
|
||||
this.taskId=taskId
|
||||
this.pId=pId
|
||||
this.form.name={
|
||||
assignee:''
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
submit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
let userId=this.form.assignee
|
||||
let assignee=this.$store.getters.userInfo.usid
|
||||
this.$api.process.changeAssignee({
|
||||
taskId:this.taskId.join(','),
|
||||
assignee:assignee,
|
||||
userId: userId,
|
||||
pId:this.pId
|
||||
})
|
||||
.then(res=>{
|
||||
//转办完应该跳到哪个页面?
|
||||
//转办完这个人还能看到这个监控流程吗
|
||||
this.dialogVisible = false
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
// 获取所有用户
|
||||
sysUserList() {
|
||||
this.$api.user.sysUserList({pageNo: 1, pageSize: 999999}).then(({data}) => {
|
||||
this.userList = data.records;
|
||||
})
|
||||
},
|
||||
open(taskId, pId,assigneeId) {
|
||||
this.taskId = taskId
|
||||
this.pId = pId
|
||||
this.form.name = {
|
||||
assignee: ''
|
||||
}
|
||||
this.assigneeId=assigneeId
|
||||
this.dialogVisible = true
|
||||
},
|
||||
submit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
let userId = this.form.assignee
|
||||
let assignee = this.assigneeId
|
||||
if (userId == assignee) {
|
||||
this.$message.warning("当前任务受理人就是您选择的")
|
||||
} else {
|
||||
this.$api.process.changeAssignee({
|
||||
taskId: this.taskId.join(','),
|
||||
assignee: assignee,
|
||||
userId: userId,
|
||||
pId: this.pId
|
||||
})
|
||||
.then(res => {
|
||||
//转办完应该跳到哪个页面?
|
||||
//转办完这个人还能看到这个监控流程吗
|
||||
this.dialogVisible = false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dialog-footer{
|
||||
margin: 20px 20px ;
|
||||
.dialog-footer {
|
||||
margin: 20px 20px;
|
||||
|
||||
.el-button {
|
||||
width: 80px;
|
||||
height: 36px;
|
||||
@@ -101,14 +106,17 @@ export default {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
::v-deep .el-dialog__footer{
|
||||
|
||||
::v-deep .el-dialog__footer {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.addModel{
|
||||
|
||||
.addModel {
|
||||
padding: 20px;
|
||||
}
|
||||
.el-form-item{
|
||||
::v-deep .el-select{
|
||||
|
||||
.el-form-item {
|
||||
::v-deep .el-select {
|
||||
width: 300px;
|
||||
vertical-align: center;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user