|
@@ -16,6 +16,7 @@ const arrowLeft= require("./../images/arrow_left.png")
|
|
|
const arrowRight = require("./../images/arrow_right.png")
|
|
|
|
|
|
$(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
+$(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
let tabList = [], name = "", behospitalCode="", behosDateStart="", level="",behosDateEnd="", scoreSum = 0,nameTemp = "", behospitalCodeTemp="",levelTemp=""
|
|
|
|
|
|
$('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
|
|
@@ -202,6 +203,53 @@ function bindOperaAll(){
|
|
|
renderTab(tabList)
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+$('.selectDept').on("click", function(e){
|
|
|
+ e.stopPropagation()
|
|
|
+ const showList = $(".deptList ").css("display")
|
|
|
+ if(showList == "none" ||!showList){
|
|
|
+ $(".deptList ").css("display","block")
|
|
|
+ $(".selectDept .arrow").attr("src",iconUp)
|
|
|
+ }else{
|
|
|
+ $(".deptList ").css("display", "none")
|
|
|
+ $(".selectDept .arrow").attr("src",iconDown)
|
|
|
+ }
|
|
|
+})
|
|
|
+//获取模块类型
|
|
|
+getDeptList()
|
|
|
+function getDeptList(){
|
|
|
+ post(api.getDeptList).then(res =>{
|
|
|
+ if(res.data.code == '0'){
|
|
|
+ console.log('aaaaaaaaaaa',res)
|
|
|
+ const deptList = res.data.data
|
|
|
+ rendeDeptList(deptList)
|
|
|
+ }else{}
|
|
|
+ }).catch((e) =>{
|
|
|
+
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+function rendeDeptList(deptList){
|
|
|
+ let str = `<li class="deptItem " data-id=" " data-name="全部">全部</li>`
|
|
|
+ for(let i = 0; i < moduleTypeList.length; i++){
|
|
|
+ str += `<li class="deptItem ellipsis" title=${moduleTypeList[i].name} data-id=${moduleTypeList[i].id} data-name=${moduleTypeList[i].name}> ${moduleTypeList[i].name}</li>`
|
|
|
+ }
|
|
|
+ $('.deptList').html(str)
|
|
|
+ bindDeptSelect()
|
|
|
+}
|
|
|
+//模块类型选择
|
|
|
+function bindDeptSelect(){
|
|
|
+ $('.deptItem').on("click",function(){
|
|
|
+ const deptItemName = $(this).attr("data-name")
|
|
|
+ const deptItemId = $(this).attr("data-id")
|
|
|
+ deptId =deptItemId
|
|
|
+ $('.selectDept').html(deptItemName)
|
|
|
+ $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
+
|
|
|
+ $(".deptList").css("display", "none")
|
|
|
+ })
|
|
|
+}
|
|
|
function loading(){
|
|
|
const str = `
|
|
|
<div class="loadingBox">
|
|
@@ -211,19 +259,6 @@ function loading(){
|
|
|
`
|
|
|
$("#mainBox", parent.document).append(str)
|
|
|
}
|
|
|
-function dialog(msg){
|
|
|
- const str = `
|
|
|
- <div class="dialogBox">
|
|
|
- <div class="dialogBoxMask"></div>
|
|
|
- <p class="dialogBoxMsg"> ${msg}</p>
|
|
|
-
|
|
|
- </div>
|
|
|
- `
|
|
|
- $("#mainBox", parent.document).append(str)
|
|
|
-}
|
|
|
-function removeDialog(){
|
|
|
- $("#mainBox .dialogBox", parent.document).remove()
|
|
|
-}
|
|
|
function hideLoading(){
|
|
|
$("#mainBox .loadingBox", parent.document).remove()
|
|
|
}
|