|
|
@@ -1,11 +1,15 @@ |
|
|
|
<template> |
|
|
|
<view class="page"> |
|
|
|
<view v-if="ready"> |
|
|
|
<l-select @input="setValue('OfficeEquipment.Name', $event)" :value="getValue('OfficeEquipment.Name')" |
|
|
|
:range="dataSource.OfficeEquipment.Name" title="姓名" required /> |
|
|
|
<l-select @input="setValue('OfficeEquipment.Department', $event)" |
|
|
|
<!-- <l-select @input="setValue('OfficeEquipment.Name', $event)" :value="getValue('OfficeEquipment.Name')" |
|
|
|
:range="dataSource.OfficeEquipment.Name" title="姓名" required /> --> |
|
|
|
<l-organize-picker @input="setValue('OfficeEquipment.Name', $event)" |
|
|
|
:value="getValue('OfficeEquipment.Name')" type="user" title="姓名" required :readonly="!edit"/> |
|
|
|
<l-organize-picker @input="setValue('OfficeEquipment.Department', $event)" |
|
|
|
:value="getValue('OfficeEquipment.Department')" type="department" title="部门" required :readonly="!edit"/> |
|
|
|
<!-- <l-select @input="setValue('OfficeEquipment.Department', $event)" |
|
|
|
:value="getValue('OfficeEquipment.Department')" :range="dataSource.OfficeEquipment.Department" |
|
|
|
title="部门" required /> |
|
|
|
title="部门" required /> --> |
|
|
|
<l-input @input="setValue('OfficeEquipment.Code', $event)" :value="getValue('OfficeEquipment.Code')" |
|
|
|
:disabled="!edit" title="设备编号" required /> |
|
|
|
<l-input @input="setValue('OfficeEquipment.DeviceName', $event)" |
|
|
@@ -67,22 +71,33 @@ |
|
|
|
scheme: { |
|
|
|
OfficeEquipment: { |
|
|
|
Name: { |
|
|
|
type: 'select',title:'姓名',verify: "NotNull" |
|
|
|
type: 'select', |
|
|
|
title: '姓名', |
|
|
|
verify: "NotNull" |
|
|
|
}, |
|
|
|
Department: { |
|
|
|
type: 'select',title:'部门',verify: "NotNull" |
|
|
|
type: 'select', |
|
|
|
title: '部门', |
|
|
|
verify: "NotNull" |
|
|
|
}, |
|
|
|
Code: { |
|
|
|
type: 'text',title:'设备编号',verify: "NotNull" |
|
|
|
type: 'text', |
|
|
|
title: '设备编号', |
|
|
|
verify: "NotNull" |
|
|
|
}, |
|
|
|
DeviceName: { |
|
|
|
type: 'text',title:'设备名称',verify: "NotNull" |
|
|
|
type: 'text', |
|
|
|
title: '设备名称', |
|
|
|
verify: "NotNull" |
|
|
|
}, |
|
|
|
Description: { |
|
|
|
type: 'text',title:'配置描述',verify: "NotNull" |
|
|
|
type: 'text', |
|
|
|
title: '配置描述', |
|
|
|
verify: "NotNull" |
|
|
|
}, |
|
|
|
Remark: { |
|
|
|
type: 'text',title:'备注' |
|
|
|
type: 'text', |
|
|
|
title: '备注' |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@@ -117,7 +132,9 @@ |
|
|
|
this.FETCH_DATASOURCE('teacheruserdata').then(result => { |
|
|
|
this.dataSource.OfficeEquipment.Name = result.data.map(t => ({ |
|
|
|
text: t.f_realname, |
|
|
|
value: t.f_encode |
|
|
|
value: t.f_encode, |
|
|
|
f_encode: t.f_encode, |
|
|
|
f_userid: t.f_userid, |
|
|
|
})); |
|
|
|
}), |
|
|
|
this.FETCH_DATASOURCE('classdata').then(result => { |
|
|
@@ -143,9 +160,13 @@ |
|
|
|
// this.origin.OfficeEquipment.Department = userInfo.departmentId |
|
|
|
} else { |
|
|
|
const result = await this.HTTP_GET('/Learun/adms/EducationalAdministration/officeEquipment/form', |
|
|
|
this |
|
|
|
.id) |
|
|
|
this.id) |
|
|
|
this.origin = await this.formatFormData(result) |
|
|
|
|
|
|
|
let arr = this.dataSource.OfficeEquipment.Name |
|
|
|
let obj = arr.find(e => e.f_encode == this.origin.OfficeEquipment.Name) |
|
|
|
this.origin.OfficeEquipment.Name = obj ? obj.f_userid : this.origin.OfficeEquipment.Name |
|
|
|
|
|
|
|
} |
|
|
|
this.current = this.COPY(this.origin) |
|
|
|
}, |
|
|
@@ -175,6 +196,13 @@ |
|
|
|
|
|
|
|
this.LOADING('正在提交...') |
|
|
|
const postData = await this.getPostData(this.id) |
|
|
|
let strEntity = JSON.parse(postData.strEntity) |
|
|
|
|
|
|
|
let arr = this.dataSource.OfficeEquipment.Name |
|
|
|
let obj = arr.find(e => e.f_userid == strEntity.Name) |
|
|
|
strEntity.Name = obj ? obj.f_encode : strEntity.Name |
|
|
|
|
|
|
|
postData.strEntity = JSON.stringify(strEntity) |
|
|
|
this.HTTP_POST('/Learun/adms/EducationalAdministration/OfficeEquipment/save', postData, '提交失败') |
|
|
|
.then(success => { |
|
|
|
this.HIDE_LOADING() |
|
|
|