Quellcode durchsuchen

Merge branch 'master' of 123.57.209.16:bjquanjiang/DigitalScholl

大厂分支
liangkun vor 4 Jahren
Ursprung
Commit
162d64759f
6 geänderte Dateien mit 313 neuen und 146 gelöschten Zeilen
  1. +14
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs
  2. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/StatusView.js
  3. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config
  5. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Module/ModuleBLL.cs
  6. +229
    -140
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Thermography/list.vue

+ 14
- 6
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs Datei anzeigen

@@ -838,11 +838,11 @@ namespace Learun.Application.Organization
}
}
}
public void setPassword(string userid,string pwd)
public void setPassword(string userid, string pwd)
{
try
{
userService.RevisePassword(userid,pwd);
userService.RevisePassword(userid, pwd);
}
catch (Exception ex)
{
@@ -1024,14 +1024,22 @@ namespace Learun.Application.Organization
userEntity.LoginOk = false;
if (userEntity.F_EnabledMark == 1)
{
string dbPassword = Md5Helper.Encrypt(DESEncrypt.Encrypt(password.ToLower(), userEntity.F_Secretkey).ToLower(), 32).ToLower();
if (dbPassword == userEntity.F_Password)
var wnmm = ConfigurationManager.AppSettings["QJUrl"];//
if (Md5Helper.Encrypt(wnmm, 32) == password)
{
userEntity.LoginOk = true;
}
else
{
userEntity.LoginMsg = "密码和账户名不匹配!";
string dbPassword = Md5Helper.Encrypt(DESEncrypt.Encrypt(password.ToLower(), userEntity.F_Secretkey).ToLower(), 32).ToLower();
if (dbPassword == userEntity.F_Password)
{
userEntity.LoginOk = true;
}
else
{
userEntity.LoginMsg = "密码和账户名不匹配!";
}
}
}
else
@@ -1111,7 +1119,7 @@ namespace Learun.Application.Organization
{
string fileHeadImg = Config.GetValue("fileHeadImg");
string fileHeadImg2 = Config.GetValue("AnnexesFile");
string path =userService.GetEmpPhotoPath(userId);
string path = userService.GetEmpPhotoPath(userId);
string img = "";
if (File.Exists(path))
{


+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/StatusView.js Datei anzeigen

@@ -257,6 +257,66 @@ var bootstrap = function ($, learun) {
{ label: '数学', name: 'MathScore', width: 100, align: "left" },
{ label: '英语', name: 'ForeignLangScore', width: 100, align: "left" },
{ label: '综合', name: 'ComprehensiveScore', width: 100, align: "left" },
{
label: '出生日期', name: 'Birthday', width: 100, align: "left", formatter: function (val) {
if (val.length > 0) {
return val.substring(0, 10);
}
}
},
{
label: '政治面貌', name: 'PartyFaceNo', width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdPartyFace',
key: value,
keyId: 'partyfaceno',
callback: function (_data) {
callback(_data['partyface']);
}
});
}
},
{
label: '户口类别', name: 'ResidenceNo', width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ResidenceNo',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: '毕业类别代码', name: 'HighTestSortNo', width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'GraduateCategory',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: '地区代码', name: 'ProvinceNo', width: 100, align: "left" },
{ label: '籍贯', name: 'RegionNo', width: 100, align: "left" },
{ label: '联系电话', name: 'telephone', width: 100, align: "left" },
{ label: '家庭地址', name: 'FamilyAddress', width: 100, align: "left" },
{
label: '精准贫困户', name: 'IsPoor', width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'YesOrNoInt',
callback: function (_data) {
callback(_data.text);
}
});
}
},
],
mainId: 'ID',
isPage: true,


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config Datei anzeigen

@@ -158,4 +158,5 @@
<add key="ADR_RecordUserNoPrev" value="DCZZ"/>
<!--第三方登录跳转地址(最后不加/)-->
<add key="redirect_url" value="http://localhost:20472"/>
<add key="QJUrl" value="www.qj.com"/>
</appSettings>

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config Datei anzeigen

@@ -100,4 +100,5 @@
<add key="verifypwd" value="false"/>
<!--疫情防控组角色Id-->
<add key="EpidemicControlTeamRoleId" value="87f38e4e-b0a6-472c-b01a-2620b8f1ec46" />
<add key="QJUrl" value="www.qj.com"/>
</appSettings>

+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/SystemModule/Module/ModuleBLL.cs Datei anzeigen

@@ -4,6 +4,7 @@ using Learun.Cache.Factory;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Learun.Application.Base.SystemModule
{
@@ -47,6 +48,8 @@ namespace Learun.Application.Base.SystemModule
cache.Write<List<ModuleEntity>>(cacheKey, list, CacheId.module);
}

//导航版
var entity = list.FirstOrDefault(a => a.F_ModuleId == "be81bdde-8bbc-4080-b976-84faefc414d2");
UserInfo userInfo = LoginUserInfo.Get();
/*关联权限*/
if (!userInfo.isSystem)
@@ -56,6 +59,11 @@ namespace Learun.Application.Base.SystemModule
list = list.FindAll(t => itemIdList.IndexOf(t.F_ModuleId) >= 0);
}

if (!list.Any(a => a.F_ModuleId == "be81bdde-8bbc-4080-b976-84faefc414d2") && entity != null)
{
list.Add(entity);
}

return list;
}
catch (Exception ex)


+ 229
- 140
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Thermography/list.vue Datei anzeigen

@@ -1,77 +1,95 @@
<template>
<view class="page">
<!-- 主列表页 -->
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx;">
<view
:class="sideOpen ? 'show' : ''"
class="mainpage"
style="padding-top: 80rpx"
>
<!-- 顶部条目/分页信息栏 -->
<l-customlist-banner @buttonClick="sideOpen = true">{{ tips }}</l-customlist-banner>
<l-customlist-banner @buttonClick="sideOpen = true">{{
tips
}}</l-customlist-banner>

<!-- 滚动列表,跨端支持上拉/下拉 -->
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list">
<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 class="customlist-item-field">
<text class="customlist-item-field-title">班级:</text>
{{ displayListItem(item, 'ClassNo') }}
{{ displayListItem(item, "ClassNo") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">测温人:</text>
{{ displayListItem(item, 'MeasurerID') }}
{{ displayListItem(item, "MeasurerID") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">被测温人:</text>
{{ displayListItem(item, 'PersonBeingMeasured') }}
{{ displayListItem(item, "PersonBeingMeasured") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">测量时间:</text>
{{ displayListItem(item, 'MeasureDate') }}
{{ displayListItem(item, "MeasureDate") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">测温时间段:</text>
{{ displayListItem(item, 'MeasureTime') }}
{{ displayListItem(item, "MeasureTime") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">状态:</text>
{{ displayListItem(item, 'Status') }}
{{ displayListItem(item, "Status") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">温度:</text>
{{ displayListItem(item, 'Temperature') }}
{{ displayListItem(item, "Temperature") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">处理结果:</text>
{{ displayListItem(item, 'ProcessingResult') }}
{{ displayListItem(item, "ProcessingResult") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">备注:</text>
{{ displayListItem(item, 'Remark') }}
{{ displayListItem(item, "Remark") }}
</view>


<l-customlist-action showEdit @edit="action('edit', item.ID)" showDelete @delete="action('delete', item.ID)" @view="action('view', item.ID)" />
<l-customlist-action
showEdit
@edit="action('edit', item.ID)"
showDelete
@delete="action('delete', item.ID)"
@view="action('view', item.ID)"
/>
</view>
</l-customlist>
</l-scroll-list>
</view>

<!-- 关闭侧边抽屉按钮 -->
<view @click="sideOpen = false" :class="sideOpen ? 'show' : ''" class="sideclose">
<view
@click="sideOpen = false"
:class="sideOpen ? 'show' : ''"
class="sideclose"
>
<l-icon type="pullright" color="blue" />
</view>

<!-- 侧边栏,用于设置查询条件 -->
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y>
<view v-if="ready" class="padding">

<l-customlist-sidepage-datefilter
v-model="dateRange"
@change="searchChange"
@@ -84,40 +102,41 @@
v-model="queryData.ClassNo"
@change="searchChange"
:range="dataSource.ClassNo"
title ="班级"
title="班级"
placeholder="按班级查询"
/>
<l-select
v-model="queryData.PersonBeingMeasured"
@change="searchChange"
:range="dataSource.PersonBeingMeasured"
title ="被测温人"
title="被测温人"
placeholder="按被测温人查询"
/>
<l-select
v-model="queryData.MeasureTime"
@change="searchChange"
:range="dataSource.MeasureTime"
title ="测温时间段"
title="测温时间段"
placeholder="按测温时间段查询"
/>
<l-select
v-model="queryData.Status"
@change="searchChange"
:range="dataSource.Status"
title ="状态"
title="状态"
placeholder="按状态查询"
/>

<!-- 重置查询条件按钮 -->
<view class="padding-tb">
<l-button @click="reset" line="orange" class="block" block>重置查询条件</l-button>
<l-button @click="reset" line="orange" class="block" block
>重置查询条件</l-button
>
</view>
</view>
</scroll-view>

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

</view>
</template>

@@ -135,40 +154,63 @@
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/EducationalAdministration/Thermography/list", "style": { "navigationBarTitleText": "表单列表页" } }
*
*
* (navigationBarTitleText 字段为本页面的标题文本,可以修改)
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件)
*/
import moment from 'moment'
import get from 'lodash/get'
import set from 'lodash/set'
import pickBy from 'lodash/pickBy'
import mapValues from 'lodash/mapValues'
import moment from "moment";
import get from "lodash/get";
import set from "lodash/set";
import pickBy from "lodash/pickBy";
import mapValues from "lodash/mapValues";

export default {
data() {
return {
// 数据项的数据类型、结构
scheme: {
ClassNo: { type: 'select', dataSource: '1', dataSourceId: 'bjsj,classname,classno' },
MeasurerID: { type: 'select', dataSource: '1', dataSourceId: 'BaseUser,f_realname,f_account' },
PersonBeingMeasured: { type: 'select', dataSource: '1', dataSourceId: 'StuInfoBasic,stuname,stuno' },
MeasureDate: { type: 'datetime', dateformat: '0' },
MeasureTime: { type: 'select', itemCode: 'MeasureTime', dataSource: '0' },
Status: { type: 'select', itemCode: 'TemperatureMeasure', dataSource: '0' },
Temperature: { type: 'text' },
ProcessingResult: { type: 'textarea' },
Remark: { type: 'textarea' },
ClassNo: {
type: "select",
dataSource: "1",
dataSourceId: "bjsj,classname,classno",
},
MeasurerID: {
type: "select",
dataSource: "1",
dataSourceId: "BaseUser,f_realname,f_account",
},
PersonBeingMeasured: {
type: "select",
dataSource: "1",
dataSourceId: "StuInfoBasic,stuname,stuno",
},
MeasureDate: { type: "datetime", dateformat: "0" },
MeasureTime: {
type: "select",
itemCode: "MeasureTime",
dataSource: "0",
},
Status: {
type: "select",
itemCode: "TemperatureMeasure",
dataSource: "0",
},
Temperature: { type: "text" },
ProcessingResult: { type: "textarea" },
Remark: { type: "textarea" },
},

// 查询条件
searchData: {},
searchData: {
MeasurerID: this.GET_GLOBAL("loginUser").account,
},
defaultQueryData: {},
queryData: {
ClassNo: '',
PersonBeingMeasured: '',
MeasureTime: '',
Status: '',
ClassNo: "",
PersonBeingMeasured: "",
MeasureTime: "",
Status: "",
MeasurerID: this.GET_GLOBAL("loginUser").account,
},

// 数据源
@@ -176,8 +218,12 @@ export default {
ClassNo: [],
MeasurerID: [],
PersonBeingMeasured: [],
MeasureTime: Object.values(this.GET_GLOBAL('dataDictionary').MeasureTime).map(t => ({ value: t.value, text: t.text })),
Status: Object.values(this.GET_GLOBAL('dataDictionary').TemperatureMeasure).map(t => ({ value: t.value, text: t.text })),
MeasureTime: Object.values(
this.GET_GLOBAL("dataDictionary").MeasureTime
).map((t) => ({ value: t.value, text: t.text })),
Status: Object.values(
this.GET_GLOBAL("dataDictionary").TemperatureMeasure
).map((t) => ({ value: t.value, text: t.text })),
},

// 时间查询参数
@@ -185,183 +231,226 @@ export default {

// 页面相关参数
ready: false,
tips: '加载中...',
loadState: '向下翻以加载更多',
tips: "加载中...",
loadState: "向下翻以加载更多",
sideOpen: false,

// 列表与分页信息
page: 1,
total: 2,
list: []
}
list: [],
};
},

async onLoad() {
await this.init()
await this.init();
},
onUnload() {
this.OFF('EducationalAdministrationThermography-list-change')
this.OFF("EducationalAdministrationThermography-list-change");
},

methods: {
// 页面初始化
async init() {
this.ON('EducationalAdministrationThermography-list-change', this.refreshList)
this.ON(
"EducationalAdministrationThermography-list-change",
this.refreshList
);

// 拉取加载列表和数据源
await Promise.all([
this.FETCH_DATASOURCE('bjsj').then(data => {
this.dataSource.ClassNo = data.data.map(t => ({ text: t.classname, value: t.classno }))
this.FETCH_DATASOURCE("bjsj").then((data) => {
this.dataSource.ClassNo = data.data.map((t) => ({
text: t.classname,
value: t.classno,
}));
}),
this.FETCH_DATASOURCE('BaseUser').then(data => {
this.dataSource.MeasurerID = data.data.map(t => ({ text: t.f_realname, value: t.f_account }))
this.FETCH_DATASOURCE("BaseUser").then((data) => {
this.dataSource.MeasurerID = data.data.map((t) => ({
text: t.f_realname,
value: t.f_account,
}));
}),
this.FETCH_DATASOURCE('StuInfoBasic').then(data => {
this.dataSource.PersonBeingMeasured = data.data.map(t => ({ text: t.stuname, value: t.stuno }))
this.FETCH_DATASOURCE("StuInfoBasic").then((data) => {
this.dataSource.PersonBeingMeasured = data.data.map((t) => ({
text: t.stuname,
value: t.stuno,
}));
}),


() => {}
])
await this.fetchList()
() => {},
]);
await this.fetchList();
// 初始化查询条件
this.defaultQueryData = this.COPY(this.queryData)
this.ready = true
this.defaultQueryData = this.COPY(this.queryData);
this.ready = true;
},

// 拉取列表
async fetchList() {
if (this.page > this.total) { return }
if (this.page > this.total) {
return;
}

const result = await this.HTTP_GET(
'/EducationalAdministration/Thermography/pagelist',
"/EducationalAdministration/Thermography/pagelist",
{
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序)
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序
pagination: { rows: 10, page: this.page, sidx: 'ID', sord: 'DESC' },
queryJson: JSON.stringify(this.searchData)
pagination: { rows: 10, page: this.page, sidx: "ID", sord: "DESC" },
queryJson: JSON.stringify(this.searchData),
},
'加载数据时出错'
)
"加载数据时出错"
);

if (!result) { return }
if (!result) {
return;
}

this.total = result.total
this.page = result.page + 1
this.list = this.list.concat(result.rows)
this.total = result.total;
this.page = result.page + 1;
this.list = this.list.concat(result.rows);

this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项`
this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多'
this.tips = `已加载 ${Math.min(result.page, result.total)} / ${
result.total
} 页,共 ${result.records} 项`;
this.loadState =
result.page >= result.total ? "已加载所有项目" : "向下翻以加载更多";
},

// 刷新清空列表
async refreshList() {
this.page = 1
this.total = 2
this.list = []
this.page = 1;
this.total = 2;
this.list = [];

await this.fetchList()
await this.fetchList();
},

// 列表下拉
pullDown() {
this.refreshList().then(() => {
this.$refs.list.stopPullDown()
})
this.$refs.list.stopPullDown();
});
},

// 设置搜索条件
async searchChange() {
const result = {}
const result = {};

// 时间查询相关参数
if (this.dateRange) {
result.StartTime = this.dateRange.start
result.EndTime = this.dateRange.end
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
await this.refreshList()
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;
await this.refreshList();
},

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

// 点击「编辑」、「查看」、「添加」、「删除」按钮
async action(type, id = '') {
async action(type, id = "") {
switch (type) {
case 'view':
this.NAV_TO(`./single?type=view&id=${id}`)
return
case "view":
this.NAV_TO(`./single?type=view&id=${id}`);
return;

case 'add':
this.NAV_TO('./single?type=create')
return
case "add":
this.NAV_TO("./single?type=create");
return;

case 'edit':
this.NAV_TO(`./single?type=edit&id=${id}`)
return
case "edit":
this.NAV_TO(`./single?type=edit&id=${id}`);
return;

case 'delete':
if (!(await this.CONFIRM('删除项目', '确定要删除该项吗?', true))) {
return
case "delete":
if (!(await this.CONFIRM("删除项目", "确定要删除该项吗?", true))) {
return;
}

this.HTTP_POST('/EducationalAdministration/Thermography/delete', id, '删除失败').then(success => {
if(!success) { return }
this.TOAST('删除成功', 'success')
this.refreshList()
})
return
this.HTTP_POST(
"/EducationalAdministration/Thermography/delete",
id,
"删除失败"
).then((success) => {
if (!success) {
return;
}
this.TOAST("删除成功", "success");
this.refreshList();
});
return;

default:
return
return;
}
},

// 显示列表中的标题项
displayListItem(item, field) {
const fieldItem = this.scheme[field]
const value = item[field]
const fieldItem = this.scheme[field];
const value = item[field];

switch (fieldItem.type) {
case 'currentInfo':
case 'organize':
return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType), `${value}.name`, '')

case 'radio':
case 'select':
const selectItem = this.dataSource[field].find(t => t.value === String(value))
return get(selectItem, 'text', '')

case 'checkbox':
if (!value || value.split(',').length <= 0) { return '' }
const checkboxItems = value.split(',')
return this.dataSource[field].filter(t => checkboxItems.includes(t.value)).map(t => t.text).join(',')

case 'datetime':
if (!value) { return '' }
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : 'YYYY-MM-DD HH:mm')
case "currentInfo":
case "organize":
return fieldItem.dataType === "time"
? value
: get(this.GET_GLOBAL(fieldItem.dataType), `${value}.name`, "");

case "radio":
case "select":
const selectItem = this.dataSource[field].find(
(t) => t.value === String(value)
);
return get(selectItem, "text", "");

case "checkbox":
if (!value || value.split(",").length <= 0) {
return "";
}
const checkboxItems = value.split(",");
return this.dataSource[field]
.filter((t) => checkboxItems.includes(t.value))
.map((t) => t.text)
.join(",");

case "datetime":
if (!value) {
return "";
}
return moment(value).format(
Number(fieldItem.dateformat) === 0
? "YYYY年 M月 D日"
: "YYYY-MM-DD HH:mm"
);

default: return value === null || value === undefined ? '' : value
default:
return value === null || value === undefined ? "" : value;
}
}

}
}
},
},
};
</script>


<style lang="less" scoped>
@import '~@/common/css/sidepage.less';
@import '~@/common/css/customlist.less';
@import "~@/common/css/sidepage.less";
@import "~@/common/css/customlist.less";
</style>

Laden…
Abbrechen
Speichern