<template> 
  <view class="page"> 
    <view v-if="ready"> 
      <l-select 
        @input="setValue('Acc_DailyAssess.Dormitory', $event)"
        :value="getValue('Acc_DailyAssess.Dormitory')"
        :disabled="!edit"
        :range="dataSource.Acc_DailyAssess.Dormitory"
		@change="DormitoryChange"
        title="宿舍楼"
        required
      /> 
	  <l-select
	    @input="setValue('Acc_DailyAssess.Unit', $event)"
	    :value="getValue('Acc_DailyAssess.Unit')"
	    :disabled="!edit"
	    :range="dataSource.Acc_DailyAssess.Unit"
          @change="UnitChange"
	    title="单元"
        required
	  /> 
	  <l-select
	    @input="setValue('Acc_DailyAssess.Floor', $event)"
	    :value="getValue('Acc_DailyAssess.Floor')"
	    :disabled="!edit"
	    :range="dataSource.Acc_DailyAssess.Floor"
          @change="FloorChange"
	    title="楼层"
        required
	  /> 
	  <l-select
	    @input="setValue('Acc_DailyAssess.RId', $event)"
	    :value="getValue('Acc_DailyAssess.RId')"
	    :disabled="!edit"
	    :range="dataSource.Acc_DailyAssess.RId"
		@change="RIdChange"
	    title="宿舍"
        required
	  /> 
	  
	 <!-- <l-select
	    @input="setValue('Acc_DailyAssess.DeptNo', $event)"
	    :value="getValue('Acc_DailyAssess.DeptNo')"
	    :disabled="!edit"
	    :range="dataSource.Acc_DailyAssess.DeptNo"
          @change="DeptNoChange"
	    title="专业部"
        required
	  /> 
	  <l-select
	    @input="setValue('Acc_DailyAssess.MajorNo', $event)"
	    :value="getValue('Acc_DailyAssess.MajorNo')"
	    :disabled="!edit"
	    :range="dataSource.Acc_DailyAssess.MajorNo"
          @change="MajorNoChange"
	    title="专业"
        required
	  /> 
	  <l-select
	    @input="setValue('Acc_DailyAssess.ClassNo', $event)"
	    :value="getValue('Acc_DailyAssess.ClassNo')"
	    :disabled="!edit"
	    :range="dataSource.Acc_DailyAssess.ClassNo" 
		 @change="ClassNoChange"
	    title="班级"
        required
	  /> -->
	  <l-select
	  v-if="show"
	    @input="setValue('Acc_DailyAssess.StuNo', $event)"
	    :value="getValue('Acc_DailyAssess.StuNo')"
	    :disabled="!edit"
	    :range="dataSource.Acc_DailyAssess.StuNo"
	    title="学生"
        required
	  /> 
	  
      <l-date-picker 
        @input="setValue('Acc_DailyAssess.Date', $event)"
        :value="getValue('Acc_DailyAssess.Date')"
        :disabled="!edit"
        title="日期"
        required
      /> 
      <l-input 
        @input="setValue('Acc_DailyAssess.AddScoreHealth', $event)"
        :value="getValue('Acc_DailyAssess.AddScoreHealth')"
        :disabled="!edit"
        title="卫生奖分"
      /> 
      <l-input 
        @input="setValue('Acc_DailyAssess.MinusScoreHealth', $event)"
        :value="getValue('Acc_DailyAssess.MinusScoreHealth')"
        :disabled="!edit"
        title="卫生扣分"
      /> 
      <l-input 
        @input="setValue('Acc_DailyAssess.AddScore', $event)"
        :value="getValue('Acc_DailyAssess.AddScore')"
        :disabled="!edit"
        title="纪律奖分"
      /> 
      <l-input 
        @input="setValue('Acc_DailyAssess.MinusScore', $event)"
        :value="getValue('Acc_DailyAssess.MinusScore')"
        :disabled="!edit"
        title="纪律扣分"
      /> 
      <l-textarea 
        @input="setValue('Acc_DailyAssess.Reason', $event)"
        :value="getValue('Acc_DailyAssess.Reason')"
        :readonly="!edit"
        title="奖扣分原因"
        required
      /> 
	  <!-- 附件上传 -->
	 <!-- <l-input
	    @input="setValue('Acc_DailyAssess.Files', $event)"
	    :value="getValue('Acc_DailyAssess.Files')"
	    disabled="disabled"
		v-show="false"
	    title="附件值"
	  /> 
	  <l-upload-file :number="5" :folderId="folderId" :value="fileList" :readonly="!edit" :title="fileTitle" :required="false"></l-upload-file> -->
	  <l-upload-file
	    @input="setValue('Acc_DailyAssess.Files', $event)"
	    :value="getValue('Acc_DailyAssess.Files')"
	    :readonly="!edit"
	    :number="3"
	    title="附件上传"
	  /> 
	  
    </view> 
  
    <view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;"> 
      <l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block> 
        提交保存 
      </l-button> 
      <l-button v-if="edit && mode !== 'create'" @click="action('reset')" size="lg" line="red" class="block margin-top" block> 
        取消编辑 
      </l-button> 
    </view> 
  </view> 
</template> 
  
  
<script> 
/* 
 * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) 
 * Copyright (c) 2013-2020 上海力软信息技术有限公司 
 * 创建人：超级管理员 
 * 日  期：2022-09-13 09:37 
 * 描  述：寝室日常考核管理 
 */
  
/** 
 * 本段代码由移动端代码生成器输出，移动端须 2.2.0 版本及以上可以使用 
 * 请在移动端 /pages.json 中的 pages 字段中添加一条记录： 
 * { "path": "pages/LogisticsManagement/Acc_DailyAssess/single", "style": { "navigationBarTitleText": "表单详情页" } } 
 *  
 * （navigationBarTitleText 字段为本页面的标题文本，可以修改） 
 * （必须自行操作该步骤，力软代码生成器不会自动帮您修改 /pages.json 文件） 
 */
  
import get from 'lodash/get'
import set from 'lodash/set'
import moment from 'moment'
import customPageMixins from '@/common/custompage.js'
// import uploadFile from '@/components/upload-file2.vue'
  
export default { 
  mixins: [customPageMixins], 
  // components:{
  // 	uploadFile,
  // },
  data() { 
    return { 
      // 页面相关参数 
      id: null, 
      mode: null, 
      edit: null, 
      ready: false, 
	  // fileList:[],//附件列表
	  // folderId:null,//附件随机文件夹id
	  // fileTitle:'附件上传',//附件label值
	  
  
      // 表单数据 
      current: {}, 
      origin: {}, 
  
      // 表单项数据结构 
      scheme: { 
        Acc_DailyAssess: { 
			// DeptNo: { type: 'select', title: '专业部', dataSource: '1', dataSourceId: 'CdDeptInfo,deptname,deptno' },
			// MajorNo: { type: 'select', title: '专业', dataSource: '1', dataSourceId: 'CdMajorInfo,majorname,majorno' }, 
			// ClassNo: { type: 'select', title: '班级', dataSource: '1', dataSourceId: 'bjsj,classname,classno' }, 
			Dormitory: { type: 'select', title: '宿舍楼', dataSource: '1', dataSourceId: 'Acc_DormitoryData,name,id', verify: 'NotNull'  }, 
			Unit: { type: 'selectNoMap', title: '单元', dataSource: '1', dataSourceId: 'Acc_UnitData,name,id', verify: 'NotNull' }, 
			Floor: { type: 'selectNoMap', title: '楼层', dataSource: '1', dataSourceId: 'Acc_FloorData,name,id' , verify: 'NotNull' }, 
			RId: { type: 'selectNoMap', title: '宿舍', dataSource: '1', dataSourceId: 'Acc_RoomData,name,id' , verify: 'NotNull'}, 
			StuNo: { type: 'selectNoMap', title: '学生', dataSource: '1', dataSourceId: 'StuInfoBasic,stuname,stuno', verify: 'NotNull' }, 
			Date: { type: 'date', title: '日期', dateformat: '0' , verify: 'NotNull'}, 
			AddScoreHealth: { type: 'text', title: '卫生奖分' }, 
			MinusScoreHealth: { type: 'text', title: '卫生扣分' }, 
			AddScore: { type: 'text', title: '纪律奖分' }, 
			MinusScore: { type: 'text', title: '纪律扣分' }, 
			Reason: { type: 'textarea', title: '奖扣分原因' , verify: 'NotNull'}, 
			Files: { type: "upload", title: "附件上传" },
        }, 
  
      }, 
  
      // 数据源 
      dataSource: { 
        Acc_DailyAssess: { 
            DeptNo: [],
            MajorNo: [], 
            ClassNo: [], 
            Dormitory: [], 
            Unit: [], 
            Floor: [], 
            RId: [], 
            StuNo:[],
        }, 
  
      } ,
	  
	  show:true,
	  
	  // StuNoAll:[],
	  FloorAll:[],
	  RIdAll:[],
	  DeptNoAll:[],
    } 
  }, 
  
  async onLoad({ type, id }) { 
    await this.init(type, id) 
  }, 
  
  methods: { 
    // 页面初始化 
    async init(type, id) { 
		// this.folderId=this.GUID();
		// console.log('附件随机文件夹id：'+this.folderId);
		
      this.LOADING('加载数据中...') 
  
      this.id = id 
      this.mode = type 
      this.edit = ['create', 'edit'].includes(this.mode) 
  
      // 拉取表单数据，同时拉取所有来自数据源的选单数据 
	  await Promise.all([ 
	    // this.FETCH_DATASOURCE('CdDeptInfo').then(result => { 
			 // this.DeptNoAll = result.data.sort((a,b)=>{return a.deptsort-b.deptsort}).map(t => ({ text: t.deptname, value: t.deptno,parentid:t.parentid,id:t.deptid })) 
	      // this.dataSource.Acc_DailyAssess.DeptNo = result.data.sort((a,b)=>{return a.deptsort-b.deptsort}).map(t => ({ text: t.deptname, value: t.deptno })) 
	    // }), 
		this.FETCH_DATASOURCE('CdMajorInfo').then(result => {
		  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.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.dataSource.Acc_DailyAssess.Dormitory = result.data.sort((a,b)=>{return a.parentid - b.parentid}).sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id })) 
	    }),  
	  	this.FETCH_DATASOURCE('Acc_UnitData').then(result => {
			this.UnitAll = result.data.sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id,parentid:t.parentid }))
	      // this.dataSource.Acc_DailyAssess.Unit = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) 
	    }),  
	  	this.FETCH_DATASOURCE('Acc_FloorData').then(result => {
			this.FloorAll = result.data.sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id,parentid:t.parentid }))
	      // this.dataSource.Acc_DailyAssess.Floor = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) 
	    }),  
	  	this.FETCH_DATASOURCE('Acc_RoomData').then(result => {
			this.RIdAll = result.data.sort((a,b)=>{return a.dno - b.dno}).map(t => ({ text: t.name, value: t.id,parentid:t.parentid })) 
	      // this.dataSource.Acc_DailyAssess.RId = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) 
	    }), 
	  	// this.FETCH_DATASOURCE('StuInfoBasic').then(result => { 
	   //    this.dataSource.Acc_DailyAssess.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno,classno:t.classno })) 
		  // this.StuNoAll = JSON.parse(JSON.stringify(this.dataSource.Acc_DailyAssess.StuNo))
	   //  }), 
	    
	    
	    () => {} 
	  ])
      await this.fetchForm() 
      this.ready = true
      this.HIDE_LOADING() 
    }, 
  
    // 加载表单数据 
    async fetchForm() { 
      if (this.mode === 'create') { 
        this.origin = await this.getDefaultForm() 
		
      } else { 
        const result = await this.HTTP_GET('learun/adms/LogisticsManagement/Acc_DailyAssess/form', this.id) 
        this.origin = await this.formatFormData(result) 
      } 
	  this.current = this.COPY(this.origin)
	  
	  this.DormitoryChange(false)
	  this.UnitChange(false)
	  this.FloorChange(false)
	  this.RIdChange(false)
	  
	  
	 //  //加载附件值数据
	 //  // console.log('附件值赋值前：'+this.getValue('Acc_DailyAssess.Files'));
	 //  if (this.getValue('Acc_DailyAssess.Files') == ""||this.getValue('Acc_DailyAssess.Files') == undefined ||this.getValue('Acc_DailyAssess.Files') == null) {
	 //  	this.setValue('Acc_DailyAssess.Files',this.folderId);
		// // console.log('附件值赋值后：'+this.getValue('Acc_DailyAssess.Files'));
	 //  }else{
		//   this.folderId=this.getValue('Acc_DailyAssess.Files');
		//   // console.log('文件夹id赋值后：'+this.folderId);
		//   //请求‘获取附件列表’接口
		//   this.fileList = await this.FETCH_FILEList(this.getValue('Acc_DailyAssess.Files'));
	 //  }
	  
	  // console.log('origin:'+JSON.stringify(this.origin) )
	  // console.log('current:'+JSON.stringify(this.current))
    }, 
  
    // 点击 「编辑」、「重置」、「保存」、「删除」 按钮 
    async action(type) { 
      switch (type) { 
        case 'edit': 
          this.edit = true
          break
  
        case 'reset': 
          this.current = this.COPY(this.origin) 
          this.edit = false
          break
  
        case 'save': 
          const verifyResult = this.verifyForm() 
          if (verifyResult.length > 0) { 
            this.CONFIRM('表单验证失败', verifyResult.join('\n')) 
            return
          } 
  
          if (!(await this.CONFIRM('提交确认', '确定要提交本页表单内容吗？', true))) { 
            return
          } 
		  
  
          this.LOADING('正在提交...') 
          let postData = await this.getPostData(this.id) 
			postData.strEntity = JSON.stringify({...JSON.parse(postData.strEntity),keyValue:JSON.parse(postData.strEntity).RId})
			console.log('页面提交数据：',postData,JSON.parse(postData.strEntity));
          this.HTTP_POST('learun/adms/LogisticsManagement/Acc_DailyAssess/save', postData, '表单提交保存失败').then(success => { 
            this.HIDE_LOADING() 
            if (!success) { 
              return
            } 
  
            this.EMIT('LogisticsManagementAcc_DailyAssess-list-change') 
            this.NAV_BACK() 
            this.TOAST('提交保存成功') 
          }) 
          break
  
        case 'delete': 
          if (!(await this.CONFIRM('删除项目', '确定要删除本项吗？', true))) { 
            return
          } 
  
          this.LOADING('提交删除中...') 
          this.HTTP_POST('learun/adms/LogisticsManagement/Acc_DailyAssess/delete', this.id, '删除失败').then(success => { 
            this.HIDE_LOADING() 
            if (!success) { 
              return
            } 
  
            this.EMIT('LogisticsManagementAcc_DailyAssess-list-change') 
            this.NAV_BACK() 
            this.this.TOAST('删除成功', 'success') 
          }) 
          break
  
        default: break
      } 
    }, 
  
    // 获取表单值 
    getValue(path) { 
      return get(this.current, path) 
    }, 
  
    // 设置表单值 
    setValue(path, val) { 
      set(this.current, path, val) 
    },
	
	//楼栋改变事件
	async DormitoryChange(reset=true){
		// if (this.getValue('Acc_DailyAssess.Dormitory') != null && this.getValue('Acc_DailyAssess.Dormitory') !=undefined && this.getValue('Acc_DailyAssess.Dormitory') != "") {
		// 	this.FETCH_DATASOURCE('Acc_UnitData').then(result => {
		// 	  this.dataSource.Acc_DailyAssess.Unit = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.getValue('Acc_DailyAssess.Dormitory') ).map(t => ({ text: t.name, value: t.id })) 
		// 	})
		// }else{
		// 	this.FETCH_DATASOURCE('Acc_UnitData').then(result => {
		// 	  this.dataSource.Acc_DailyAssess.Unit = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) 
		// 	})
		// }
		if (this.getValue('Acc_DailyAssess.Dormitory')){
			this.dataSource.Acc_DailyAssess.Unit = this.UnitAll.filter(t=>t.parentid == this.getValue('Acc_DailyAssess.Dormitory'))
		}else{
			this.dataSource.Acc_DailyAssess.Unit = []
		}
		console.log(this.getValue('Acc_DailyAssess.Dormitory'),this.getValue('Acc_DailyAssess.Unit'),this.dataSource.Acc_DailyAssess.Unit)
		if(!reset)return
		this.setValue('Acc_DailyAssess.Unit','');
		this.setValue('Acc_DailyAssess.Floor','');
		this.setValue('Acc_DailyAssess.RId','');
	},//多条件查询：单元改变事件
	// 单元改变事件
	async UnitChange(reset=true){
		// if (this.getValue('Acc_DailyAssess.Unit') != null && this.getValue('Acc_DailyAssess.Unit')!=undefined && this.getValue('Acc_DailyAssess.Unit')!= "") {
		// 	this.FETCH_DATASOURCE('Acc_FloorData').then(result => {
		// 	  this.dataSource.Acc_DailyAssess.Floor = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.getValue('Acc_DailyAssess.Unit')).map(t => ({ text: t.name, value: t.id })) 
		// 	})
		// }else{
		// 	this.FETCH_DATASOURCE('Acc_FloorData').then(result => {
		// 	  this.dataSource.Acc_DailyAssess.Floor = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) 
		// 	})
		// }
		if (this.getValue('Acc_DailyAssess.Unit')){
			 this.dataSource.Acc_DailyAssess.Floor = this.FloorAll.filter(t=>t.parentid == this.getValue('Acc_DailyAssess.Unit'))
		}else{
			this.dataSource.Acc_DailyAssess.Floor = []
		}
		if(!reset)return
		this.setValue('Acc_DailyAssess.Floor','');
		this.setValue('Acc_DailyAssess.RId','');
	},
	//楼层改变事件
	async FloorChange(reset=true){
		// if (this.getValue('Acc_DailyAssess.Floor') != null && this.getValue('Acc_DailyAssess.Floor')!=undefined && this.getValue('Acc_DailyAssess.Floor') != "") {
		// 	this.FETCH_DATASOURCE('Acc_RoomData').then(result => {
		// 	  this.dataSource.Acc_DailyAssess.RId = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.getValue('Acc_DailyAssess.Floor')).map(t => ({ text: t.name, value: t.id })) 
		// 	})
		// }else{
		// 	this.FETCH_DATASOURCE('Acc_RoomData').then(result => {
		// 	  this.dataSource.Acc_DailyAssess.RId = result.data.sort((a,b)=>{return a.parentid-b.parentid}).map(t => ({ text: t.name, value: t.id })) 
		// 	})
		// }
		if (this.getValue('Acc_DailyAssess.Floor')){
			this.dataSource.Acc_DailyAssess.RId = this.RIdAll.filter(t=>t.parentid == this.getValue('Acc_DailyAssess.Floor'))
		}else{
			this.dataSource.Acc_DailyAssess.RId = []
		}
		if(!reset)return
		this.setValue('Acc_DailyAssess.RId','');
	},
	// 宿舍改变事件
	async RIdChange(reset=true){
		// if (this.getValue('Acc_DailyAssess.RId')){
		// 	console.log(this.DeptNoAll,this.getValue('Acc_DailyAssess.RId'))
		// 	 this.dataSource.Acc_DailyAssess.DeptNo = this.DeptNoAll.filter(t=>t.parentid == this.getValue('Acc_DailyAssess.RId'))
		// }else{
		// 	this.dataSource.Acc_DailyAssess.DeptNo = []
		// }
		// this.setValue('Acc_DailyAssess.DeptNo','');
		if(this.getValue('Acc_DailyAssess.RId')){
			await this.HTTP_GET('/Learun/adms/LogisticsManagement/Acc_DailyAssess/getdormstu',{keyValue:this.getValue('Acc_DailyAssess.RId')}).then(success=>{
				let data = success||[]
				this.dataSource.Acc_DailyAssess.StuNo = data.map(t=>{return{value:t.StudentID,text:t.StuName||''}})
			})
		}else{
			this.dataSource.Acc_DailyAssess.StuNo = []
		}
		if(!reset){
			this.show = false
			setTimeout(()=>{
				this.show = true
			})
			return
		}
		this.setValue('Acc_DailyAssess.StuNo','');
	},
	// //多条件查询：专业部改变事件
	// async DeptNoChange(){
	// 	if (this.getValue('Acc_DailyAssess.DeptNo') != null && this.getValue('Acc_DailyAssess.DeptNo')!=undefined && this.getValue('Acc_DailyAssess.DeptNo') != "") {
	// 		this.FETCH_DATASOURCE('CdMajorInfo').then(result => {
	// 		  this.dataSource.Acc_DailyAssess.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).filter(t=>t.deptno===this.getValue('Acc_DailyAssess.DeptNo')).map(t => ({ text: t.majorname, value: t.majorno })) 
	// 		})
	// 	}else{
	// 		this.FETCH_DATASOURCE('CdMajorInfo').then(result => {
	// 		  this.dataSource.Acc_DailyAssess.MajorNo = result.data.sort((a,b)=>{return a.majorno-b.majorno}).map(t => ({ text: t.majorname, value: t.majorno })) 
	// 		})
	// 	}
	// 	this.setValue('Acc_DailyAssess.MajorNo','');
	// 	this.setValue('Acc_DailyAssess.ClassNo','');
	// 	this.setValue('Acc_DailyAssess.StuNo','');
	// },
	// //多条件查询：专业改变事件
	// async MajorNoChange(){
	// 	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.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{
	// 		this.FETCH_DATASOURCE('bjsj').then(result => {
	// 		  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.StuNo','');
	// },
	// //多条件查询：班级改变事件
	// async ClassNoChange(){
	// 	if (!this.getValue('Acc_DailyAssess.ClassNo')) {
	// 		// this.FETCH_DATASOURCE('StuInfoBasic').then(result => {
	// 		//   this.dataSource.Acc_DailyAssess.StuNo = result.data.filter(t=>t.classno===this.getValue('Acc_DailyAssess.ClassNo')).map(t => ({ text: t.stuname, value: t.stuno })) 
	// 		// })
	// 		this.dataSource.Acc_DailyAssess.StuNo = this.StuNoAll
			
	// 	}else{
	// 		// this.FETCH_DATASOURCE('StuInfoBasic').then(result => {
	// 		//   this.dataSource.Acc_DailyAssess.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno }))
	// 		// })
	// 		this.dataSource.Acc_DailyAssess.StuNo = this.StuNoAll.filter(t=>t.classno == this.getValue('Acc_DailyAssess.ClassNo'))
	// 	}
	// 	this.setValue('Acc_DailyAssess.StuNo','');
	// },
  } 
} 
</script> 