Commit 79a41f40 by qinjianhui

feat: 工单负责人多选

parent 23cd68e8
...@@ -13,7 +13,7 @@ export function workConfirmed(id) { ...@@ -13,7 +13,7 @@ export function workConfirmed(id) {
export function workAssigned(id, user) { export function workAssigned(id, user) {
return axios.post('platform/platformWorkOrder/assign', { return axios.post('platform/platformWorkOrder/assign', {
id: id, id: id,
leader: user, leaders: user,
}) })
} }
......
...@@ -367,6 +367,7 @@ ...@@ -367,6 +367,7 @@
style="width: 100%" style="width: 100%"
size="small" size="small"
v-model="user" v-model="user"
multiple
> >
<el-option <el-option
v-for="user in userList" v-for="user in userList"
...@@ -466,7 +467,7 @@ export default { ...@@ -466,7 +467,7 @@ export default {
return { return {
loading: false, loading: false,
detailLoading: false, detailLoading: false,
user: '', user: [],
textarea: '', textarea: '',
centerPageOptions: { centerPageOptions: {
pageSize: 100, pageSize: 100,
...@@ -554,7 +555,7 @@ export default { ...@@ -554,7 +555,7 @@ export default {
}, },
{ {
label: '负责人', label: '负责人',
key: 'leaderName', key: 'leaderNames',
width: 80, width: 80,
}, },
{ {
...@@ -791,13 +792,14 @@ export default { ...@@ -791,13 +792,14 @@ export default {
}, },
// 提交分派 // 提交分派
async submitAssign() { async submitAssign() {
if (!this.user) { if (this.user.length === 0) {
return this.$message.warning('请选择负责人') return this.$message.warning('请选择负责人')
} }
const user = this.user.join(',')
try { try {
const res = await workAssigned( const res = await workAssigned(
this.currentRowId, this.currentRowId,
this.user, user,
) )
if (res.code === 200) { if (res.code === 200) {
this.assignVisible = false this.assignVisible = false
......
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