|
@@ -75,10 +75,14 @@ |
|
|
<!-- 侧边栏,用于设置查询条件 --> |
|
|
<!-- 侧边栏,用于设置查询条件 --> |
|
|
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y> |
|
|
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y> |
|
|
<view v-if="ready" class="padding"> |
|
|
<view v-if="ready" class="padding"> |
|
|
<l-select @input="queryData.Name=$event" :value="queryData.Name" |
|
|
|
|
|
:range="dataSource.Name" title="姓名" @change="searchChange" /> |
|
|
|
|
|
|
|
|
<!-- <l-select @input="queryData.Name=$event" :value="queryData.Name" :range="dataSource.Name" title="姓名" |
|
|
|
|
|
@change="searchChange" /> |
|
|
<l-select @input="queryData.Department=$event" :value="queryData.Department" |
|
|
<l-select @input="queryData.Department=$event" :value="queryData.Department" |
|
|
:range="dataSource.Department" title="部门" @change="searchChange" /> |
|
|
|
|
|
|
|
|
:range="dataSource.Department" title="部门" @change="searchChange" /> --> |
|
|
|
|
|
<l-organize-picker @input="queryData.Name_=$event" @change="searchChange" |
|
|
|
|
|
:value="queryData.Name_" type="user" title="姓名" /> |
|
|
|
|
|
<l-organize-picker @input="queryData.Department=$event" @change="searchChange" |
|
|
|
|
|
:value="queryData.Department" type="department" title="部门" /> |
|
|
<l-input v-model="queryData.Code" @change="searchChange" title="设备编号" placeholder="请输入" /> |
|
|
<l-input v-model="queryData.Code" @change="searchChange" title="设备编号" placeholder="请输入" /> |
|
|
<l-input v-model="queryData.DeviceName" @change="searchChange" title="设备名称" placeholder="请输入" /> |
|
|
<l-input v-model="queryData.DeviceName" @change="searchChange" title="设备名称" placeholder="请输入" /> |
|
|
<!-- 重置查询条件按钮 --> |
|
|
<!-- 重置查询条件按钮 --> |
|
@@ -179,14 +183,15 @@ |
|
|
methods: { |
|
|
methods: { |
|
|
// 页面初始化 |
|
|
// 页面初始化 |
|
|
async init() { |
|
|
async init() { |
|
|
console.log(this.GET_GLOBAL('user')) |
|
|
|
|
|
this.ON('EducationalAdministration_OfficeEquipment-list-change', this.reset) |
|
|
this.ON('EducationalAdministration_OfficeEquipment-list-change', this.reset) |
|
|
// 拉取加载列表和数据源 |
|
|
// 拉取加载列表和数据源 |
|
|
await Promise.all([ |
|
|
await Promise.all([ |
|
|
this.FETCH_DATASOURCE('teacheruserdata').then(result => { |
|
|
this.FETCH_DATASOURCE('teacheruserdata').then(result => { |
|
|
this.dataSource.Name = result.data.map(t => ({ |
|
|
this.dataSource.Name = result.data.map(t => ({ |
|
|
text: t.f_realname, |
|
|
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 => { |
|
|
this.FETCH_DATASOURCE('classdata').then(result => { |
|
@@ -259,11 +264,21 @@ |
|
|
result.StartTime = this.dateRange.start |
|
|
result.StartTime = this.dateRange.start |
|
|
result.EndTime = this.dateRange.end |
|
|
result.EndTime = this.dateRange.end |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 将其他查询项添加到查询 JSON 中 |
|
|
// 将其他查询项添加到查询 JSON 中 |
|
|
const queryObj = pickBy(this.queryData, t => (Array.isArray(t) ? t.length > 0 : t)) |
|
|
const queryObj = pickBy(this.queryData, t => (Array.isArray(t) ? t.length > 0 : t)) |
|
|
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) |
|
|
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) |
|
|
|
|
|
|
|
|
this.searchData = result |
|
|
this.searchData = result |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 姓名格式化 |
|
|
|
|
|
if(this.searchData.Name_){ |
|
|
|
|
|
let arr = this.dataSource.Name |
|
|
|
|
|
let obj = arr.find(e => e.f_userid == this.queryData.Name_) |
|
|
|
|
|
this.searchData.Name = obj ? obj.f_encode : '' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
await this.refreshList(false) |
|
|
await this.refreshList(false) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@@ -293,14 +308,15 @@ |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.HTTP_POST('/Learun/adms/EducationalAdministration/officeEquipment/delete', id, '删除失败').then( |
|
|
|
|
|
success => { |
|
|
|
|
|
if (!success) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.TOAST('删除成功', 'success') |
|
|
|
|
|
this.refreshList() |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.HTTP_POST('/Learun/adms/EducationalAdministration/officeEquipment/delete', id, '删除失败') |
|
|
|
|
|
.then( |
|
|
|
|
|
success => { |
|
|
|
|
|
if (!success) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.TOAST('删除成功', 'success') |
|
|
|
|
|
this.refreshList() |
|
|
|
|
|
}) |
|
|
return |
|
|
return |
|
|
|
|
|
|
|
|
default: |
|
|
default: |
|
|