mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-21 10:19:36 +08:00
修改了用户模块
This commit is contained in:
parent
828b9a1ad1
commit
cd3fc1f20a
@ -32,6 +32,14 @@ export function getStaffListNotId (parameter) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getStaffListByUser (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.icsCustomerStaff + '/getStaffListByUser',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function updateStaff (parameter) {
|
export function updateStaff (parameter) {
|
||||||
return axios({
|
return axios({
|
||||||
url: api.icsCustomerStaff + '/update',
|
url: api.icsCustomerStaff + '/update',
|
||||||
|
@ -67,11 +67,7 @@
|
|||||||
<a-select-option v-for="item in customerList" :key="item.value" >{{ item.text }}</a-select-option>
|
<a-select-option v-for="item in customerList" :key="item.value" >{{ item.text }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="选择企业">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="选择用户">
|
||||||
<!-- <a-select v-decorator="['customerId', {rules: [{ required: true, message: '请选择企业' }]}]">-->
|
|
||||||
<!-- <a-select-option v-for="item in customerList" :key="item.value" >{{ item.text }}</a-select-option>-->
|
|
||||||
<!-- </a-select>-->
|
|
||||||
|
|
||||||
<a-select
|
<a-select
|
||||||
show-search
|
show-search
|
||||||
v-decorator="['staffId', {rules: [{required: true, message: '请选择手机号码'}]}]"
|
v-decorator="['staffId', {rules: [{required: true, message: '请选择手机号码'}]}]"
|
||||||
@ -84,8 +80,8 @@
|
|||||||
@search="handleSearch"
|
@search="handleSearch"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
>
|
>
|
||||||
<a-select-option v-for="d in data" :key="d.id">
|
<a-select-option v-for="item in data" :key="item.id">
|
||||||
{{ d.mobile }}
|
{{item-username}} -{{ item.mobile }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
|
|
||||||
@ -101,7 +97,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getRoleAll, saveUser, getUser } from '@/api/system'
|
import { getRoleAll, saveUser, getUser } from '@/api/system'
|
||||||
import { saveCustomerContacts,getStaffList,updateStaff,getStaffListNotId } from '@/api/admin/customer'
|
import { saveCustomerContacts,getStaffList,updateStaff,getStaffListByUser } from '@/api/admin/customer'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getCustomerList
|
getCustomerList
|
||||||
@ -178,7 +174,7 @@ export default {
|
|||||||
mobile:value
|
mobile:value
|
||||||
}
|
}
|
||||||
getStaffList(param).then(res =>{
|
getStaffList(param).then(res =>{
|
||||||
this.data =res.rows
|
this.data = res.rows
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleChange(){
|
handleChange(){
|
||||||
@ -189,18 +185,23 @@ export default {
|
|||||||
this.mdl = Object.assign({}, { id: 0, deptId: '' })
|
this.mdl = Object.assign({}, { id: 0, deptId: '' })
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.mdl, 'id', 'username', 'nickname', 'status', 'mobile', 'roleIds','customerId', 'remark', 'deptId', 'parkId', 'tenantId'))
|
this.form.setFieldsValue(pick(this.mdl, 'id', 'username', 'nickname', 'status', 'mobile', 'roleIds','staffId','customerId', 'remark', 'deptId', 'parkId', 'tenantId'))
|
||||||
})
|
})
|
||||||
|
|
||||||
let param = {
|
let param = {
|
||||||
}
|
}
|
||||||
getStaffListNotId(param).then(res =>{
|
getStaffListByUser(param).then(res =>{
|
||||||
this.data =res.rows
|
this.data = res.rows
|
||||||
})
|
|
||||||
|
|
||||||
|
})
|
||||||
},
|
},
|
||||||
edit (record) {
|
edit (record) {
|
||||||
if (record.id > 0) {
|
if (record.id > 0) {
|
||||||
|
let param = {
|
||||||
|
}
|
||||||
|
getStaffListByUser(param).then(res => {
|
||||||
|
this.data = res.rows
|
||||||
|
|
||||||
|
})
|
||||||
this.spinning = true
|
this.spinning = true
|
||||||
getUser(record.id).then(res => {
|
getUser(record.id).then(res => {
|
||||||
|
|
||||||
@ -208,11 +209,12 @@ export default {
|
|||||||
this.mdl = Object.assign({}, res)
|
this.mdl = Object.assign({}, res)
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.mdl, 'id', 'username', 'nickname', 'status', 'mobile', 'roleIds','customerId', 'remark', 'deptId', 'parkId', 'tenantId'))
|
this.form.setFieldsValue(pick(this.mdl, 'id', 'username', 'nickname', 'status', 'mobile', 'roleIds','customerId','staffId', 'remark', 'deptId', 'parkId', 'tenantId'))
|
||||||
this.spinning = false
|
this.spinning = false
|
||||||
// this.form.setFieldsValue({ ...record })
|
// this.form.setFieldsValue({ ...record })
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user