Ver código fonte

修改普通教师请假统计和中层领导请假统计 搜索条件和展示条件

新疆警官学校中职
lb01 2 anos atrás
pai
commit
9bd5e8728f
2 arquivos alterados com 110 adições e 93 exclusões
  1. +53
    -45
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/CustmerLeave/LeaderLeave/list.vue
  2. +57
    -48
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/CustmerLeave/TeacherLeave/list.vue

+ 53
- 45
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/CustmerLeave/LeaderLeave/list.vue Ver arquivo

@@ -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,15 +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">
@@ -76,10 +76,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="按请假类型查询" />
<!-- 重置查询条件按钮 -->
@@ -89,7 +91,7 @@
</view>
</scroll-view>

<l-customlist-add v-if="!sideOpen" @click="action('add')" />
<!-- <l-customlist-add v-if="!sideOpen" @click="action('add')" /> -->
</view>
</template>

@@ -128,16 +130,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',
@@ -165,8 +167,8 @@
searchData: {},
defaultQueryData: {},
queryData: {
F_CreateUserName: "",
F_BuMen: "",
// F_CreateUserName: "",
// F_BuMen: "",
F_QJType: ""
},
// 数据源
@@ -175,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
@@ -186,7 +188,8 @@
text: t.text
})),
},

// 时间查询参数
dateRange: null,
// 页面相关参数
ready: false,
tips: "加载中...",
@@ -218,21 +221,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
// }));
// }),


]);
@@ -258,10 +261,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
})),
},
"加载数据时出错"
);
@@ -300,7 +303,11 @@
// 设置搜索条件
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
@@ -316,6 +323,7 @@

// 点击「清空查询条件」按钮
reset() {
this.$refs.datefilter.changeDateRange('all')
this.queryData = this.COPY(this.defaultQueryData);
this.searchChange();
},


+ 57
- 48
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/CustmerLeave/TeacherLeave/list.vue Ver arquivo

@@ -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>


Carregando…
Cancelar
Salvar