|
|
@@ -11,7 +11,7 @@ |
|
|
|
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list"> |
|
|
|
<l-customlist :tips="loadState" showTips> |
|
|
|
<!-- 单条记录 --> |
|
|
|
<view class="customlist-item" v-for="item of list" :key="item.Id"> |
|
|
|
<view data-v-08b3cd5e class="customlist-item" v-for="item of list" :key="item.Id"> |
|
|
|
|
|
|
|
<view class="customlist-item-field"> |
|
|
|
<text class="customlist-item-field-title">开始时间:</text> |
|
|
@@ -23,16 +23,15 @@ |
|
|
|
{{ displayListItem(item, "EndDate") }} |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="customlist-item-field"> |
|
|
|
<!-- <view class="customlist-item-field"> |
|
|
|
<text class="customlist-item-field-title">姓名:</text> |
|
|
|
{{ displayListItem(item, "F_CreateUserName") }} |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
|
|
|
|
<view class="customlist-item-field"> |
|
|
|
<!-- <view class="customlist-item-field"> |
|
|
|
<text class="customlist-item-field-title">所属部门:</text> |
|
|
|
{{ displayListItem(item, "F_BuMen") }} |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> --> |
|
|
|
|
|
|
|
<view class="customlist-item-field"> |
|
|
|
<text class="customlist-item-field-title">上下午:</text> |
|
|
@@ -60,9 +59,7 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <l-customlist-action @join="action('join', item.Id)" :showEdit="!item.CheckStatus" |
|
|
|
@edit="action('edit', item.Id)" :showDelete="!item.CheckStatus" |
|
|
|
@delete="action('delete', item.Id)" @view="action('view', item.Id)" /> --> |
|
|
|
<!-- <l-customlist-action @view="action('view', item.Id)" /> --> |
|
|
|
</view> |
|
|
|
</l-customlist> |
|
|
|
</l-scroll-list> |
|
|
@@ -76,10 +73,12 @@ |
|
|
|
<!-- 侧边栏,用于设置查询条件 --> |
|
|
|
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y> |
|
|
|
<view v-if="ready" class="padding"> |
|
|
|
<l-select v-model="queryData.F_CreateUserName" @change="searchChange" |
|
|
|
:range="dataSource.F_CreateUserName" title="姓名" placeholder="按姓名查询" /> |
|
|
|
<l-select v-model="queryData.F_BuMen" @change="searchChange" :range="dataSource.F_BuMen" title="所属部门" |
|
|
|
placeholder="按所属部门查询" /> |
|
|
|
<l-customlist-sidepage-datefilter v-model="dateRange" @change="searchChange" title="按时间日期查询: " |
|
|
|
ref="datefilter" class="margin-bottom" /> |
|
|
|
<!-- <l-select v-model="queryData.F_CreateUserName" @change="searchChange" |
|
|
|
:range="dataSource.F_CreateUserName" title="姓名" placeholder="按姓名查询" /> --> |
|
|
|
<!-- <l-select v-model="queryData.F_BuMen" @change="searchChange" :range="dataSource.F_BuMen" title="所属部门" |
|
|
|
placeholder="按所属部门查询" /> --> |
|
|
|
<l-select v-model="queryData.F_QJType" @change="searchChange" :range="dataSource.F_QJType" title="请假类型" |
|
|
|
placeholder="按请假类型查询" /> |
|
|
|
<l-input v-model="queryData.F_Description" @change="searchChange" title="请假事由" /> |
|
|
@@ -90,7 +89,7 @@ |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
<l-customlist-add v-if="!sideOpen" @click="action('add')" /> |
|
|
|
<!-- <l-customlist-add v-if="!sideOpen" @click="action('add')" /> --> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@@ -129,16 +128,16 @@ |
|
|
|
EndDate: { |
|
|
|
type: "text" |
|
|
|
}, |
|
|
|
F_CreateUserName: { |
|
|
|
type: "select", |
|
|
|
dataSource: '1', |
|
|
|
dataSourceId: 'F_CreateUserName' |
|
|
|
}, |
|
|
|
F_BuMen: { |
|
|
|
type: "select", |
|
|
|
dataSource: '1', |
|
|
|
dataSourceId: 'F_BuMen' |
|
|
|
}, |
|
|
|
// F_CreateUserName: { |
|
|
|
// type: "select", |
|
|
|
// dataSource: '1', |
|
|
|
// dataSourceId: 'F_CreateUserName' |
|
|
|
// }, |
|
|
|
// F_BuMen: { |
|
|
|
// type: "select", |
|
|
|
// dataSource: '1', |
|
|
|
// dataSourceId: 'F_BuMen' |
|
|
|
// }, |
|
|
|
F_shangxiawu: { |
|
|
|
type: "select", |
|
|
|
dataSource: '1', |
|
|
@@ -166,8 +165,8 @@ |
|
|
|
searchData: {}, |
|
|
|
defaultQueryData: {}, |
|
|
|
queryData: { |
|
|
|
F_CreateUserName: "", |
|
|
|
F_BuMen: "", |
|
|
|
// F_CreateUserName: "", |
|
|
|
// F_BuMen: "", |
|
|
|
F_QJType: "", |
|
|
|
F_Description: "", |
|
|
|
// CreateUser: "", |
|
|
@@ -178,8 +177,8 @@ |
|
|
|
value: t.value, |
|
|
|
text: t.text |
|
|
|
})), |
|
|
|
F_BuMen: [], |
|
|
|
F_CreateUserName: [], |
|
|
|
// F_BuMen: [], |
|
|
|
// F_CreateUserName: [], |
|
|
|
F_shangxiawu: Object.values(this.GET_GLOBAL('dataDictionary').sxw).map(t => ({ |
|
|
|
value: t.value, |
|
|
|
text: t.text |
|
|
@@ -189,7 +188,8 @@ |
|
|
|
text: t.text |
|
|
|
})), |
|
|
|
}, |
|
|
|
|
|
|
|
// 时间查询参数 |
|
|
|
dateRange: null, |
|
|
|
// 页面相关参数 |
|
|
|
ready: false, |
|
|
|
tips: "加载中...", |
|
|
@@ -214,6 +214,7 @@ |
|
|
|
methods: { |
|
|
|
// 页面初始化 |
|
|
|
async init() { |
|
|
|
|
|
|
|
this.ON( |
|
|
|
"PersonnelManagementCustmerLeaveTeacherLeave-list-change", |
|
|
|
this.refreshList |
|
|
@@ -221,21 +222,21 @@ |
|
|
|
|
|
|
|
// 拉取加载列表和数据源 |
|
|
|
await Promise.all([ |
|
|
|
this.FETCH_DATASOURCE('classdata').then(result => { |
|
|
|
// console.log(result.data) |
|
|
|
this.dataSource.F_BuMen = result.data.map(t => ({ |
|
|
|
text: t.name, |
|
|
|
value: t.id |
|
|
|
})); |
|
|
|
}), |
|
|
|
|
|
|
|
this.FETCH_DATASOURCE('teacheruserdata').then(result => { |
|
|
|
// console.log(result.data) |
|
|
|
this.dataSource.F_CreateUserName = result.data.map(t => ({ |
|
|
|
text: t.f_realname, |
|
|
|
value: t.f_userid |
|
|
|
})); |
|
|
|
}), |
|
|
|
// this.FETCH_DATASOURCE('classdata').then(result => { |
|
|
|
// // console.log(result.data) |
|
|
|
// this.dataSource.F_BuMen = result.data.map(t => ({ |
|
|
|
// text: t.name, |
|
|
|
// value: t.id |
|
|
|
// })); |
|
|
|
// }), |
|
|
|
|
|
|
|
// this.FETCH_DATASOURCE('teacheruserdata').then(result => { |
|
|
|
// // console.log(result.data) |
|
|
|
// this.dataSource.F_CreateUserName = result.data.map(t => ({ |
|
|
|
// text: t.f_realname, |
|
|
|
// value: t.f_userid |
|
|
|
// })); |
|
|
|
// }), |
|
|
|
|
|
|
|
|
|
|
|
]); |
|
|
@@ -261,10 +262,10 @@ |
|
|
|
sidx: "startdate", |
|
|
|
sord: "DESC" |
|
|
|
}, |
|
|
|
queryJson: JSON.stringify(this.searchData) |
|
|
|
// queryJson: JSON.stringify(Object.assign(this.searchData, { |
|
|
|
// StuNo: this.user.account |
|
|
|
// })), |
|
|
|
// queryJson: JSON.stringify(this.searchData) |
|
|
|
queryJson: JSON.stringify(Object.assign(this.searchData, { |
|
|
|
F_CreateUserName: this.user.userId |
|
|
|
})), |
|
|
|
}, |
|
|
|
"加载数据时出错" |
|
|
|
); |
|
|
@@ -304,6 +305,12 @@ |
|
|
|
async searchChange() { |
|
|
|
const result = {}; |
|
|
|
|
|
|
|
// 时间查询相关参数 |
|
|
|
if (this.dateRange) { |
|
|
|
result.StartTime = this.dateRange.start |
|
|
|
result.EndTime = this.dateRange.end |
|
|
|
} |
|
|
|
|
|
|
|
// 将其他查询项添加到查询 JSON 中 |
|
|
|
const queryObj = pickBy(this.queryData, (t) => |
|
|
|
Array.isArray(t) ? t.length > 0 : t |
|
|
@@ -319,6 +326,7 @@ |
|
|
|
|
|
|
|
// 点击「清空查询条件」按钮 |
|
|
|
reset() { |
|
|
|
this.$refs.datefilter.changeDateRange('all') |
|
|
|
this.queryData = this.COPY(this.defaultQueryData); |
|
|
|
this.searchChange(); |
|
|
|
}, |
|
|
@@ -423,6 +431,7 @@ |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.user = this.GET_GLOBAL('loginUser'); |
|
|
|
// console.log(this.user) |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|