Преглед изворни кода

信息化办公设备优化

长阳分支中职
yxq пре 1 месец
родитељ
комит
d8366fc56c
1 измењених фајлова са 29 додато и 13 уклоњено
  1. +29
    -13
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue

+ 29
- 13
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/OfficeEquipment/list.vue Прегледај датотеку

@@ -75,10 +75,14 @@
<!-- 侧边栏,用于设置查询条件 -->
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y>
<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"
: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.DeviceName" @change="searchChange" title="设备名称" placeholder="请输入" />
<!-- 重置查询条件按钮 -->
@@ -179,14 +183,15 @@
methods: {
// 页面初始化
async init() {
console.log(this.GET_GLOBAL('user'))
this.ON('EducationalAdministration_OfficeEquipment-list-change', this.reset)
// 拉取加载列表和数据源
await Promise.all([
this.FETCH_DATASOURCE('teacheruserdata').then(result => {
this.dataSource.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 => {
@@ -259,11 +264,21 @@
result.StartTime = this.dateRange.start
result.EndTime = this.dateRange.end
}
// 将其他查询项添加到查询 JSON 中
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)))

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)
},

@@ -293,14 +308,15 @@
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

default:


Loading…
Откажи
Сачувај