mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-21 04:29: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) {
|
||||
return axios({
|
||||
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>
|
||||
</a-form-item>
|
||||
<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-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="选择用户">
|
||||
<a-select
|
||||
show-search
|
||||
v-decorator="['staffId', {rules: [{required: true, message: '请选择手机号码'}]}]"
|
||||
@ -84,8 +80,8 @@
|
||||
@search="handleSearch"
|
||||
@change="handleChange"
|
||||
>
|
||||
<a-select-option v-for="d in data" :key="d.id">
|
||||
{{ d.mobile }}
|
||||
<a-select-option v-for="item in data" :key="item.id">
|
||||
{{item-username}} -{{ item.mobile }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
|
||||
@ -101,7 +97,7 @@
|
||||
</template>
|
||||
<script>
|
||||
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 {
|
||||
getCustomerList
|
||||
@ -178,7 +174,7 @@ export default {
|
||||
mobile:value
|
||||
}
|
||||
getStaffList(param).then(res =>{
|
||||
this.data =res.rows
|
||||
this.data = res.rows
|
||||
})
|
||||
},
|
||||
handleChange(){
|
||||
@ -189,18 +185,23 @@ export default {
|
||||
this.mdl = Object.assign({}, { id: 0, deptId: '' })
|
||||
this.visible = true
|
||||
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 = {
|
||||
}
|
||||
getStaffListNotId(param).then(res =>{
|
||||
this.data =res.rows
|
||||
})
|
||||
getStaffListByUser(param).then(res =>{
|
||||
this.data = res.rows
|
||||
|
||||
})
|
||||
},
|
||||
edit (record) {
|
||||
if (record.id > 0) {
|
||||
let param = {
|
||||
}
|
||||
getStaffListByUser(param).then(res => {
|
||||
this.data = res.rows
|
||||
|
||||
})
|
||||
this.spinning = true
|
||||
getUser(record.id).then(res => {
|
||||
|
||||
@ -208,11 +209,12 @@ export default {
|
||||
this.mdl = Object.assign({}, res)
|
||||
this.visible = true
|
||||
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.form.setFieldsValue({ ...record })
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user