BUG 28482
This commit is contained in:
@@ -114,7 +114,8 @@
|
||||
</div>
|
||||
</ai-dialog>
|
||||
<ai-dialog :visible.sync="authDialog" title="授权" @onConfirm="handleAuth" @closed="form={}" width="500px">
|
||||
<ai-user-picker :instance="instance" v-model="form.operators" multiple action="/user/page" label="name"/>
|
||||
<ai-user-picker :instance="instance" v-model="form.operators" multiple action="/user/page" label="name"
|
||||
@list="v=>operators=v"/>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
@@ -216,7 +217,8 @@ export default {
|
||||
},
|
||||
peopleAjaxUrl: "/admin/user/page",
|
||||
authDialog: false,
|
||||
form: {}
|
||||
form: {},
|
||||
operators: []
|
||||
};
|
||||
},
|
||||
|
||||
@@ -268,15 +270,17 @@ export default {
|
||||
|
||||
statusChage(row) {
|
||||
this.authDialog = true
|
||||
this.form = JSON.parse(JSON.stringify(row))
|
||||
let store = JSON.parse(JSON.stringify(row))
|
||||
this.form = {...store, operators: store.operators?.map(e => e.id)}
|
||||
},
|
||||
handleAuth() {
|
||||
let {operators} = this.form
|
||||
this.form.operators = operators.map(id => ({id}))
|
||||
this.instance.post(`/app/appvillagerintegralshop/addOrUpdate`, this.form).then((res) => {
|
||||
let form = JSON.parse(JSON.stringify(this.form))
|
||||
form.operators = this.operators.map(({id, name}) => ({id, name}))
|
||||
this.instance.post(`/app/appvillagerintegralshop/addOrUpdate`, form).then((res) => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("授权成功!")
|
||||
this.authDialog = false
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user