@@ -199,13 +199,37 @@ export default { | |||||
OFF(name, func) { | OFF(name, func) { | ||||
uni.$off(name, func) | uni.$off(name, func) | ||||
}, | }, | ||||
// sortArr(array,num=0){ | |||||
// let arr = JSON.parse(JSON.stringify(array)) | |||||
// for(let i = 0;i<arr.length-1-num;i++){ | |||||
// if(Number(arr[i].classno) < Number(arr[i+1].classno)){ | |||||
// let item = JSON.parse(JSON.stringify(arr[i])) | |||||
// let item1 = JSON.parse(JSON.stringify(arr[i+1])) | |||||
// arr[i] = item1 | |||||
// arr[i+1] = item | |||||
// } | |||||
// } | |||||
// if(num < arr.length-1){ | |||||
// return this.sortArr(arr,num+1) | |||||
// }else{ | |||||
// return arr | |||||
// } | |||||
// }, | |||||
// 拉取指定 code 值的数据源数据 | // 拉取指定 code 值的数据源数据 | ||||
async FETCH_DATASOURCE(code) { | async FETCH_DATASOURCE(code) { | ||||
if (!code) { | if (!code) { | ||||
return [] | return [] | ||||
} | } | ||||
return await this.HTTP_GET('learun/adms/datasource/map', {code,ver: ''}) | |||||
let res = await this.HTTP_GET('learun/adms/datasource/map', {code,ver: ''}) | |||||
// if(res.data&&res.data.length){ | |||||
// if(code == "bjsj"){ | |||||
// console.log({data:this.sortArr(res.data),ver:res.ver}) | |||||
// return {data:this.sortArr(res.data),ver:res.ver} | |||||
// } | |||||
// } | |||||
return res | |||||
}, | }, | ||||
// 拉取指定规则编号的表单编码数据 | // 拉取指定规则编号的表单编码数据 | ||||
@@ -98,7 +98,7 @@ export default { | |||||
// 获取树形列表每一项后面 tag 的显示 | // 获取树形列表每一项后面 tag 的显示 | ||||
tagName() { | tagName() { | ||||
return { user: '职员', department: '部门', company: '公司' }[this.item.type] | |||||
return { user: '职员', department: '部门', company: '学校' }[this.item.type] | |||||
}, | }, | ||||
// 获取 tag 的颜色 | // 获取 tag 的颜色 | ||||
@@ -219,7 +219,7 @@ export default { | |||||
// 获取树形列表每一项后面 tag 的显示 | // 获取树形列表每一项后面 tag 的显示 | ||||
tagName() { | tagName() { | ||||
return { user: '职员', department: '部门', company: '公司' }[this.root.type] | |||||
return { user: '职员', department: '部门', company: '学校' }[this.root.type] | |||||
}, | }, | ||||
// 获取 tag 的颜色 | // 获取 tag 的颜色 | ||||
@@ -19,7 +19,7 @@ | |||||
</view> | </view> | ||||
<view> | <view> | ||||
<text class="text-bold">{{ processItem.F_CreateUserName || '「系统」' }}</text> | <text class="text-bold">{{ processItem.F_CreateUserName || '「系统」' }}</text> | ||||
: {{ processItem.F_OperationName }} | |||||
<!-- : {{ processItem.F_OperationName }} --> | |||||
</view> | </view> | ||||
<view v-if="processItem.F_Des"> | <view v-if="processItem.F_Des"> | ||||
<text class="text-bold">审批意见</text> | <text class="text-bold">审批意见</text> | ||||
@@ -236,7 +236,7 @@ export default { | |||||
this.dataSource.LessonNo = result.data.map(t => ({ text: t.lessonname, value: t.lessonno })); | this.dataSource.LessonNo = result.data.map(t => ({ text: t.lessonname, value: t.lessonno })); | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.TeachClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })); | |||||
this.dataSource.TeachClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })); | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('EmpInfo').then(result => { | this.FETCH_DATASOURCE('EmpInfo').then(result => { | ||||
this.dataSource.EmpNo = result.data.map(t => ({ text: t.empname, value: t.empno })); | this.dataSource.EmpNo = result.data.map(t => ({ text: t.empname, value: t.empno })); | ||||
@@ -254,7 +254,7 @@ export default { | |||||
this.dataSource.NewLessonNo = result.data.map(t => ({ text: t.lessonname, value: t.lessonno })); | this.dataSource.NewLessonNo = result.data.map(t => ({ text: t.lessonname, value: t.lessonno })); | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.NewTeachClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })); | |||||
this.dataSource.NewTeachClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })); | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('EmpInfo').then(result => { | this.FETCH_DATASOURCE('EmpInfo').then(result => { | ||||
this.dataSource.NewEmpNo = result.data.map(t => ({ text: t.empname, value: t.empno })); | this.dataSource.NewEmpNo = result.data.map(t => ({ text: t.empname, value: t.empno })); | ||||
@@ -222,7 +222,7 @@ export default { | |||||
this.dataSource.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('DIC_PROVINCE').then(result => { | this.FETCH_DATASOURCE('DIC_PROVINCE').then(result => { | ||||
this.dataSource.EmployerProvince = result.data.map(t => ({ text: t.pname, value: t.pcode })) | this.dataSource.EmployerProvince = result.data.map(t => ({ text: t.pname, value: t.pcode })) | ||||
@@ -149,7 +149,7 @@ export default { | |||||
// 拉取加载列表和数据源 | // 拉取加载列表和数据源 | ||||
await Promise.all([ | await Promise.all([ | ||||
this.FETCH_DATASOURCE('bjsj').then(data => { | this.FETCH_DATASOURCE('bjsj').then(data => { | ||||
this.dataSource.ClassNo = data.data.map(t => ({ | |||||
this.dataSource.ClassNo = data.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ | |||||
text: t.classname, | text: t.classname, | ||||
value: t.classno | value: t.classno | ||||
})); | })); | ||||
@@ -195,7 +195,7 @@ export default { | |||||
// 拉取加载列表和数据源 | // 拉取加载列表和数据源 | ||||
await Promise.all([ | await Promise.all([ | ||||
this.FETCH_DATASOURCE('bjsj').then(data => { | this.FETCH_DATASOURCE('bjsj').then(data => { | ||||
this.dataSource.ClassNo = data.data.map(t => ({ | |||||
this.dataSource.ClassNo = data.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ | |||||
text: t.classname, | text: t.classname, | ||||
value: t.classno | value: t.classno | ||||
})); | })); | ||||
@@ -164,7 +164,7 @@ export default { | |||||
// 拉取表单数据,同时拉取所有来自数据源的选单数据 | // 拉取表单数据,同时拉取所有来自数据源的选单数据 | ||||
await Promise.all([ | await Promise.all([ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Thermography.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Thermography.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('BaseUser').then(result => { | this.FETCH_DATASOURCE('BaseUser').then(result => { | ||||
this.dataSource.Thermography.MeasurerID = result.data.map(t => ({ text: t.f_realname, value: t.f_account })) | this.dataSource.Thermography.MeasurerID = result.data.map(t => ({ text: t.f_realname, value: t.f_account })) | ||||
@@ -270,7 +270,7 @@ export default { | |||||
this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | ||||
this.dataSource.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | this.dataSource.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | ||||
@@ -441,11 +441,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.queryData.ClassNo=''; | this.queryData.ClassNo=''; | ||||
@@ -246,7 +246,7 @@ export default { | |||||
this.dataSource.Acc_DailyAssess.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.Acc_DailyAssess.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_DailyAssess.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_DailyAssess.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | ||||
this.dataSource.Acc_DailyAssess.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | this.dataSource.Acc_DailyAssess.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | ||||
@@ -433,11 +433,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.getValue('Acc_DailyAssess.MajorNo') != null && this.getValue('Acc_DailyAssess.MajorNo')!=undefined && this.getValue('Acc_DailyAssess.MajorNo') != "") { | if (this.getValue('Acc_DailyAssess.MajorNo') != null && this.getValue('Acc_DailyAssess.MajorNo')!=undefined && this.getValue('Acc_DailyAssess.MajorNo') != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_DailyAssess.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.getValue('Acc_DailyAssess.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_DailyAssess.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.getValue('Acc_DailyAssess.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_DailyAssess.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_DailyAssess.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.setValue('Acc_DailyAssess.ClassNo',''); | this.setValue('Acc_DailyAssess.ClassNo',''); | ||||
@@ -217,7 +217,7 @@ export default { | |||||
this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | ||||
this.dataSource.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | this.dataSource.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | ||||
@@ -388,11 +388,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.queryData.ClassNo=''; | this.queryData.ClassNo=''; | ||||
@@ -197,7 +197,7 @@ export default { | |||||
this.dataSource.Acc_GoodsDemage.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.Acc_GoodsDemage.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_GoodsDemage.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_GoodsDemage.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => { | ||||
this.dataSource.Acc_GoodsDemage.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | this.dataSource.Acc_GoodsDemage.Dormitory = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) | ||||
@@ -379,11 +379,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.getValue('Acc_GoodsDemage.MajorNo') != null && this.getValue('Acc_GoodsDemage.MajorNo')!=undefined && this.getValue('Acc_GoodsDemage.MajorNo') != "") { | if (this.getValue('Acc_GoodsDemage.MajorNo') != null && this.getValue('Acc_GoodsDemage.MajorNo')!=undefined && this.getValue('Acc_GoodsDemage.MajorNo') != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_GoodsDemage.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.getValue('Acc_GoodsDemage.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_GoodsDemage.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.getValue('Acc_GoodsDemage.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_GoodsDemage.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_GoodsDemage.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.setValue('Acc_GoodsDemage.ClassNo',''); | this.setValue('Acc_GoodsDemage.ClassNo',''); | ||||
@@ -205,7 +205,7 @@ export default { | |||||
this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | ||||
this.dataSource.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | this.dataSource.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | ||||
@@ -364,11 +364,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.queryData.ClassNo=''; | this.queryData.ClassNo=''; | ||||
@@ -188,7 +188,7 @@ export default { | |||||
this.dataSource.Acc_PublicAreaHealth.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.Acc_PublicAreaHealth.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | ||||
this.dataSource.Acc_PublicAreaHealth.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | this.dataSource.Acc_PublicAreaHealth.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | ||||
@@ -323,11 +323,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.getValue('Acc_PublicAreaHealth.MajorNo') != null && this.getValue('Acc_PublicAreaHealth.MajorNo')!=undefined && this.getValue('Acc_PublicAreaHealth.MajorNo') != "") { | if (this.getValue('Acc_PublicAreaHealth.MajorNo') != null && this.getValue('Acc_PublicAreaHealth.MajorNo')!=undefined && this.getValue('Acc_PublicAreaHealth.MajorNo') != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.getValue('Acc_PublicAreaHealth.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.getValue('Acc_PublicAreaHealth.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_PublicAreaHealth.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.setValue('Acc_PublicAreaHealth.ClassNo',''); | this.setValue('Acc_PublicAreaHealth.ClassNo',''); | ||||
@@ -205,7 +205,7 @@ export default { | |||||
this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | ||||
this.dataSource.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | this.dataSource.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno })) | ||||
@@ -364,11 +364,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.queryData.ClassNo=''; | this.queryData.ClassNo=''; | ||||
@@ -188,7 +188,7 @@ export default { | |||||
this.dataSource.Acc_StuDayRoutine.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.Acc_StuDayRoutine.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | this.FETCH_DATASOURCE('StuInfoBasic').then(result => { | ||||
this.dataSource.Acc_StuDayRoutine.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | this.dataSource.Acc_StuDayRoutine.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) | ||||
@@ -323,11 +323,11 @@ export default { | |||||
async MajorNoChange(){ | async MajorNoChange(){ | ||||
if (this.getValue('Acc_StuDayRoutine.MajorNo') != null && this.getValue('Acc_StuDayRoutine.MajorNo')!=undefined && this.getValue('Acc_StuDayRoutine.MajorNo') != "") { | if (this.getValue('Acc_StuDayRoutine.MajorNo') != null && this.getValue('Acc_StuDayRoutine.MajorNo')!=undefined && this.getValue('Acc_StuDayRoutine.MajorNo') != "") { | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).filter(t=>t.majorno===this.getValue('Acc_StuDayRoutine.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).filter(t=>t.majorno===this.getValue('Acc_StuDayRoutine.MajorNo')).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
}else{ | }else{ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return a.classno-b.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.Acc_StuDayRoutine.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}) | }) | ||||
} | } | ||||
this.setValue('Acc_StuDayRoutine.ClassNo',''); | this.setValue('Acc_StuDayRoutine.ClassNo',''); | ||||
@@ -290,7 +290,7 @@ export default { | |||||
this.dataSource.ListenClassRecord.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno })) | this.dataSource.ListenClassRecord.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno })) | ||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ListenClassRecord.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ListenClassRecord.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
@@ -153,7 +153,7 @@ export default { | |||||
// 拉取加载列表和数据源 | // 拉取加载列表和数据源 | ||||
await Promise.all([ | await Promise.all([ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
@@ -121,7 +121,7 @@ export default { | |||||
// 拉取表单数据,同时拉取所有来自数据源的选单数据 | // 拉取表单数据,同时拉取所有来自数据源的选单数据 | ||||
await Promise.all([ | await Promise.all([ | ||||
this.FETCH_DATASOURCE('bjsj').then(result => { | this.FETCH_DATASOURCE('bjsj').then(result => { | ||||
this.dataSource.ClassWork.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno })) | |||||
this.dataSource.ClassWork.ClassNo = result.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ text: t.classname, value: t.classno })) | |||||
}), | }), | ||||
@@ -36,7 +36,7 @@ export default { | |||||
type: null, | type: null, | ||||
contactList: [], | contactList: [], | ||||
searchText: '', | searchText: '', | ||||
placeholder: '搜索公司名/部门名/职员姓名', | |||||
placeholder: '搜索学校名/部门名/职员姓名', | |||||
root: { type: 'company', id: '0' }, | root: { type: 'company', id: '0' }, | ||||
items:[], | items:[], | ||||
ids:'', | ids:'', | ||||
@@ -72,8 +72,8 @@ export default { | |||||
} | } | ||||
this.placeholder = { | this.placeholder = { | ||||
user: '搜索职员姓名', | user: '搜索职员姓名', | ||||
department: '搜索公司名/部门名', | |||||
company: '搜索公司名/部门名/职员姓名' | |||||
department: '搜索学校名/部门名', | |||||
company: '搜索学校名/部门名/职员姓名' | |||||
}[type] | }[type] | ||||
if (rootId && rootId !== 'undefined' && rootId !== 'null') { | if (rootId && rootId !== 'undefined' && rootId !== 'null') { | ||||
@@ -81,7 +81,7 @@ export default { | |||||
} | } | ||||
this.type = type || 'user' | this.type = type || 'user' | ||||
const selectType = { user: '职员', department: '部门', company: '公司' }[type] | |||||
const selectType = { user: '职员', department: '部门', company: '学校' }[type] | |||||
this.SET_TITLE(`请选择${selectType}`) | this.SET_TITLE(`请选择${selectType}`) | ||||
}, | }, | ||||
@@ -19,7 +19,7 @@ export default { | |||||
type: null, | type: null, | ||||
contactList: [], | contactList: [], | ||||
searchText: '', | searchText: '', | ||||
placeholder: '搜索公司名/部门名/职员姓名', | |||||
placeholder: '搜索学校名/部门名/职员姓名', | |||||
root: { type: 'company', id: '0' } | root: { type: 'company', id: '0' } | ||||
} | } | ||||
}, | }, | ||||
@@ -41,8 +41,8 @@ export default { | |||||
async init(type, rootId, rootType) { | async init(type, rootId, rootType) { | ||||
this.placeholder = { | this.placeholder = { | ||||
user: '搜索职员姓名', | user: '搜索职员姓名', | ||||
department: '搜索公司名/部门名', | |||||
company: '搜索公司名/部门名/职员姓名' | |||||
department: '搜索学校名/部门名', | |||||
company: '搜索学校名/部门名/职员姓名' | |||||
}[type] | }[type] | ||||
if (rootId && rootId !== 'undefined' && rootId !== 'null') { | if (rootId && rootId !== 'undefined' && rootId !== 'null') { | ||||
@@ -50,7 +50,7 @@ export default { | |||||
} | } | ||||
this.type = type || 'user' | this.type = type || 'user' | ||||
const selectType = { user: '职员', department: '部门', company: '公司' }[type] | |||||
const selectType = { user: '职员', department: '部门', company: '学校' }[type] | |||||
this.SET_TITLE(`请选择一个${selectType}`) | this.SET_TITLE(`请选择一个${selectType}`) | ||||
}, | }, | ||||
@@ -1,7 +1,7 @@ | |||||
<template> | <template> | ||||
<view id="contact" class="page"> | <view id="contact" class="page"> | ||||
<!-- 顶部搜索栏 --> | <!-- 顶部搜索栏 --> | ||||
<l-banner v-model="searchText" placeholder="搜索公司名/部门名/职员姓名" type="search" noSearchButton fixed fill /> | |||||
<l-banner v-model="searchText" placeholder="搜索学校名/部门名/职员姓名" type="search" noSearchButton fixed fill /> | |||||
<!-- 树形列表 --> | <!-- 树形列表 --> | ||||
<l-organize-tree v-if="ready && !searchText" @userClick="userClick" /> | <l-organize-tree v-if="ready && !searchText" @userClick="userClick" /> | ||||
@@ -130,7 +130,7 @@ export default { | |||||
}), | }), | ||||
this.FETCH_DATASOURCE('bjsj').then(data => { | this.FETCH_DATASOURCE('bjsj').then(data => { | ||||
// console.log(data) | // console.log(data) | ||||
this.dataSource.ClassNo = data.data.map(t => ({ | |||||
this.dataSource.ClassNo = data.data.sort((a,b)=>{return b.classno-a.classno}).map(t => ({ | |||||
text: t.classname, | text: t.classname, | ||||
value: t.classno | value: t.classno | ||||
})); | })); | ||||