(function(){ Vue.components = Vue.components || {} function RegVueCom(name, com){ Vue.component(name, com); Vue.components[name] = com; } RegVueCom("xljk-agger-view", function(resolve, reject){ var template = "
\n \n
\n \n\n
\n \n 提 交\n \n
\n \n
\n
\n {{info.tyhmc}}\n
\n
\n\n
\n
\n
\n 点 击 签 字\n
\n
\n\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { dialogVisible: false, signaturePad:'', blob:'', file:'', dataURL:'', info:'' }; }, methods: { openSignatureDialog() { this.dialogVisible = true; this.$nextTick(() => { this.initSignaturePad(); }); }, initSignaturePad() { let canvas = document.getElementById('canvas'); // 创建 SignaturePad let options = { penColor: 'rgb(0,0,0)', minWidth: 5, maxWidth: 10, }; this.signaturePad = new SignaturePad(canvas, options); this.resizeCanvas(); }, back(){ this.$router.push('evaluation') }, getTyh(){ const that = this; $.post("/www/public/tyh/gettyh", {}, function(res){ if(res.code==200&&res.data!==null){ that.info = res.data if(res.data.isqs==1){ that.$router.push('beforeEvaluations') } }else{ that.$message({ type: "error", message: '服务错误' }) } }) }, resizeCanvas() { let canvas = document.getElementById('canvas') let ratio = Math.max(window.devicePixelRatio || 1, 1) canvas.width = canvas.offsetWidth * ratio canvas.height = canvas.offsetHeight * ratio let context = canvas.getContext('2d') context.scale(ratio, ratio) var signTitle = document.querySelector('.signTitle'); canvas.addEventListener('mouseenter', function() { signTitle.style.display = 'none'; }); canvas.addEventListener('mouseleave', function() { signTitle.style.display = 'block'; }); }, /**根据图片的 Base64 编码,把内容显示到签名板上*/ redisplay() { this.signaturePad && this.dataURL && this.signaturePad.fromDataURL(this.dataURL) }, /*清除签名板内容*/ clear() { this.signaturePad.clear() this.dataURL = null }, /*获取签名板内容(图片的 Base64 编码)*/ save() { this.dataURL = this.signaturePad.toDataURL() console.log( this.dataURL) let data = { tyhid:this.info.id, username:JSON.parse(localStorage.getItem('user')).Username, imgurl:this.dataURL, } console.log(data) const that =this $.post("/www/public/tyh/savetyh", data, function(res){ if(res.code==200){ that.$message.success('提交成功'); that.$router.push('evaluations') }else{ that.$message({ type: "error", message: res.message }) } }) }, base64ToBlob(dataURL) { console.log(dataURL) let arr = dataURL.split(',') let mimeType = arr[0].match(/:(.*?);/)[1] || 'image/png' let encodeStr = atob(arr[1]) let n = encodeStr.length let u8Arr = new Uint8Array(n) while (n--) { u8Arr[n] = encodeStr.charCodeAt(n) } return new Blob([u8Arr], { type: mimeType }) }, //转换成file blobToFile(blob, fileName) { // MIME Type const type = blob.type || 'text/plain' return new File([blob], fileName, { type }) }, //生成图片 scImg(){ let blob = this.base64ToBlob(this.dataURL) this.file = this.blobToFile(blob, '签名图片.png') console.log(this.file) }, }, created: function(){ this.getTyh() }, mounted: function(){ let canvas = document.getElementById('canvas') // 创建 SignaturePad let options = { penColor: "rgb(0,0,0)", minWidth: 5, maxWidth: 10, } this.signaturePad = new SignaturePad(canvas, options); this.resizeCanvas() }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-evaluation2-view", function(resolve, reject){ var template = "
\n
\n
\nPASMBTI®-新版MBTI测试介绍:\n
\n
\n
\nPASMBTI是依据MBTI理论模型,结PASMBTI是依据MBTI理论模型,结PASMBTI是依据MBTI理论模型\n
\n
\nPASMBTI是依据MBTI理论模型,结PASMBTI是依据MBTI理论模型,结PASMBTI是依据MBTI理论模型\n
\n
\nPASMBTI是依据MBTI理论模型,结PASMBTI是依据MBTI理论模型,结PASMBTI是依据MBTI理论模型\n
\n
\nPASMBTI是依据MBTI理论模型,结PASMBTI是依据MBTI理论模型,结PASMBTI是依据MBTI理论模型\n
\n
\n
\n我已阅读并同意《用户协议》与《隐私政策》\n
\n
\n进入测试系统\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), checked:'' }; }, methods: { goEvaluation3(){ this.$router.push('evaluation3') }, }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-evaluation3-view", function(resolve, reject){ var template = "
\n
\n
\n
\n
\n {{item.tm.split('&&')[0]}}\n \n \n {{item.tm.split('&&')[1]}}\n
\n
\n {handleChange(val,item)}\" v-model=\"item.answer\">\n \n {{ option.text }}\n \n \n handle(val,item)\" v-model=\"item.answer\">\n {{ xx.text }}\n \n \n \n
\n
\n
\n
\n {{itt.tm.split('&&')[0]}}\n \n \n {{itt.tm.split('&&')[1]}}\n
\n
\n {handleChange(val,item)}\" v-model=\"itt.answer\">\n \n {{ option.text }}\n \n \n handle(val,item)\" v-model=\"itt.answer\">\n {{ xx.text }}\n \n \n \n
\n
\n
\n
\n \n 下一题\n \n \n 提交\n \n\n
\n \n
\n
\n\n\n
\n
\n
\n
答题卡 \n / 共{{ questionList.length }}题\n
\n
\n
已答
\n
未答
\n
当前题目
\n
\n
\n
\n
    \n
  • \n {{ item.tmpx }}\n
  • \n
\n
\n \n
\n\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ const cityOptions = ['上海', '北京', '广州', '深圳']; return { id: Math.uuid(), checkedCities: ['上海', '北京'], cities: cityOptions, current: 1, innerCurrent:1, gaugeId:'', formData: [], questionList: [ ], aaa:[], ruleMap:{}, hiddenList:[], breadcrumbList: [ { name: "项目列表", path: "/evaluation" }, { name: "以及状态自查问卷", path: "/evaluation3" } ], rules: { username: [{ required: true, message: "请输入用户名", trigger: "blur" }], password: { required: true, message: "请输入密码", trigger: "blur" } } }; }, methods: { init() { }, handle(val,item){ console.log(val) }, handleCheckedCitiesChange(value) { let checkedCount = value.length; this.checkAll = checkedCount === this.cities.length; this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length; }, showQuestion(type, sort,tmxt) { var that = this switch (type) { case 'pre': this.current-- break case 'next': var item = that.questionList[that.current-1] if(tmxt){ var itt = item.tmxt[that.innerCurrent-1] if(itt.tmxt){ }else{ console.log(itt,'itt') if(!itt.answer){ return that.$message.warning('请先作答') } var tmgz = itt.tmgz if(itt.answer == tmgz.xx){ var len = tmgz.tg.split(',').length alert('我要跳题了') that.innerCurrent = that.innerCurrent+len+1 alert(that.innerCurrent) }else if(itt.tmgzm){ var tmgzm = itt.tmgzm if(itt.answer == tmgzm.xx){ that.ruleMap[tmgzm.id]? that.ruleMap[tmgzm.id]+=1:that.ruleMap[tmgzm.id] = 1 } if(that.ruleMap[tmgzm.id]==tmgzm.count){ var len = tmgzm.tg.split(',').length alert('我要跳题了') that.innerCurrent += len+1 }else{ that.innerCurrent++ } }else{ that.innerCurrent++ } //小题做完跳下一大题 if(that.innerCurrent>tmxt.length){ that.innerCurrent = 1 that.current++ } } }else{ if(!item.answer){ return that.$message.warning('请先作答') } that.current++ } break default: this.current = sort } }, handleChange(val,item,parentItem){ }, isExistAnswer(item) { let result = false switch (item.type) { case "checkbox": result = !!(item.answer && item.answer.length) break default: result = !!item.answer break } return result }, save() { const that =this /*const unAnswerList=this.questionList.filter(row=>!that.isExistAnswer(row)) if(unAnswerList.length){ that.$message.warning('以下题目未回答:'+unAnswerList.map(item=>item.questionNo).join(',')) return }*/ that.$confirm("确定要提交吗?提交后将无法修改", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", }).then(() => { that.formData=that.questionList.map(row=>{ return { questionId:row.questionId, answerList:[row.answer] } }) console.log(`提交的答案对象如下:`); console.log(that.formData) const data = { gaugeId:that.gaugeId, openId:JSON.parse(localStorage.getItem('userInfo')).openId, accessToken:localStorage.getItem('accessToken'), questionAnswers:JSON.stringify(that.formData), answerDuration:20125 } console.log(data) $.post("/www/public/liangbiao/cp_gaugesave", data, function(res){ if(res.code==200){ that.$message({ type: "success", message: "保存成功!" }) }else{ that.$message({ type: "error", message: res.message }) } }) }).catch(() => { that.$message({ type: "info", message: "已取消保存" }) }) }, gettmlist(){ var that = this const data = { id:that.gaugeId, } console.log(data) $.post("/www/public/st/gettmlist", data, function(res){ var aaa =function(list){ if(list.length){ list.forEach(item=>{ if(item.tmlx==2){ item.answer = [] }else if(item.tmxt){ aaa(item.tmxt) } }) } } aaa(res.data) that.questionList = res.data }) } }, created: function(){ if (this.$route.query && this.$route.query.gaugeId) { //this.questionList = JSON.parse(this.$route.query.questions); this.gaugeId=this.$route.query.gaugeId this.gettmlist() } }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-evaluationList-view", function(resolve, reject){ var template = "
\n
\n
\n
\n
\n
\n \n
\n
\n 暂无内容\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n {{item.dtstatus==0?'● 进行中':'● 已完成'}}\n
\n
\n {{item.stmc}}\n
\n
\n
\n 1答题角色 : {{jsMap[item.js]}}\n
\n \n
\n
\n \n
\n 请认真答题再提交。请仔细阅读每条测试项目,务必把意思弄明白理解清楚然后根据最近一周的实际感觉,选择最符合自己的选项。本测验共30道题预计用时5分钟左右。\n
\n
\n 是否签署参与测评同意书\n\n
\n
\n 进入测试系统\n
\n
\n
\n
\n 立即测评\n
\n
\n
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dataList:[], Loading: false, visibleIntroduceDialog: false, checked:false, item:'', jsMap:{ '500':'学生', '720':'班主任(辅导员)', '710':'心理老师', '730':'校长', '700':'学科老师', '750':'信息员', } }; }, methods: { goTest(item){ this.$router.push({ path: 'beforeEvaluations', query: { gaugeId:item.sjid } }); }, dialog(item){ this.visibleIntroduceDialog = true this.item = item }, getImgsrc(val) { return "/content/image/xljkImg/"+val }, checkbox(){ this.$router.push('agger') }, getGaugelist(){ let that = this let data = { } $.post("/www/public/st/getstlist", data, function(res){ if(res.code==200){ that.dataList = res.data } }) }, }, created: function(){ let that = this that.getGaugelist() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-interview-view", function(resolve, reject){ var template = "
\n
\n
\n
\n
\n
\n \n
\n
\n 暂无内容\n
\n
\n
\n
\n
\n \n
\n
\n
\n {{item.gaugeName}}\n
\n
\n
\n 预约时间 : 2023-06-07\n
\n
\n 预约方式 : 线上访谈\n
\n
\n 访谈地址 : 北师大心理学部1318A\n
\n
\n
\n \n
\n 访谈时间:2024年3月20日 10:00-12:00\n
\n
\n 请认真答题再提交。请仔细阅读每条测试项目,务必把意思弄明白理解清楚然后根据最近一周的实际感觉,选择最符合自己的选项。本测验共30道题预计用时5分钟左右。\n
\n \n
\n 确定\n
\n
\n
\n
\n 立即开始\n
\n
\n
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dataList:[], visibleIntroduceDialog: false, checked:false }; }, methods: { goTest(item){ console.log(item) this.$router.push({ path: 'evaluation3', query: { questions: JSON.stringify(item.questionAndOption),gaugeId:item.gaugeId } }); }, getImgsrc(val) { return "/content/image/xljkImg/"+val }, checkbox(){ this.$router.push('agger') }, getGaugelist(){ let that = this let data = { accessToken:localStorage.getItem('accessToken'), pageNo: 1, pageSize: 2, gaugeModuleCode:'01' } $.post("/www/public/liangbiao/cp_gaugelist", data, function(res){ if(res.code==200){ that.dataList = res.data.dataList } }) }, }, created: function(){ let that = this that.getGaugelist() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-home-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n 也默默\n
\n
\n IP:210.73.91.250\n
\n
\n
\n
\n 小学\n
|\n
\n 三年级4班\n
\n
\n
\n 北京师范大学附属小学\n
\n
\n
\n
\n 立即测评\n
\n
\n 访谈任务\n
\n
\n 心理科普\n
\n 敬请期待\n
\n
\n
\n
\n
\n
\n
\n \n
\n 我的日程\n
\n
\n
\n
\n \n \n \n
\n
\n
\n \n
\n
\n \n \n \n
【课程】{{activity.event_title}}
\n
\n
节次:第{{activity.jc}}节
\n
地址:{{activity.event_place}}
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n 科普课程\n
\n
\n
\n 更多 >\n
\n
\n
\n\n
\n
\n \n
\n
\n
\n 如何调节负面情绪\n
\n
\n 3人已学\n
\n
\n
\n
\n
\n
\n\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { butList:[], active:0, tzggList:[], value:'', reverse: false, crq:'', rqList:[], currentList:[] }; }, methods: { getImgsrc:function(val) { return "/content/image/xljkImg/"+val }, getIndex(index){ this.active = index }, onPanelChange(value, mode) { console.log(value, mode); }, getDay(val){ if(this.rqList.length>0){ if(val.type=='current-month'){ //this.currentList.push(val.day) } if(val.type=='current-month'&&this.rqList.indexOf(val.day)>=0){ return true }else{ return false } } }, getDate(val){ //console.log(this.currentList) this.crq = val this.getdb() }, //获取待办 getdb:function(){ let that = this //$.post("/www/py/fwpt/test", {crq:this.crq}, function(res){ $.post("/www/py/fwpt/user_event", {crq:this.crq}, function(res){ if(res.success==1){ if(res.data.data){ that.tzggList = res.data.data that.rqList = res.data.rq } } }) }, }, created: function(){ this.getdb() }, mounted: function(){ }, props: ['title', 'data', 'config','isHeight'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-menu-view", function(resolve, reject){ var template = "
\n
\n
\n \"Logo\"\n 全国心理健康监测系统\n
\n\n \n 首页\n 测评\n 访谈\n \n
\n login\n
\n
\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), routerAcitve:'/' }; }, methods: { getImgsrc(val) { return "/content/image/xljkImg/"+val }, }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-loginDemo-view", function(resolve, reject){ var template = "
\n
\n
\n\n
\n 全国学生心理健康监测与服务平台\n
\n\n
\n
\n
\n
\n 欢迎登录\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n
\n
\n
\n
\n
\n 登录\n
\n
\n
\n"; return (function(template, resolve, reject){ var store = new Vuex.Store({ state: { accessToken:'', userInfo:{}, user:{}, }, mutations: { accessToken(state, accessToken) { state.accessToken = accessToken; }, userInfo(state, userInfo) { state.userInfo = userInfo; }, user(state, user) { state.user = user; }, } }); seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), codesrc:'/owin/api/authcode?q=2069', ruleForm:{ name:'', paw:'', authcode:'' }, rules: { name: [ { required: true, message: '请输入姓名', trigger: 'blue' } ], paw: [ { required: true, message: '请输入密码', trigger: 'blue' } ], authcode: [ { required: true, message: '请输入验证码', trigger: 'blue' } ] }, }; }, methods: { rulesInput(formName){ this.$refs[formName].validate((valid) => { if (valid) { this.goHome() } else { return false; } }); }, rulesInputs(formName){ $.post("/www/public/mh/get_pgsxx", {}, function(res){ }) }, goHome(){ const that = this this.getCodeSrc() let data = { username:this.ruleForm.name, password:this.ruleForm.paw, authcode:this.ruleForm.authcode } $.post("/core/Login/DoLogin", data, function(res){ if(res.success==1){ $.post("/www/dd/ai/user", function(res){ if(res.ID){ that.$store.commit('user', res); localStorage.setItem('user', JSON.stringify(res)) that.$router.push('home') that.$message.success('登录成功'); $.post("/www/public/liangbiao/cp_getAccessToken", {}, function(res){ if(res.code==200){ that.$store.commit('accessToken', res.data.accessToken); localStorage.setItem('accessToken', res.data.accessToken) let data = { accessToken:that.$store.state.accessToken, } $.post("/www/public/liangbiao/cp_getOpenUserInfo", {...data}, function(res){ if(res.code==200){ that.$store.commit('userInfo', res.data); localStorage.setItem('userInfo', JSON.stringify(res.data)) } }) } }) } }) }else{ that.$message.warning(res.message); } }) }, getCodeSrc(){ this.codesrc = this.codesrc.replace(/\d+$/, parseInt(Math.random()*10000)) }, }, created: function(){ }, mounted: function(){ $.post("/owin/api/authcode", {}, function(res){ if(res.code==200){ } }) }, store: store, watch:{ //监听参数中的 props.markerLists 变化 $route:{ handler(newValue, oldValue){ if(newValue.query.otype == '0'){ this.routerAcitve = '/evaluation' }else if(newValue.query.otype == '1'){ this.routerAcitve = '/interview' }else{ this.routerAcitve = newValue.path } }, // 深度侦听需要遍历被侦听对象中的所有嵌套的属性,当用于大型数据结构时,开销很大。 // 因此请只在必要时才使用它,并且要留意性能。 deep: true, }, }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-menu", function(resolve, reject){ var template = "
\n
\n
\n \"Logo\"\n 全国学生心理健康监测与服务平台\n
\n\n \n
\n {{userName}}\n
\n
\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), routerAcitve:'/home', userName:'' }; }, methods: { getImgsrc(val) { return "/content/image/xljkImg/"+val }, }, created: function(){ let user = JSON.parse(localStorage.getItem('user')) this.userName =user.Nickname }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-evaluations-view", function(resolve, reject){ var template = "
\n
\n
\n
\n {{toolname||'测评问卷'}}\n
\n
\n {{current-1}} / {{questionList.length-1}}\n
\n \n
\n
\n
\n
\n \n
\n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : calctmlx == 4||calctmlx == 5 ? '排序题' : calctmlx == 6?'滑块题':''}}\n \n \n \n {{currentList[0]?.questioncontent.split('%s')[indd]}}\n \n \n \n
\n
\t\n
\n \n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : calctmlx == 4||calctmlx == 5 ? '排序题' : ''}}\n \n\n\n \n \n {{currentList[1]?.questioncontent.split('%s')[indd2]}}\n \n \n\n \n
\n \n
\n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : calctmlx == 4||calctmlx == 5 ? '排序题' : ''}}\n \n \n \n {{currentList[2]?.questioncontent.split('%s')[indd3]}}\n \n \n \n
\n
\n \n \n \n \n
\n
\n

\n 已选择选项:\n

\n
\n {{index+1}}.{{item.answerText}}\n
\n
\n

\n 所有选项:\n

\n
\n {{item.optionName}}\n
\n
\n \n
\n
\n
\n {{index+1}}.\n \n
\n
\n
\n \n
\n \n
\n

\n {{currentListlast.marks['1']}}\n

\n

\n {{currentListlast.marks[currentListlast.segment]}}\n

\n
\n\n
\n \n
\n
\n
\n \n {{item.optionNameArr[ind]}}\n \n __\n \n
\n
\n
\n \n
\n
\n \n \n {{item.optionNameArr[ind]}}\t\n \n \n \n \n
\n
\n \n
\n
\n
\n \n {{item.optionNameArr[ind]}}\n \n __\n \n
\n
\n
\n\n \n
\n
\n
\n \n {{item.optionNameArr[ind]}}\n \n __\n \n
\n
\n \n
\n
\n
\n
\n \n {{current==questionList.length?'提 交':'下 一 题 '}}\n \n \n
\n
\n
\n
\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), denominator: 16, activeIndex: -1, status:6, activeIndexs: [], input:'', textarea:'', questionList:[], current:0, currentList:[], ttMap:{}, newTtMap:{}, loading:false, evaId:'', answerNumber:0, test:'', startTime:'', toolname:'', colorMap:['','#067EFF','#FF8A0D','#3F23FF'], questionListbk:[], User:{}, value1:'', marks: { 1: '8°C', 2: '37°C', 5: '0°C', }, questionAnswers:[ ] }; }, methods: { handleClose(tag){ var index = this.currentListlast.answer.findIndex(it=>it.answerId==tag.answerId) console.log(index) console.log(this.currentListlast.answer,'this.currentListlast.answer') if(index!=-1){ this.currentListlast.answer.splice(index,1) } console.log(this.currentListlast.answer,'this.currentListlast.answer') }, gopaixu(item){ var min = this.currentListlast.minoptcnt var max = this.currentListlast.maxoptcnt if(this.currentListlast.answer.length==max){ return vant.Toast({ message:'最多选择'+max+'个', icon: 'warning-o', }) } console.log(item.answer,'item.answer') var index = this.currentListlast.answer.findIndex(it=>it.answerId==item.answerBusiId) if(index==-1){ this.currentListlast.answer.push({ answerId:item.answerBusiId,answerText:item.optionName }) }else{ return } }, handleChange(val){ }, innerClick(e){ console.log(e,'e') e.stopPropagation(); }, handleInput(v,rules,index){ if(rules[index]&&rules[index].type=='number'){ var rule=rules[index] if(v>rule.max){ v=rule.max console.log(v) } if(v { } }); }, previous(){ this.current = this.current-3 }, getredistm(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var sjid = localStorage.getItem('sjid') var tmlist = localStorage.getItem('saveredistm') if(tmlist){ tmlist = JSON.parse(tmlist) if(tmlist.userId==user.ID&&that.questionList[0].sjid==sjid){ that.questionAnswers = tmlist.answerList that.current = tmlist.current return } } $.post("/www/public/st/getredistm", {stid:that.questionList[0]?.sjid}, function(res){ if(res.code==200){ if(res.data){ /*that.questionListbk = res.data let len =that.questionListbk.length let lastAnswer = that.questionListbk[len-1] if(len&&len>1){ res.data.forEach(item=>{ }) that.evaId = that.questionListbk[0] that.questionList[len-2].answer = lastAnswer that.current = len-1 //that.current = 194 }else{ that.current = 1 }*/ that.newTtMap = res.data.newTtMap that.questionAnswers = res.data.answerList that.current = res.data.current console.log(that.questionAnswers,'that.questionAnswers') }else{ that.current = 1 } }else{ that.current = 1 } //that.current = 86 //that.current = 220 }) }, saveAll(){ if(this.current!=this.questionList.length) return this.endTime = new Date().getTime() const that = this that.loading = true var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} $.post("/www/public/st/saveda", that.answerData, function(res){ if(res.success==1){ //that.$message.success('答题完成') that.loading = false that.$router.replace({ path:'/evaluationsDone', query:{ time:that.calculateTimeDifference(that.startTime,that.endTime), answerNumber:that.questionAnswers.length, toolname:that.toolname } }) }else{ that.$message({ type: "error", message: '服务错误' }) that.loading = false } }).fail((err)=>{ that.loading = false that.$message({ type: "error", message: '服务错误' }) }) }, calculateTimeDifference(startTime, endTime) { let timeDiff = endTime - startTime; let hours = Math.floor(timeDiff / (1000 * 60 * 60)); let minutes = Math.floor((timeDiff % (1000 * 60 * 60)) / (1000 * 60)); let seconds = Math.floor((timeDiff % (1000 * 60)) / 1000); return timeDiff; }, submitSingle(){ var that = this if(that.loading) return that.loading = true var answer = that.currentListlast.answer console.log(answer,'answer') if(that.calctmlx==1){ if(!answer||!answer.answerId){ that.loading = false return vant.Toast({ message:'请先选择/填写答案', icon: 'warning-o', }) } if(answer.fillValues){ if(!answer.fillValues[0]){ return vant.Toast({ message:'选中选项有信息需未填写', icon: 'warning-o', }) } } }else if(that.calctmlx==2){ var inputContent = '' for(let iii = 0;iii{ if(item.fillValues){ console.log(item.fillValues,'item.fillValues') var keys = Object.keys(item.fillValues) keys.forEach(ii=>{ if(!item.fillValues[ii]){ mflag = true } }) } }) if(mflag){ return vant.Toast({ message:'选中选项有信息需未填写', icon: 'warning-o', }) } } }else if(that.calctmlx==4){ if(!answer.length){ that.loading = false return vant.Toast({ message:'请先选择/填写答案', icon: 'warning-o', }) } if(answer.length{ if(item.trim()!=''){ resultN+=1 } }) if(resultN{ var aaa if(that.currentListlast.answer.fillValues){ aaa= that.currentListlast.answer.fillValues[inn+'']?"####"+that.currentListlast.answer.fillValues[inn+'']+"####":'' }else{ aaa = '' } text+=iii+aaa }) data.answerList = [{answerId:that.currentListlast.answer.answerId,answerText:text}] } if(that.calctmlx==3){ console.log(that.currentListlast.answer,'that.currentListlast.answer') var list = [] that.currentListlast.answer.forEach(item=>{ var text = '' console.log(item.fillValues) item.optionNameArr.forEach((iii,inn)=>{ var aaa if(item.fillValues){ aaa= item.fillValues[inn+'']?"####"+item.fillValues[inn+'']+"####":'' }else{ aaa = '' } text+=iii+aaa }) list.push({ answerId:item.answerId, answerText:text, }) }) data.answerList = list } if(that.calctmlx==4){ var arr = [] that.currentListlast.answer.forEach((item,index)=>{ arr.push({ ...item, order:index+1 }) }) console.log() var list = arr data.answerList = list } if(that.calctmlx==5){ var arr = [] that.currentListlast.answer.forEach((item,index)=>{ if(item.trim()!=''){ arr.push({ answerId:'', answerText:item, order:index+1 }) } }) var list = arr data.answerList = list } if(that.calctmlx==6){ if(that.currentListlast.answer==''){ data.inputContent = 1 }else{ data.inputContent = that.currentListlast.answer } } let bbb = that.questionAnswers.findIndex(itemm=>itemm.questionId==data.questionId) if(bbb==-1){ that.questionAnswers.push(data) }else{ that.questionAnswers[bbb] = data that.questionAnswers = that.questionAnswers.slice(0,bbb+1) } /*let datas = { toolId:that.currentListlast.toolid, accessToken:localStorage.getItem('accessToken'), dadata:JSON.stringify(data) }*/ //var jsonData = answer //that.questionListbk[0] = that.evaId //that.questionListbk[that.current] = jsonData //$.post("/www/public/st/saveredistm", {jsonData:JSON.stringify(that.questionListbk)}, function(res){ //}) that.answerNumber++ if(that.calctmlx==3){ let checkboxRefs = that.$refs.checkboxRefs checkboxRefs.forEach(checkbox=>{ let inputbox = checkbox.querySelector('input[type="checkbox"]') inputbox.checked = false }) } that.next() /*$.post("/www/public/st/savexfda", datas, function(res){ if(res&&res.code==200&&res.data){ //that.loading = false if(res.data.code==200){ that.evaId = res.data.data that.answerNumber++ if(that.calctmlx==3){ let checkboxRefs = that.$refs.checkboxRefs checkboxRefs.forEach(checkbox=>{ let inputbox = checkbox.querySelector('input[type="checkbox"]') inputbox.checked = false }) } that.next() }else if(res.data.code==600){ that.$message({ type: "error", message: res.data.message }) setTimeout(()=>{ localStorage.removeItem('user') localStorage.removeItem('userInfo') that.$router.push('/login') },1000) }else{ that.$message({ type: "error", message: res.data.message }) that.loading = false } }else{ that.$message({ type: "error", message: '服务错误' }) that.loading = false } //that.loading = false })*/ }, next(){ var that = this console.log(1) var answer = this.currentListlast.answer console.log(answer,'answer') //if(!answer||Array.isArray(answer)&&!answer.length) return that.$message.warning('请先答题') if(that.currentListlast.quesjumpquesno!=0){ this.current=this.currentListlast.quesjumpquesno }else if(that.currentListlast.scorejumpquesno!=0){ console.log(1) var scorejumpquesnoArr = that.currentListlast.scorejumpquesno.split(',') var lenth = scorejumpquesnoArr.length var score = answer.score console.log(answer,'answer') if(that.currentListlast.scorejumpnos){ console.log(that.newTtMap,'that.newTtMap') if(that.newTtMap[that.currentListlast.scorejumpnos]){ console.log(that.newTtMap,'that.newTtMap') }else{ console.log(that.newTtMap,'that.newTtMap') that.newTtMap[that.currentListlast.scorejumpnos] = 0 } that.newTtMap[that.currentListlast.scorejumpnos]+=score var arr = that.currentListlast.scorejumpnos.split(",") var th = arr[arr.length-1] var minarr=that.currentListlast.scorejumpmin.split(",") var maxarr=that.currentListlast.scorejumpmax.split(",") if(Number(th)==that.currentListlast.questionno){ let jumped = false for(let j=0;j=Number(minarr[j])&&that.newTtMap[that.currentListlast.scorejumpnos]<=Number(maxarr[j])){ that.current = Number(scorejumpquesnoArr[j]) jumped = true } } if(!jumped){ that.current++ } }else{ that.current++ } /*if(that.newTtMap[that.currentListlast.scorejumpnos]>=Number(this.currentListlast.scorejumpmin)&&that.newTtMap[that.currentListlast.scorejumpnos]<=Number(that.currentListlast.scorejumpmax)&&Number(th)==that.currentListlast.questionno){ console.log(that.currentListlast.scorejumpmax,'that.currentListlast.scorejumpmax') that.current = Number(that.currentListlast.scorejumpquesno) }else{ that.current++ }*/ /*console.log(3) var arr = that.currentListlast.scorejumpnos.split(",") that.ttMap[that.currentListlast.scorejumpnos]?console.log(1): that.ttMap[that.currentListlast.scorejumpnos]= {len:arr.length} var aaa = that.ttMap[that.currentListlast.scorejumpnos] if(score>=Number(this.currentListlast.scorejumpmin)&&score<=Number(this.currentListlast.scorejumpmax)){ aaa.score?aaa.score++:aaa.score=1 } if(aaa.score==aaa.len){ console.log(3) that.current = Number(this.currentListlast.scorejumpquesno) }else{ console.log(4) that.current++ }*/ }else{ if(score>=this.currentListlast.scorejumpmin&&score<=this.currentListlast.scorejumpmax){ that.current = Number(this.currentListlast.scorejumpquesno) console.log(6) }else{ console.log(7) that.current++ } } }else if(this.currentListlast._ansJumpQuesNo){ console.log(8) this.current=this.currentListlast._ansJumpQuesNo }else{ this.current++ console.log(this.current,'this.current111') } var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} const jsonD = { answerList:that.questionAnswers, current:this.current, newTtMap:this.newTtMap, userId:user.ID } if(this.current<=this.questionList.length){ var aaab = JSON.stringify(jsonD) if(this.current%10==0){ $.post("/www/public/st/saveredistm", {jsonData:aaab,stid:that.questionList[0]?.sjid}, function(res){ }) }else{ // localStorage.setItem('aa','34') localStorage.setItem('saveredistm',aaab) } } //this.activeIndexs = [] if(this.current>this.questionList.length){ this.current=this.questionList.length that.saveAll() }else{ that.loading = false } }, toggleActive(item,index) { if(item.mutexOptionNos){ if(item.mutexOptionNos){ var optionNos = item.mutexOptionNos.split(',') optionNos.forEach(itt=>{ let box = this.$refs.checkboxRefs[itt-1].querySelector('input[type="checkbox"]'); box.checked = false }) } } const checkbox = this.$refs.checkboxRefs[index].querySelector('input[type="checkbox"]'); checkbox.checked = !checkbox.checked; //this.updateCheckboxState(); }, updateCheckboxState() { this.$refs.checkboxRefs.forEach((checkboxRef, index) => { const checkbox = checkboxRef.querySelector('input[type="checkbox"]'); if (checkbox.checked) { this.activeIndexs.push(index); } }); }, gettmlist(){ var that = this const data = { sjid:this.sjid } console.log(data) $.post("/www/public/st/gettmlist", data, function(res){ if(res.success==1){ res.data.forEach(item=>{ let tmlx = that.gettmlx(item) if(tmlx==1){ item.answer = {} } //填空 if(tmlx==2){ //判断%s的数量 let _questioncontent = item.questioncontent.replace(/%s/g,'') var zhanweinumber = (item.questioncontent.length - _questioncontent.length)/2 //为0,说明是简答 console.log(zhanweinumber,'zhanweinumber',item.questionno) if(zhanweinumber==0){ item.isJianda = true }else if(zhanweinumber==1&&item.questioncontent.endsWith("%s")){ item.isJianda = true } console.log(item.isJianda,'item.isJianda') if(item.contenttype){ item.contenttype = item.contenttype.split('#') item.rules = item.contenttype.map((kk,ink)=>{ let rules={} if(kk=='0'){ rules.tag='el-input' }else if(kk=='1'){ rules.tag='el-input-number' }else if(kk=='2'){ rules.tag='el-input-number' } return rules }) console.log(item.rules,item.questionno) if(item.contentrule&&item.contentrule.length){ item.contentrule.map((kk,ink)=>{ var ins = Number(kk.number)-1 var arrr = kk.scope.split(',') var sco = [arrr[0].substring(1),arrr[1].substring(0,arrr[1].length-1)] console.log(sco,'sco') console.log(item.contenttype,'item.contenttype') if(item.contenttype&&item.contenttype[ins]=='0'){ item.rules[ins].minlength = sco[0] item.rules[ins].maxlength = sco[1] }else if(item.contenttype&&item.contenttype[ins]=='1'){ if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } item.rules[ins].step = 1 }else if(item.contenttype&&item.contenttype[ins]=='2'){ item.rules[ins].precision = kk.decimal if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } } return 11 }) }else{ } } var len1 = item.questioncontent.split("%s")?.length //构造答案个数,与输入框个数对应 if(item.isJianda&&zhanweinumber==0){ item.answer = new Array(1) }else{ item.answer = new Array(zhanweinumber) } } //多选 if(tmlx==3){ item.answer = [] item.activeIndex = [] } if(tmlx==4){ item.answer = [] } if(tmlx==5){ item.answer = new Array(item.maxoptcnt).fill('') } if(tmlx==6){ item.answer = 1 item.marks={ 1:item.startscope, [Number(item.segment)]:item.endscope } if(item.axisdesc){ var axisdescArr = item.axisdesc.split(';') item.marks[1] = axisdescArr[0] item.marks[Number(item.segment)] = axisdescArr[axisdescArr.length-1] } console.log(item.marks,'item.marks') } }) console.log(res.data,'that.questionList') that.questionList = res.data that.toolname = that.questionList[0]?.toolname that.getredistm() //that.current= that.current==0? 104:that.current } }) }, handleAct(item){ return this.currentListlast&&this.currentListlast.answer&&this.currentListlast.answer.answerBusiId==item.answerBusiId }, handleChoose(item,index,e){ /*if (e.target.tagName === 'INPUT') { e.target.focus(); // 聚焦输入框 } console.log(e,'eeeeeeeeeeee')*/ if(this.calctmlx==1){ console.log(index,'index') this.$set(this.currentListlast,'activeIndex',index) this.currentListlast.answer = {...item,answerId:item.answerBusiId,answerText:item.optionName} if(item.ansJumpQuesNo){ this.currentListlast._ansJumpQuesNo = item.ansJumpQuesNo }else{ this.currentListlast._ansJumpQuesNo = null } }else if(this.calctmlx==3){ var idex = this.currentListlast.activeIndex.indexOf(index) if(idex==-1){ if(item.ansJumpQuesNo){ this.currentListlast._ansJumpQuesNo = item.ansJumpQuesNo } if(this.currentListlast.maxoptcnt&&this.currentListlast.activeIndex.length>=this.currentListlast.maxoptcnt){ vant.Toast({ message:`最多选择${this.currentListlast.maxoptcnt}个选项`, icon: 'warning-o', }) }else{ if(item.mutexOptionNos){ var optionNos = item.mutexOptionNos.split(',') optionNos.forEach(itt=>{ var op = this.currentListlast.mpanswerdtolist[itt-1] console.log(op.answerBusiId,'op.answerBusiId') console.log(this.currentListlast.answer,'this.currentListlast.answer') if(op){ this.currentListlast.answer = this.currentListlast.answer.filter(an=>an.answerBusiId!=op.answerBusiId) this.currentListlast.activeIndex = this.currentListlast.activeIndex.filter(index1=>index1!=itt-1) } }) } this.currentListlast.activeIndex.push(index) console.log(item.answerBusiId,'item.answerBusiId') this.currentListlast.answer.push({...item,answerId:item.answerBusiId,answerText:item.optionName}) this.toggleActive(item,index) } }else{ this.currentListlast.activeIndex.splice(idex,1) this.currentListlast.answer.splice(idex,1) this.toggleActive(item,index) if(item.ansJumpQuesNo){ this.currentListlast._ansJumpQuesNo = null } } } console.log(this.currentListlast.activeIndex,'this.currentListlast.activeIndex') }, aaa(que){ var that = this var pcur = that.questionList[que.parentno-1] that.currentList.unshift(pcur) if(pcur.parentno!=0){ that.aaa(pcur) } }, gettmlx(item){ console.log(item,item.questiontype,item.questionno,'item') //单选 if(item.questiontype==2&&item.ismult==0){ return 1 } //填空 if(item.questiontype==1&&item.replytype==2){ return 2 } //多选 if(item.questiontype==2&&item.ismult==1){ return 3 } //排序题 if(item.questiontype=='7'&&item.replytype=='1'){ return 4 } //无选项排序题 if(item.questiontype=='7'&&item.replytype=='2'){ return 5 } //滑块题 if(item.questiontype=='8'&&item.replytype=='2'){ return 6 } } }, computed: { answerData(){ var that = this var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} return { xm:that.answererInfo.xm, xxid:that.answererInfo.schoolid||that.answererInfo.xxid||that.answererInfo.id, xxmc:that.answererInfo.xxmc, //zyid:that.answererInfo.zy,// zymc:that.answererInfo.zy,// nj:that.answererInfo.nj,// //bjid:that.answererInfo.bj,// bjmc:that.answererInfo.bj,// xd:that.answererInfo.xd||that.answererInfo.xxjd, account:that.User.Username, email:that.User.Email, ujs:that.User.Roles[0], //accessToken:localStorage.getItem('accessToken'), toolId:that.currentListlast.toolid, stid:that.questionList[0]?.sjid, dtcnt:that.questionAnswers.length, dttime:that.calculateTimeDifference(that.startTime,that.endTime), questionAnswers:JSON.stringify({ toolId:that.currentListlast.toolid, openQuestionAnswerVOS:that.questionAnswers, xb:that.answererInfo.xb }) } }, currentListlast(){ var len = this.currentList.length var cu = this.currentList[len-1] console.log(cu,'cu------') if(!cu) return if(this.gettmlx(cu)==1||this.gettmlx(cu)==3){ cu.mpanswerdtolist.forEach((item,inde)=>{ if(item.replyType==2){ item.optionNameArr = item.optionName.split('%s') if(item.contentType&&!Array.isArray(item.contentType)){ item.fillValues = {} console.log(item.contentType,'item.contentType') item.contentType = item.contentType.split('#') item.rules = item.contentType.map((kk,ink)=>{ let rules={} if(kk=='0'){ rules.tag='el-input' item.fillValues[ink+''] = '' }else if(kk=='1'){ rules.tag='el-input-number' item.fillValues[ink+''] = undefined }else if(kk=='2'){ rules.tag='el-input-number' item.fillValues[ink+''] =undefined } return rules }) console.log(item.contentType,'item.contentType') console.log(item.fillValues,'item.fillValues') console.log(item.rules,'item.rules') if(item.contentRule&&item.contentRule.length){ item.contentRule = JSON.parse(item.contentRule) item.contentRule.map((kk,ink)=>{ var ins = Number(kk.number)-1 var arrr = kk.scope.split(',') var sco = [arrr[0].substring(1),arrr[1].substring(0,arrr[1].length-1)] console.log(sco,'sco') console.log(item.contentType,'item.contentType') if(item.contentType[ins]=='0'){ item.rules[ins].minlength = sco[0] item.rules[ins].maxlength = sco[1] }else if(item.contentType[ins]=='1'){ if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } item.rules[ins].step = 1 }else if(item.contentType[ins]=='2'){ item.rules[ins].precision = kk.decimal if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } } return 11 }) } }else{ } console.log(item.optionNameArr,'item') }else{ item.optionNameArr = [item.optionName] } }) } console.log(cu,'cu') console.log(JSON.stringify(this.currentList),'this.currentList') return cu }, calculatedPercentage() { if (!this.questionList.length) { return 0; // 避免除零错误 } return (this.current / this.questionList.length) * 110; }, calctmlx(){ if(this.currentListlast&&this.currentListlast.questiontype==2&&this.currentListlast.ismult==0){ return 1 } //填空 if(this.currentListlast&&this.currentListlast.questiontype==1&&this.currentListlast.replytype==2){ return 2 } if(this.currentListlast&&this.currentListlast.questiontype==2&&this.currentListlast.ismult==1){ return 3 } //排序题 if(this.currentListlast&&this.currentListlast.questiontype=='7'&&this.currentListlast.replytype=='1'){ return 4 } //无选项排序题 if(this.currentListlast&&this.currentListlast.questiontype=='7'&&this.currentListlast.replytype=='2'){ return 5 } //滑块题 if(this.currentListlast&&this.currentListlast.questiontype=='8'&&this.currentListlast.replytype=='2'){ return 6 } } }, watch:{ current:{ handler(val){ console.log(11) if(!val) return var that = this var cur = that.questionList[val-1] if(cur.questiontype==1&&cur.replytype==0){ that.current++ return } if(cur.parentno!=0){ if(that.currentList[0]?.parentno!=0){ that.currentList.unshift(cur) }else{ that.currentList = [] that.currentList.unshift(cur) } that.aaa(cur) }else{ var length = that.currentList.length that.currentList = [] that.currentList.unshift(cur) } console.log(that.currentList,'that.currentList----------------') }, immediate: true }, }, created: function(){ /*if(window.___questionList){ this.questionList = window.___questionList this.current= this.current==0? 1:this.current console.log(this.questionList,'this.questionList') }else{ this.gettmlist() }*/ this.sjid = localStorage.getItem('sjid') this.User = JSON.parse(localStorage.getItem('user')) this.answererInfo = JSON.parse(localStorage.getItem('answererInfo')) this.gettmlist() this.startTime = new Date().getTime(); }, mounted: function(){ }, beforeDestroy(){ if(window.___questionList){ window.___questionList = null } }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-questionTree", function(resolve, reject){ var template = "
\n
\n 一、在过去的两周内,有多少时候您被以下问\n
\n
\n
\n \n 1、做事时提不起劲或没有兴趣。做事时提不起劲或没有兴趣。做事时提不起劲或没有兴趣。做事时提不起劲或没有兴趣。做事时提不起劲或没有兴趣。做事时提不起劲或没有兴趣。\n \n
\n
\n
\n 1、做事时提不起劲或没有兴趣。\n
\n
\n 单选\n
\n
\n
\n
\n 近半年你每天睡觉时间为小时\n
\n
\n 填空\n
\n
\n
\n
\n A、完全不会\n
\n\n
\n
\n
\n {{index+1}}\n
\n\n
\n
\n
\n A、完全不会\n
\n\n
\n
\n
\n\n \n
\n
\n
\n \n 上一题\n \n 下一题\n \n \n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), denominator: 16, activeIndex: -1, status:5, activeIndex: [] }; }, methods: { previous(){ this.status-- }, next(){ this.status++ }, toggleActive(index) { const that = this if (that.activeIndex.includes(index)) { that.activeIndex = that.activeIndex.filter(item => item !== index); } else { that.activeIndex.push(index); } } }, computed: { calculatedPercentage() { if (this.denominator === 0) { return 0; // 避免除零错误 } return (this.status / this.denominator) * 110; } }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-evaluation5-view", function(resolve, reject){ var template = "
\n
\n
\n
\n 北京市小学生第一次心理在线测评\n
\n
\n {{status+1}} / {{denominator}}\n
\n
\n \n
\n
\n \n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), denominator: 16, activeIndex: -1, status:5, activeIndex: [] }; }, methods: { previous(){ this.status-- }, next(){ this.status++ }, toggleActive(index) { const that = this if (that.activeIndex.includes(index)) { that.activeIndex = that.activeIndex.filter(item => item !== index); } else { that.activeIndex.push(index); } } }, computed: { calculatedPercentage() { if (this.denominator === 0) { return 0; // 避免除零错误 } return (this.status / this.denominator) * 110; } }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-test", function(resolve, reject){ var template = "
\n 1223232\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid() }; }, methods: { }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-aggers-view", function(resolve, reject){ var template = "
\n \n
\n \n
\n \n 提交\n \n
\n \n
\n
\n {{info.tyhmc}}\n
\n
\n\n
\n
\n
\n 点 击 签 字\n
\n
\n\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { dialogVisible: false, signaturePad:'', blob:'', file:'', dataURL:'', info:'', tyhid:'', username:'', isWiderScreen: false }; }, methods: { checkScreenWidth() { if (document.documentElement.clientWidth < 600) { this.isWiderScreen = true; } else { this.isWiderScreen = false; } }, openSignatureDialog() { this.dialogVisible = true; this.$nextTick(() => { this.initSignaturePad(); }); }, initSignaturePad() { let canvas = document.getElementById('canvas'); // 创建 SignaturePad let options = { penColor: 'rgb(0,0,0)', minWidth: 5, maxWidth: 10, }; this.signaturePad = new SignaturePad(canvas, options); this.resizeCanvas(); }, back(){ this.$router.push('evaluation') }, getTyh(){ const that = this; let data = { tyhid:that.tyhid, username:that.username } $.post("/www/public/tyh/gettyhzj", data, function(res){ if(res.code==200&&res.data!==null){ that.info = res.data if(res.data.isqs==1){ that.$router.push('evaluations') } }else{ that.$message({ type: "error", message: '服务错误' }) } }) }, resizeCanvas() { let canvas = document.getElementById('canvas') let ratio = Math.max(window.devicePixelRatio || 1, 1) canvas.width = canvas.offsetWidth * ratio canvas.height = canvas.offsetHeight * ratio let context = canvas.getContext('2d') context.scale(ratio, ratio) var signTitle = document.querySelector('.signTitle'); canvas.addEventListener('mouseenter', function() { signTitle.style.display = 'none'; }); canvas.addEventListener('mouseleave', function() { signTitle.style.display = 'block'; }); }, /**根据图片的 Base64 编码,把内容显示到签名板上*/ redisplay() { this.signaturePad && this.dataURL && this.signaturePad.fromDataURL(this.dataURL) }, /*清除签名板内容*/ clear() { this.signaturePad.clear() this.dataURL = null }, /*获取签名板内容(图片的 Base64 编码)*/ save() { this.dataURL = this.signaturePad.toDataURL() console.log( this.dataURL) let data = { tyhid:this.info.id, imgurl:this.dataURL, username:this.username } console.log(data) const that =this $.post("/www/public/tyh/savetyhzj", data, function(res){ if(res.code==200){ that.$message.success('提交成功'); that.dialogVisible=false that.$router.push('success') }else{ that.$message({ type: "error", message: res.message }) } }) }, base64ToBlob(dataURL) { console.log(dataURL) let arr = dataURL.split(',') let mimeType = arr[0].match(/:(.*?);/)[1] || 'image/png' let encodeStr = atob(arr[1]) let n = encodeStr.length let u8Arr = new Uint8Array(n) while (n--) { u8Arr[n] = encodeStr.charCodeAt(n) } return new Blob([u8Arr], { type: mimeType }) }, //转换成file blobToFile(blob, fileName) { // MIME Type const type = blob.type || 'text/plain' return new File([blob], fileName, { type }) }, //生成图片 scImg(){ let blob = this.base64ToBlob(this.dataURL) this.file = this.blobToFile(blob, '签名图片.png') console.log(this.file) }, }, created: function(){ }, mounted: function(){ this.checkScreenWidth(); window.addEventListener('resize', this.checkScreenWidth); this.username = this.$route.query.username; this.tyhid = this.$route.query.tyhid; this.getTyh() let canvas = document.getElementById('canvas') // 创建 SignaturePad let options = { penColor: "rgb(66, 133, 244)", minWidth: 5, maxWidth: 10, } this.signaturePad = new SignaturePad(canvas, options); this.resizeCanvas() }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-logins-view", function(resolve, reject){ var template = "\n"; return (function(template, resolve, reject){ var store = new Vuex.Store({ state: { accessToken:'', userInfo:{}, user:{}, }, mutations: { accessToken(state, accessToken) { state.accessToken = accessToken; }, userInfo(state, userInfo) { state.userInfo = userInfo; }, user(state, user) { state.user = user; }, } }); seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dialogVisibles:false, forms: { oldpassword: '', newpassword: '', confirmNewpassword: '' }, ruless: { oldpassword: [ { required: true, message: '请输入当前密码', trigger: 'blur' } ], newpassword: [ { required: true, message: '请输入新密码', trigger: 'blur' }, { pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[@$!%*?&=])[A-Za-z\d@$!%*?&=]{8,14}$/, message: '密码格式不符合要求,需包含字母、数字和特殊字符,长度8-14位', trigger: 'blur' } ], confirmNewpassword: [ { required: true, message: '请再次输入新密码', trigger: 'blur' }, { validator: this.validatePasswordMatch, trigger: 'blur' } ] }, codesrc:'/owin/api/authcode?q=2069', ruleForm:{ name:'', }, rules: { name: [ { required: true, message: '请输入姓名', trigger: 'blue' } ], }, tyhid:'', }; }, methods: { rulesInput(formName){ this.$refs[formName].validate((valid) => { if (valid) { this.goHome() } else { return false; } }); }, rulesInputs(formName){ $.post("/www/public/mh/get_pgsxx", {}, function(res){ }) }, goHome(){ const that = this this.getCodeSrc() let data = { username:this.ruleForm.name, tyhid:this.tyhid } $.post("/www/public/tyh/gettyhzj", data, function(res){ if(res.code==200&&res.data!==null){ that.$router.push({ path: "aggers", query: { username:that.ruleForm.name, tyhid:that.tyhid }, }); }else{ that.$message({ type: "error", message: res.message }) } }) }, getCodeSrc(){ this.codesrc = this.codesrc.replace(/\d+$/, parseInt(Math.random()*10000)) }, saves() { const that = this that.$refs.formRefs.validate((valid) => { if (valid) { const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data = { ...that.forms } $.post("/www/public/shangbao/editPassword", data, function(res){ if(res.error==0){ that.$message.success('修改成功') that.dialogVisible =false }else{ that.$message.error(res.message) } }) } else { console.error('表单验证失败'); return false; } });}, }, created: function(){ }, mounted: function(){ let hash = window.location.hash; let queryString = hash.substring(hash.indexOf('?') + 1); let params = new URLSearchParams(queryString); this.tyhid = params.get('tyhid'); console.log(this.tyhid); $.post("/owin/api/authcode", {}, function(res){ if(res.code==200){ } }) }, store: store, watch:{ //监听参数中的 props.markerLists 变化 $route:{ handler(newValue, oldValue){ if(newValue.query.otype == '0'){ this.routerAcitve = '/evaluation' }else if(newValue.query.otype == '1'){ this.routerAcitve = '/interview' }else{ this.routerAcitve = newValue.path } }, // 深度侦听需要遍历被侦听对象中的所有嵌套的属性,当用于大型数据结构时,开销很大。 // 因此请只在必要时才使用它,并且要留意性能。 deep: true, }, }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-success-view", function(resolve, reject){ var template = "
\n
\n
\n 提交成功!\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid() }; }, methods: { }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-beforeEvaluations-view", function(resolve, reject){ var template = "
\n

\n 返回\n

\n
\n

\n 测评须知\n

\n \n \n \n \n \n \n \n
\n
学校:{{data.xxmc}}
\n
班级:{{data.rxnf}}/{{data.bj}}
\n
班级:{{data.zy}}/{{data.bj}}
\n
\n
4\">\n
学校:{{data.xxmc}}
\n
专业:{{data.zy}}
\n
班级:{{data.rxnf}}/{{data.bj}}
\n \n
\n
4\">\n
年级:{{data.rxnf}}
\n
班级:{{data.bj}}
\n\n \n
\n \n
答题人:{{data.xm||data.glyxm}}
学校:{{data.xxmc}}
\n
\n 亲爱的同学:\n

\n 欢迎你来参加本次心理测试活动!请注意关于本次测评的说明及答题注意事项。\n

\n

\n 本次心理测评由学校统一为同学们提供,测评的目的是帮助同学们更好地理解自己、认识自己、完善自己,展现出更精彩的自我风貌。\n

\n

\n 心理测评的结果是严格保密存档的,结果主要用于了解我校学生的心理特点,为更好地为同学们开展心理健康教育与服务工作提供科学依据。请同学们不要顾虑。\n

\n

\n 心理测评不是考试,答案没有对错之分,请同学们在答题时不要反复思考,按照自己的第一反应真实回答即可。请尽量把自己最真实的情况反映在问卷上。不用去猜测怎样填才是最好的,最真实的答案就是最好的答案。\n

\n
\n \n \n
\n 开始答题\n \n
\n
\n \n 操作手册 >\n \n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid() , data:{}, njMap:{ '1':'一年级', '2':'二年级', '3':'三年级', '4':'四年级', '5':'五年级', '6':'六年级', }, xdMap:{ '1':'小学', '2':'初中', '3':'高中', '4':'中职', '5':'高职', '6':'高教', '7':'本科', '8':'硕士', '9':'博士', }, questionList:[] } }, methods: { goback(){ this.$router.go(-1) }, goEaluation(){ this.$router.push('/evaluationsPages') }, clearUser(){ localStorage.removeItem('user') }, getInfo(){ var that = this $.post("/www/public/st/getcpuserinfo", {}, function(res){ if(res.success==1){ if(!res.data){ res.data = { "xm": "信息员", "xb": "2", "lxfs": "", "sfbzr": "", "sfxlls": "", "sfxxfzr": "", "xxjd": "", "glbj": "", "createtime": "", "xxid": "", "xxmc": "测试学校", "pc": "", "yx": "", "isdel": "", "sfrkjs": "", "userid": "", "cpzt": "", "roles": "", "dtcnt": null, "dttime": null, "jllx": null } } that.data = res.data localStorage.setItem('answererInfo', JSON.stringify(res.data)) if(res.data.jllx==1){ //that.$message.warning('您已经答过题了') vant.Toast({ message:'您已经答过题了', icon: 'warning-o', }) setTimeout(()=>{ that.$router.push('/evaluationsDone') },1000) } }else{ that.$message({ type: "error", message: '服务错误' }) } }) }, gettmlist(item){ var that = this const params = { sjid:this.sjid } axios({ method: 'get', url:'/www/public/st/gettmlist', params: { ...params }, responseType: 'blob' }).then(response=>{ if(response.request.status==200){ let data = response.data const reader = new FileReader() reader.readAsArrayBuffer(response.data) reader.onload = () =>{ const compressedData = new Uint8Array(reader.result); const result = JSON.parse(pako.ungzip(compressedData, { to: 'string' })); let res = {data:result} that.questionList = res.data window.___questionList = res.data } }else{ this.$message.error('题目获取失败') } }).catch(err=>{ console.log(err) this.$message.error('题目获取失败') }) }, gettmlist1(){ var that = this const data = { sjid:this.sjid } console.log(data) $.post("/www/public/st/gettmlist", data, function(res){ if(res.code==200&&res.data){ that.questionList = res.data window.___questionList = res.data }else{ that.$message({ type: "error", message: res.message }) } }) }, }, created: function(){ if(this.$route.query.gaugeId){ this.sjid = this.$route.query.gaugeId localStorage.setItem('sjid',this.sjid) this.getInfo() this.gettmlist() } }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-evaluationsDone-view", function(resolve, reject){ var template = "
\n

\n 返回\n

\n
\n
\n

\n {{toolname}}\n

\n
\n
\n \"\"\n

\n 完成测评\n

\n
\n\n \n\n \n \n \n \n \n \n \n\n
\n
学校:{{data.xxmc}}
\n
联系电话:{{data.lxfs||'--'}}
\n
\n
\n
所在年级:{{xdMap[data.xxjd]+njMap[data.nj]}}
\n
所在班级:{{data.bjmc}}
\n
\n \n
学校:{{data.xxmc}}
答题人:{{data.xm||data.glyxm}}
\n\n\n
\n\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), data:{xm:'',xh:'',xxmc:'',bjmc:'',time:'',answerNumber:''}, time:'', njMap:{ '1':'一年级', '2':'二年级', '3':'三年级', '4':'四年级', '5':'五年级', '6':'六年级', }, xdMap:{ '1':'小学', '2':'初中', '3':'高中', '4':'中职', '5':'高职', '6':'高教', '7':'本科', '8':'硕士', '9':'博士', }, toolname:'' }; }, methods: { goback(){ this.$router.go(-2) }, getInfo(){ var that = this $.post("/www/public/st/getcpuserinfo", {}, function(res){ if(res.success==1){ if(!res.data){ res.data = { "xm": "信息员", "xb": "2", "lxfs": "", "sfbzr": "", "sfxlls": "", "sfxxfzr": "", "xd": "", "glbj": "", "createtime": "", "xxid": "", "xxmc": "测试学校", "pc": "", "yx": "", "isdel": "", "sfrkjs": "", "userid": "", "cpzt": "", "roles": "", "dtcnt": null, "dttime": null, "jllx": null } } that.data = res.data }else{ that.$message({ type: "error", message: '服务错误' }) } }) }, }, created: function(){ this.time = this.$route.query.time this.answerNumber = this.$route.query.answerNumber this.toolname = this.$route.query.toolname this.getInfo() }, mounted: function(){ setTimeout(()=>{ /* localStorage.removeItem('user') */ localStorage.removeItem('userInfo') localStorage.removeItem('answererInfo') localStorage.removeItem('sjid') localStorage.removeItem('saveredistm') },500) }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-interviewLS-view", function(resolve, reject){ var template = "
\n \n \n
\n
\n
\n
\n 已访谈\n
\n
\n 待访谈\n
\n\n
\n
\n
\n \n\n \n
\n \n 保密书协议 \n 操作手册 \n
\n\n
\n
\n
\n
\n
\n \n
\n
\n {{ item.xsmc }} \n
\n
\n
\n
\n 学校:{{ item.xxmc }}\n
\n
\n 年级:{{ item.nj }}\n
\n
\n 学号:{{ item.xsxh }}\n
\n
\n 班级:{{ item.bj }}\n
\n
\n 联系方式:{{ item.xssjh }}\n
\n
\n
\n \n \n
\n
\n 查看详情\n
\n\n
\n
\n\n
\n

\n 如遇技术问题请拨打:吴周鑫18679237019 王伟超15246953118\n

\n \n
\n
\n \n
\n \n \n
\n 扫码签署知情书\n
\n
\n
\n\n
\n\n
\n \n
取消
\n \n
下一步
\n
\n \n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), interviewType: '1', renderList1: false, renderList2: false, input:'', item:'', dialogVisible: false, dialogVisible1:false, index:'', qrcode:'', status:'' }; }, methods: { goBack(){ this.$router.push('ftInterviewHomepage') }, getQRcode(){ document.getElementById("qrcode").innerHTML = ''; let that = this new QRCode(document.getElementById("qrcode"), { width: '200',//宽 height: '200',//高 text: that.qrcode,//二维码内容 colorDark : "#000000", colorLight : "#ffffff", correctLevel : QRCode.CorrectLevel.H, }); }, next(){ if(this.index==1){ if(this.item.xd<5){ localStorage.setItem('stuItem', JSON.stringify(this.item)); localStorage.setItem('stuStatus', JSON.stringify('1')); this.$router.push({ path: '/operatingManual', }); }else{ localStorage.setItem('stuItem', JSON.stringify(this.item)); localStorage.setItem('stuStatus', JSON.stringify('1')); this.$router.push({ path: '/operatingManual', }); } } if(this.index==2){ if(this.item.xd<5){ localStorage.setItem('stuItem', JSON.stringify(this.item)); localStorage.setItem('stuStatus', JSON.stringify('2')); this.$router.push({ path: '/ftxslc', }); }else{ localStorage.setItem('stuItem', JSON.stringify(this.item)); localStorage.setItem('stuStatus', JSON.stringify('2')); this.$router.push({ path: '/ftxslc', }); } } }, start(){ if(this.index ==1){ this.dialogVisible =false localStorage.setItem('stuItem', JSON.stringify(this.item)); localStorage.setItem('stuStatus', JSON.stringify('1')); this.$router.push({ path: '/interviewInfoLS', }); } if(this.index ==2){ this.dialogVisible =false localStorage.setItem('stuItem', JSON.stringify(this.item)); localStorage.setItem('stuStatus', JSON.stringify('2')); this.$router.push({ path: '/interviewInfoOnline', }); } }, down0(){ this.dialogVisible1=true }, down(type){ if (type === 'basic') { this.dialogVisible = true; const fileUrl = '/content/image/xljkImg/tys.docx'; const fileName = '基教访谈知情书.docx'; const link = document.createElement('a'); link.href = fileUrl; link.setAttribute('download', fileName); document.body.appendChild(link); link.click(); document.body.removeChild(link); } else if (type === 'advanced') { const fileUrl = '/content/image/xljkImg/gjtys.docx'; const fileName = '高教访谈知情书.docx'; const link = document.createElement('a'); link.href = fileUrl; link.setAttribute('download', fileName); document.body.appendChild(link); link.click(); document.body.removeChild(link); } this.dialogVisible = false; }, down1(){ const fileUrl = '/content/image/xljkImg/ftsc.pdf'; const fileName = '访谈操作手册.pdf'; const link = document.createElement('a'); link.href = fileUrl; link.setAttribute('download', fileName); document.body.appendChild(link); link.click(); document.body.removeChild(link); }, changes(){ this.getList() }, open(item,index) { let data = { ftid:item.id } $.post("/www/public/shouye/ft_getstutyhewm", data, (res) => { if (res.error == 0) { this.qrcode = res.data.qrcode this.getQRcode() } }); this.index = index this.item=item this.next() // this.dialogVisible =true }, open0(item){ if(item.xd<5){ localStorage.setItem('stuItem', JSON.stringify(item)); this.$router.push({ path: '/interviewDetails', }); }else{ localStorage.setItem('stuItem', JSON.stringify(item)); this.$router.push({ path: '/interviewDetailsGj', }); } }, getList() { var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} let data = { ss: this.input, ftlsid: user.ID, iftest:this.status }; $.post("/www/public/shouye/ft_stulist", data, (res) => { if (res.code === 200) { this.dataList = res.data; this.groupDataList(); } }); }, groupDataList() { this.renderList1 = []; this.renderList2 = []; this.dataList.forEach(item => { if (item.yyzt == 1) { this.renderList1.push(item); } else if (item.yyzt == 0) { this.renderList2.push(item); } }); console.log(this.renderList1) console.log(this.renderList2) }, toggleInterviewType(type) { this.interviewType = type; if (this.interviewType !== type) { this.interviewType = type; if (type === '0') { this.renderList1 = true; this.renderList2 = false; } else if (type === '1') { this.renderList1 = false; this.renderList2 = true; } } }, getImgsrc(val) { return "/content/image/xljkls/"+val }, }, created: function(){ this.status = this.$route.query.status ? this.$route.query.status : '0'; this.getList() }, computed: { currentList() { return this.interviewType == '0' ? this.renderList1 : this.renderList2; } }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-interviewInfoLS-view", function(resolve, reject){ var template = "
\n \n \n\n \n {{ isRecording ? '停止测试' : '测试录音' }}\n 播放\n 下一步\n \n \n
\n | 学生访谈\n
\n
\n
\n
\n \n
\n
\n
\n {{ item.xsmc }} \n
\n
\n
\n 学校:{{ item.xxmc }}\n
\n
\n 年级:{{item.xd==1?'小学':item.xd==2?'初中':item.xd==3?'高中':\n item.xd==4?'中职':\n item.xd==5?'高职':\n item.xd==7?'本科':\n item.xd==8?'硕士':\n item.xd==9?'博士':''}}{{ item.nj }}年级\n
\n
\n 学号:{{ item.xsxh }}\n
\n
\n 班级:{{ item.bj }}\n
\n
\n 联系方式:{{ item.xssjh }}\n
\n
\n
\n
\n
\n 开始
录音\n
\n
\n 暂停
录音\n
\n
\n 继续
录音\n
\n

{{ formatTime(recordingTime) }}

\n
\n\n
\n\n\n\n\n
\n \n
\n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : calctmlx == 4||calctmlx == 5 ? '排序题' : calctmlx == 6?'滑块题':''}}\n \n \n \n {{currentList[0]?.questioncontent.split('%s')[indd]}}\n \n \n \n
\n
\t\n
\n \n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : calctmlx == 4||calctmlx == 5 ? '排序题' : ''}}\n \n\n\n \n \n {{currentList[1]?.questioncontent.split('%s')[indd2]}}\n \n \n\n \n
\n \n
\n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : calctmlx == 4||calctmlx == 5 ? '排序题' : ''}}\n \n \n \n {{currentList[2]?.questioncontent.split('%s')[indd3]}}\n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n\n \n {{item.optionNameArr[ind]}}\n \n __\n \n
\n
\n
\n \n
\n
\n \n \n {{item.optionNameArr[ind]}}\t\n \n \n \n \n
\n
\n \n
\n
\n
\n \n {{item.optionNameArr[ind]}}\n \n __\n \n
\n
\n
\n\n \n
\n
\n
\n \n {{item.optionNameArr[ind]}}\n \n __\n \n
\n
\n \n
\n
\n
\n
\n \n {{current==questionList.length?'提 交':'下 一 题 '}}\n \n \n
\n
\n
\n
\n \n \n \n ---\n \n \n {{ ftyypg }} 分\n \n \n {{ ftzspg }} 分\n \n \n \n ---\n \n \n {{ftyywb}}\n \n \n \n {{ftzswb}}\n \n \n \n \n
\n 转介建议:\n 十分感谢你参与本次访谈!通过我们的谈话内容,听上去你最近在学习和生活上似乎没有多少困扰,有时出现一些小的困扰,你也能够自己解决,或在他人(家长、老师、同学、朋友等)的帮助下顺利解决,这非常棒!如果以后出现新的困扰或挑战,我也鼓励你尝试跟老师、家长或你的同学/朋友聊一聊,通过他们的帮助、支持,以及你自己的应对方法,及时做出自我调整、灵活应对出现的困扰或挑战。本次访谈到这里就结束了,如果你没有其他问题的话就可以回教室啦,再见!\n 十分感谢你参与本次访谈!通过我们的谈话内容,听上去你最近在学习和生活上似乎有一些困扰,有时你会因为这些困扰感到低落、难过、沮丧或愤怒。我们都理解这些是一些很常见、很正常的情绪反应,每个人在某个阶段可能都会有相似的感受。所以鼓励你尝试跟老师、家长或你的同学/朋友聊一聊,听听他们的建议,通过他们的帮助、支持,以及你自己的应对方法,及时做出自我调整,更有力地应对与解决现在面临的这些困扰。本次访谈到这里就结束了,如果你没有其他问题的话,就可以回教室啦,祝你一切顺利,再见!\n 十分感谢你参与本次访谈!通过我们的谈话内容,听上去你最近在学习和生活上似乎有一定的困扰,你可能经常会因为这些困扰感到低落、难过、沮丧、或感到无力、无助、没有希望、甚至有想结束自己生命的想法等等。我们都理解当人们所面对的困扰和压力越大时,这些情绪和感受越容易出现。所以鼓励你尝试跟老师、家长或你的同学/朋友聊一聊,听听他们的建议;或去专业的心理健康服务机构或医院,听听专业人员的建议。通过他们的帮助、支持,以及你自己的应对策略,及时做出自我调整,更有力地应对与解决现在面临的这些困扰。本次访谈到这里就结束了,如果你没有其他问题的话,就可以回教室啦,祝你一切顺利,再见!\n 十分感谢你参与本次访谈!通过我们的谈话,听上去你最近在学习和生活上似乎有一定的困扰,你可能经常会因为这些困扰感到低落、难过、沮丧、或感到无力、无助、没有希望、想到结束自己的生命等。我们都理解当人们所面对的困扰和压力越大时,这些情绪和感受越容易出现。所以我会鼓励你把自己的困扰和压力尝试跟老师、家长或你的同学/朋友聊一聊,听听他们的建议;或去专业的心理健康服务机构或医院,寻求专业人员的帮助。通过他们的帮助、支持,以及你自己的应对策略,及时做出自我调整,更有力地应对与解决现在面临的这些困扰。本次访谈到这里就结束了,如果你没有其他问题的话,就可以回教室啦,祝你一切顺利,再见!\n
\n
\n 学校层面:\n
(1)\t建议学校立即启动学生危机干预预案,及时联系学生家长并通知其到校协助危机干预与转介,由校级危机干预工作组成员陪同学生直至家长到校,避免让学生独处;
\n
(2)\t建议学校为家长提供心理危机相关的心理健康教育,帮助家长理解其严重性和紧急性;
\n
(3)\t建议学校将心理危机档案及时提供给家长并协助家长及时带孩子到当地相关专科医院或社区医院相关科室就医。
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 取消\n 提交\n \n \n \n
\n
\n \n
\n
\n 完成访谈\n
\n
\n 感谢您完成本次访谈!\n
\n
\n \n
好的
\n
\n \n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), item:'', openId:'', denominator: 16, activeIndex: -1, status:6, activeIndexs: [], input:'', textarea:'', questionList:[], current:0, currentList:[], ttMap:{}, loading:false, nextloading:false, evaId:'', //evaId:'', answerNumber:0, startTime:'', toolname:'', statusButton:true, colorMap:['','#067EFF','#FF8A0D','#3F23FF'], questionListbk:[], User:{}, questionAnswers:[ ], mediaRecorder: null, chunks: [], recording: false, recordingstatus: '', form:{ sfzdgy:'', sfcxzz:'', ftyj:'' }, dialogVisible: false, ftjlpg:'', ftyypg:'', ftzspg:'', lbid:'', score:0, dialogVisible1:false, isRecording: false, recorder: null, recordedChunks: [], audioUrl: null, yytm:[], zstm:[], tstm:[], tstmdf:0, tstmmzf:'', yytmdf:0, zstmdf:0, ftyywb:'', ftzswb:'', cur:'', lystatus:true, newTtMap:{}, Tg:false, yyjfft1df:0, yyjfft2df:0, yyjdqScoreSum:0, yyjdqSpecialScore:0, yyjwScoreSum1:0, yyjwScoreSum2:0, yyjwSpecialScore1:0, yyjwSpecialScore2:0, zsdf:0, jkza1df:0, tsjkza1df:0, tsjkza2df:0, sjjl1df:0, sjjl2df:0, sjjl3df:0, ftjlpg:'', ftsjpg:'', ftjkpg:'', ftsjwb:'', ftjkwb:'', ftjlwb:'', zszt:'', jlzt:'', yyzt:'', sjzt:'', jkzt:'', html1:'', html2:'', html3:'', html4:'', html5:'', html6:'', rules: { sfzdgy: [ { required: true, message: '此处是必填项', trigger: 'blur' }, ], sfcxzz: [ { required: true, message: '此处是必填项', trigger: 'blur' }, ], ftyj: [ { required: true, message: '此处是必填项', trigger: 'blur' }, ], }, lystatus: false, recordingTime: 0, timer: null, hasMicrophonePermission:false }; }, methods: { getredistm(){ var that = this var tmlist = localStorage.getItem('saveredistm') if(tmlist){ tmlist = JSON.parse(tmlist) that.questionAnswers = tmlist.answerList that.current = tmlist.current //that.current = 86 return } $.post("/www/public/st/getredistm", {stid:that.questionList[0]?.sjid}, function(res){ if(res.code==200){ if(res.data){ /*that.questionListbk = res.data let len =that.questionListbk.length let lastAnswer = that.questionListbk[len-1] if(len&&len>1){ res.data.forEach(item=>{ }) that.evaId = that.questionListbk[0] that.questionList[len-2].answer = lastAnswer that.current = len-1 //that.current = 194 }else{ that.current = 1 }*/ that.newTtMap = res.data.newTtMap that.questionAnswers = res.data.answerList that.current = res.data.current console.log(that.questionAnswers,'that.questionAnswers') }else{ that.current = 1 } }else{ that.current = 1 } //that.current = 86 //that.current = 220 }) }, goList(){ this.$router.push('interviewLS') }, open() { this.$alert('点击确定按钮开始答题。', '准备答题', { confirmButtonText: '确定', callback: action => { } }); }, previous(){ //this.status-- }, saveAll(){ console.log(this.Tg) if(this.current!=this.questionList.length&&this.Tg==false) return if(this.recording){ this.stopRecording() } this.Tg=false this.endTime = new Date().getTime() const that = this that.loading = true that.nextloading=true var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} let data = { stuid:this.item.xsid, xm:this.item.xsmc, xxid:this.item.xx, xxmc:this.item.xxmc, nj:this.item.nj, bjid:this.item.bjid, bjmc:this.item.bj, xd:this.item.xd, ujs:this.item.yhjs, nfpc:this.item.xnd, questionAnswers:JSON.stringify({ toolId:this.currentListlast.toolid, openQuestionAnswerVOS:this.questionAnswers }), stid:this.questionList[0].sjid, dtcnt:this.answerNumber, dttime:this.calculateTimeDifference(this.startTime,this.endTime), ftid:this.item.id, ftyypg:this.yytmdf, ftzspg:this.zstmdf, ftyywb:this.ftyywb, ftzswb:this.ftzswb, ftxs:'2' } $.post("/www/public/shouye/ft_newsaveda", data, (res) => { if (res.error == 0) { this.ftjlpg = res.data.ftjlpg this.ftyypg=res.data.ftyypg this.ftzspg = res.data.ftzspg this.ftyywb=res.data.ftyywb, this.ftzswb=res.data.ftzswb this.lbid=res.data.id this.statusButton=false }else{ this.$message({ type: "error", message: res.message }) } }); }, calculateTimeDifference(startTime, endTime) { let timeDiff = endTime - startTime; let hours = Math.floor(timeDiff / (1000 * 60 * 60)); let minutes = Math.floor((timeDiff % (1000 * 60 * 60)) / (1000 * 60)); let seconds = Math.floor((timeDiff % (1000 * 60)) / 1000); return `${hours}时${minutes}分${seconds}秒`; }, submitSingle(){ // 在这里检查标志变量,决定是否执行后续代码 if (this.hasMicrophonePermission) { // 执行后续代码,例如调用 submitSingle() 方法 console.log("已获得麦克风权限,执行后续操作。"); } else { // 没有权限的处理逻辑 console.log("没有麦克风权限,无法执行后续操作。"); this.$message({ type: "error", message: "授权失败!请检查麦克风权限。" }) return } if(!this.recording){ this.startRecording() } var that = this if(that.loading) return that.loading = true console.log(that.currentListlast,'222222') if(that.currentListlast.questiontype==99){ that.next() return } var answer = that.currentListlast.answer if(that.calctmlx==1){ if(!answer||!answer.answerId){ that.loading = false return vant.Toast({ message:'请先选择/填写答案', icon: 'warning-o', }) //return that.$message.warning('请先答题') } }else if(that.calctmlx==2){ var inputContent = '' for(let iii = 0;iii{ if(item.fillValues){ console.log(item.fillValues,'item.fillValues') var keys = Object.keys(item.fillValues) keys.forEach(ii=>{ if(!item.fillValues[ii]){ mflag = true } }) } }) if(mflag){ return vant.Toast({ message:'选中选项有信息需未填写', icon: 'warning-o', }) } } }else{ if(Array.isArray(answer)&&!answer.length){ that.loading = false return vant.Toast({ message:'请先选择/填写答案', icon: 'warning-o', }) } } var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} var accessToken = localStorage.getItem('accessToken') var data = { toolId:that.currentListlast.toolid, //openId:that.openId, questionId:that.currentListlast.quesbusiid, evaId:that.evaId, } if(that.calctmlx==2){ data.inputContent = inputContent } if(that.calctmlx==1){ data.answerList = [that.currentListlast.answer] } if(that.calctmlx==3){ console.log(that.currentListlast.answer,'that.currentListlast.answer') var list = [] that.currentListlast.answer.forEach(item=>{ var text = '' console.log(item.fillValues) item.optionNameArr.forEach((iii,inn)=>{ var aaa if(item.fillValues){ aaa= item.fillValues[inn+'']?"####"+item.fillValues[inn+'']+"####":'' }else{ aaa = '' } text+=iii+aaa }) list.push({ answerId:item.answerId, answerText:text, }) }) data.answerList = list } let datas = { toolId:that.currentListlast.toolid, accessToken:localStorage.getItem('accessToken'), dadata:JSON.stringify(data) } if(that.calctmlx==3){ let checkboxRefs = that.$refs.checkboxRefs checkboxRefs.forEach(checkbox=>{ let inputbox = checkbox.querySelector('input[type="checkbox"]') inputbox.checked = false }) } if (that.calctmlx == 1) { const currentQuestionNumber = that.current; const scoreOfCurrentQuestion = that.currentListlast.answer.score; console.log('当前题目的题号:', currentQuestionNumber) console.log('需要加的分数:', scoreOfCurrentQuestion); let yyjw1 = ['1', '2', '3', '4', '8', '11', '14', '17', '20', '23', '26']; let yyjw2 = ['1', '2', '3', '4', '8', '33', '34', '35', '36', '37', '38']; let yyjwts1 = ['29']; let yyjwts2 = ['39']; for (let i = 0; i < yyjw1.length; i++) { if (yyjw1[i] == currentQuestionNumber) { that.yyjwScoreSum1 += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjw2.length; i++) { if (yyjw2[i] == currentQuestionNumber) { that.yyjwScoreSum2 += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjwts1.length; i++) { if (yyjwts1[i] == currentQuestionNumber) { that.yyjwSpecialScore1 += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjwts2.length; i++) { if (yyjwts2[i] == currentQuestionNumber) { that.yyjwSpecialScore2 += scoreOfCurrentQuestion; } } console.log(that.yyjwScoreSum1,'既往条件1得分') console.log(that.yyjwScoreSum2,'既往条件2得分') console.log(that.yyjwSpecialScore1,'特殊既往条件1得分') console.log(that.yyjwSpecialScore2,'特殊既往条件2得分') let yyjdq = ['1', '2', '3', '4', '7', '10', '13', '16', '19', '22', '25']; let yyjdqts = ['28']; for (let i = 0; i < yyjdq.length; i++) { if (yyjdq[i] == currentQuestionNumber) { that.yyjdqScoreSum += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjdqts.length; i++) { if (yyjdqts[i] == currentQuestionNumber) { that.yyjdqSpecialScore += scoreOfCurrentQuestion; } } console.log(that.yyjdqScoreSum,'当前条件1得分') console.log(that.yyjdqSpecialScore,'特殊当前条件1得分') let yyjfft1= ['30'] let yyjfft2= ['42'] for (let i = 0; i < yyjfft1.length; i++) { if (yyjfft1[i] == currentQuestionNumber) { that.yyjfft1df += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjfft2.length; i++) { if (yyjfft2[i] == currentQuestionNumber) { that.yyjfft2df += scoreOfCurrentQuestion; } } that.ftyypg = that.yyjwScoreSum1+that.yyjwScoreSum2+that.yyjdqScoreSum+that.yyjwSpecialScore1+that.yyjwSpecialScore2+ that.yyjdqSpecialScore+that.yyjfft1df+that.yyjfft2df console.log(that.ftyypg,'抑郁总分') if (that.yyjdqScoreSum >= 5 && that.yyjdqSpecialScore == 100 && that.yyjfft1df == 1 || that.yyjwScoreSum1 >= 5 && that.yyjwSpecialScore1 == 100 && that.yyjfft1df == 1 || that.yyjwScoreSum2 >= 5 && that.yyjwSpecialScore2 == 100 && that.yyjfft2df == 1) { console.log('抑郁发作-反复'); that.ftyywb ='抑郁发作-反复' that.yyzt ='3' } else if (that.yyjdqScoreSum >= 5 && that.yyjdqSpecialScore == 100) { console.log('抑郁发作-当前'); that.ftyywb ='抑郁发作-当前' that.yyzt ='2' } else if (that.yyjwScoreSum1 >= 5 && that.yyjwSpecialScore1 == 100 || that.yyjwScoreSum2 >= 5 && that.yyjwSpecialScore2 == 100) { console.log('抑郁发作-既往'); that.ftyywb ='抑郁发作-既往' that.yyzt ='1' } else { console.log('无抑郁'); that.ftyywb ='无抑郁' that.yyzt ='0' } //自杀 let zs = ['48','49','50','51','54','55','56','57','58','59','63','64','68']; for (let i = 0; i < zs.length; i++) { if (zs[i] == currentQuestionNumber) { that.zsdf +=scoreOfCurrentQuestion; } } that.ftzspg = that.zsdf console.log(that.ftzspg,'自杀得分') if(that.zsdf>17){ console.log('高度') that.ftzswb='高度' that.zszt ='3' }else if(that.zsdf>=9&&that.zsdf<=16){ console.log('中度') that.ftzswb='中度' that.zszt ='2' } else if(that.zsdf>=1&&that.zsdf<=8){ console.log('低度') that.ftzswb='低度' that.zszt ='1' }else{ console.log('无风险') that.ftzswb='无风险' that.zszt ='0' } //惊恐障碍 let jkza1 = ['166', '167', '168', '169', '170', '171', '172', '173', '174', '175', '176', '177', '178'] let tsjkza1=['164'] let tsjkza2=['179'] for (let i = 0; i < jkza1.length; i++) { if (jkza1[i] == currentQuestionNumber) { that.jkza1df +=scoreOfCurrentQuestion; } } for (let i = 0; i < tsjkza1.length; i++) { if (tsjkza1[i] == currentQuestionNumber) { that.tsjkza1df +=scoreOfCurrentQuestion; } } for (let i = 0; i < tsjkza2.length; i++) { if (tsjkza2[i] == currentQuestionNumber) { that.tsjkza2df +=scoreOfCurrentQuestion; } } that.ftjkpg = that.jkza1df+that.tsjkza1df+that.tsjkza2df console.log(that.ftjkpg,'惊恐障碍得分') if (that.jkza1df >= 4 && that.tsjkza1df == 100 && that.tsjkza2df == 1) { console.log('当前的惊恐障碍'); that.ftjkwb = '当前的惊恐障碍' that.jkzt ='1' } else if (that.jkza1df == 13) { console.log('终生的有限惊恐障碍'); that.ftjkwb = '终生的有限惊恐障碍' that.jkzt ='1' } else if (that.jkza1df >= 4 && that.tsjkza1df == 100) { console.log('终生惊恐障碍'); that.ftjkwb = '终生惊恐障碍' that.jkzt ='1' } else { console.log('无障碍'); that.ftjkwb = '无障碍' that.jkzt ='0' } //社交焦虑症 let sjjl1=['183'] let sjjl2=['184'] let sjjl3=['197'] for (let i = 0; i < sjjl1.length; i++) { if (sjjl1[i] == currentQuestionNumber) { that.sjjl1df +=scoreOfCurrentQuestion; } } for (let i = 0; i < sjjl2.length; i++) { if (sjjl2[i] == currentQuestionNumber) { that.sjjl2df +=scoreOfCurrentQuestion; } } for (let i = 0; i < sjjl3.length; i++) { if (sjjl3[i] == currentQuestionNumber) { that.sjjl3df +=scoreOfCurrentQuestion; } } that.ftsjpg =that.sjjl1df+that.sjjl2df+that.sjjl3df console.log(that.ftsjpg,'社交得分') if (that.sjjl2df==0&&that.sjjl1df==1) { console.log('非广泛性社交焦虑症'); that.ftsjwb='非广泛性社交焦虑症' that.sjzt='1' } else if (that.sjjl1df==1&&that.sjjl2df==1) { console.log('广泛性社交焦虑症'); that.ftsjwb='广泛性社交焦虑症' that.sjzt='1' } else { console.log('无'); that.ftsjwb='无' that.sjzt='0' } that.ftjlpg = that.sjjl3df console.log(that.ftjlpg,'焦虑得分') if (that.sjjl3df==1) { console.log('广泛性焦虑'); that.ftjlwb ='广泛性焦虑' that.jlzt='1' } else{ console.log('无'); that.ftjlwb ='无' that.jlzt='0' } } var data = { questionno:that.currentListlast.questionno, questionId:that.currentListlast.quesbusiid, inputContent:'', answerList:[{ answerId:'', answerText:'' }] } if(that.calctmlx==2){ data.inputContent = inputContent } if(that.calctmlx==1){ data.answerList = [{answerId:that.currentListlast.answer.answerId,answerText:''}] } if(that.calctmlx==3){ console.log(that.currentListlast.answer,'that.currentListlast.answer') var list = [] that.currentListlast.answer.forEach(item=>{ list.push({ answerId:item.answerId, answerText:item.answerId, }) }) data.answerList = list } that.questionAnswers.push(data) that.next() /* $.post("/www/public/st/savexfda", datas, function(res){ if(res&&res.code==200){ that.loading = false if(res.data.code==200){ that.evaId = res.data.data that.answerNumber++ that.next() }else{ that.$message({ type: "error", message: res.data.message }) } }else{ that.$message({ type: "error", message: '服务错误' }) that.loading = false } that.loading = false })*/ }, next(){ var that = this console.log(1111111) var answer = this.currentListlast.answer console.log(answer,'answer') //if(!answer||Array.isArray(answer)&&!answer.length) return that.$message.warning('请先答题') if(that.currentListlast.quesjumpquesno!=0){ this.current=this.currentListlast.quesjumpquesno }else if(that.currentListlast.scorejumpquesno!=0){ console.log(1) var scorejumpquesnoArr = that.currentListlast.scorejumpquesno.split(',') var lenth = scorejumpquesnoArr.length var score = answer.score console.log(answer,'answer') if(that.currentListlast.scorejumpnos){ console.log(that.newTtMap,'that.newTtMap') if(that.newTtMap[that.currentListlast.scorejumpnos]){ console.log(that.newTtMap,'that.newTtMap') }else{ console.log(that.newTtMap,'that.newTtMap') that.newTtMap[that.currentListlast.scorejumpnos] = 0 } that.newTtMap[that.currentListlast.scorejumpnos]+=score var arr = that.currentListlast.scorejumpnos.split(",") var th = arr[arr.length-1] var minarr=that.currentListlast.scorejumpmin.split(",") var maxarr=that.currentListlast.scorejumpmax.split(",") if(Number(th)==that.currentListlast.questionno){ let jumped = false for(let j=0;j=Number(minarr[j])&&that.newTtMap[that.currentListlast.scorejumpnos]<=Number(maxarr[j])){ that.current = Number(scorejumpquesnoArr[j]) jumped = true } } if(!jumped){ that.current++ } }else{ that.current++ } /*if(that.newTtMap[that.currentListlast.scorejumpnos]>=Number(this.currentListlast.scorejumpmin)&&that.newTtMap[that.currentListlast.scorejumpnos]<=Number(that.currentListlast.scorejumpmax)&&Number(th)==that.currentListlast.questionno){ console.log(that.currentListlast.scorejumpmax,'that.currentListlast.scorejumpmax') that.current = Number(that.currentListlast.scorejumpquesno) }else{ that.current++ }*/ /*console.log(3) var arr = that.currentListlast.scorejumpnos.split(",") that.ttMap[that.currentListlast.scorejumpnos]?console.log(1): that.ttMap[that.currentListlast.scorejumpnos]= {len:arr.length} var aaa = that.ttMap[that.currentListlast.scorejumpnos] if(score>=Number(this.currentListlast.scorejumpmin)&&score<=Number(this.currentListlast.scorejumpmax)){ aaa.score?aaa.score++:aaa.score=1 } if(aaa.score==aaa.len){ console.log(3) that.current = Number(this.currentListlast.scorejumpquesno) }else{ console.log(4) that.current++ }*/ }else{ if(score>=this.currentListlast.scorejumpmin&&score<=this.currentListlast.scorejumpmax){ that.current = Number(this.currentListlast.scorejumpquesno) console.log(6) }else{ console.log(7) that.current++ } } }else if(this.currentListlast._ansJumpQuesNo){ console.log(8) this.current=this.currentListlast._ansJumpQuesNo }else{ this.current++ console.log(this.current,'this.current111') } const jsonD = { answerList:that.questionAnswers, current:this.current, newTtMap:this.newTtMap } if(this.current<=this.questionList.length){ var aaab = JSON.stringify(jsonD) if(this.current%10==0){ $.post("/www/public/st/ft_saveredistm", {jsonData:aaab,stid:that.questionList[0]?.sjid}, function(res){ }) }else{ // localStorage.setItem('aa','34') localStorage.setItem('saveredistm',aaab) } } //this.activeIndexs = [] if(this.current>this.questionList.length){ this.current=this.questionList.length that.saveAll() }else{ that.loading = false } }, toggleActive(item,index) { if(item.mutexOptionNos){ if(item.mutexOptionNos){ var optionNos = item.mutexOptionNos.split(',') optionNos.forEach(itt=>{ let box = this.$refs.checkboxRefs[itt-1].querySelector('input[type="checkbox"]'); box.checked = false }) } } const checkbox = this.$refs.checkboxRefs[index].querySelector('input[type="checkbox"]'); checkbox.checked = !checkbox.checked; //this.updateCheckboxState(); }, updateCheckboxState() { this.$refs.checkboxRefs.forEach((checkboxRef, index) => { const checkbox = checkboxRef.querySelector('input[type="checkbox"]'); if (checkbox.checked) { this.activeIndexs.push(index); } }); }, gettmlist(){ var that = this const data = { rwxd:that.item.xd, ftid:that.item.id, } $.post("/www/public/shouye/ft_getftlb", data, function(res){ res.data.forEach(item=>{ let tmlx = that.gettmlx(item) if(tmlx==1){ item.answer = {} } //填空 if(tmlx==2){ //判断%s的数量 let _questioncontent = item.questioncontent.replace(/%s/g,'') var zhanweinumber = (item.questioncontent.length - _questioncontent.length)/2 //为0,说明是简答 console.log(zhanweinumber,'zhanweinumber',item.questionno) if(zhanweinumber==0){ item.isJianda = true }else if(zhanweinumber==1&&item.questioncontent.endsWith("%s")){ item.isJianda = true } console.log(item.isJianda,'item.isJianda') if(item.contenttype){ item.contenttype = item.contenttype.split('#') item.rules = item.contenttype.map((kk,ink)=>{ let rules={} if(kk=='0'){ rules.tag='el-input' }else if(kk=='1'){ rules.tag='el-input-number' }else if(kk=='2'){ rules.tag='el-input-number' } return rules }) console.log(item.rules,item.questionno) if(item.contentrule&&item.contentrule.length){ item.contentrule.map((kk,ink)=>{ var ins = Number(kk.number)-1 var arrr = kk.scope.split(',') var sco = [arrr[0].substring(1),arrr[1].substring(0,arrr[1].length-1)] console.log(sco,'sco') console.log(item.contenttype,'item.contenttype') if(item.contenttype&&item.contenttype[ins]=='0'){ item.rules[ins].minlength = sco[0] item.rules[ins].maxlength = sco[1] }else if(item.contenttype&&item.contenttype[ins]=='1'){ if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } item.rules[ins].step = 1 }else if(item.contenttype&&item.contenttype[ins]=='2'){ item.rules[ins].precision = kk.decimal if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } } return 11 }) }else{ } } var len1 = item.questioncontent.split("%s")?.length //构造答案个数,与输入框个数对应 if(item.isJianda&&zhanweinumber==0){ item.answer = new Array(1) }else{ item.answer = new Array(zhanweinumber) } } //多选 if(tmlx==3){ item.answer = [] item.activeIndex = [] } if(tmlx==4){ item.answer = [] } if(tmlx==5){ item.answer = new Array(item.maxoptcnt).fill('') } if(tmlx==6){ item.answer = 1 item.marks={ 1:item.startscope, [Number(item.segment)]:item.endscope } if(item.axisdesc){ var axisdescArr = item.axisdesc.split(';') item.marks[1] = axisdescArr[0] item.marks[Number(item.segment)] = axisdescArr[axisdescArr.length-1] } console.log(item.marks,'item.marks') } }) console.log(res.data,'that.questionList') that.questionList = res.data that.toolname = that.questionList[0]?.toolname that.getredistm() }) }, handleAct(item){ return this.currentListlast&&this.currentListlast.answer&&this.currentListlast.answer.answerBusiId==item.answerBusiId }, handleChoose(item,index){ if(this.calctmlx==1){ this.$set(this.currentListlast,'activeIndex',index) this.currentListlast.answer = {...item,answerId:item.answerBusiId,answerText:item.optionName} if(item.ansJumpQuesNo){ this.currentListlast._ansJumpQuesNo = item.ansJumpQuesNo }else{ this.currentListlast._ansJumpQuesNo = null } }else if(this.calctmlx==3){ var idex = this.currentListlast.activeIndex.indexOf(index) if(idex==-1){ if(item.ansJumpQuesNo){ this.currentListlast._ansJumpQuesNo = item.ansJumpQuesNo } if(this.currentListlast.maxoptcnt&&this.currentListlast.activeIndex.length>=this.currentListlast.maxoptcnt){ vant.Toast({ message:`最多选择${this.currentListlast.maxoptcnt}个选项`, icon: 'warning-o', }) }else{ if(item.mutexOptionNos){ var optionNos = item.mutexOptionNos.split(',') optionNos.forEach(itt=>{ var op = this.currentListlast.mpanswerdtolist[itt-1] console.log(op.answerBusiId,'op.answerBusiId') console.log(this.currentListlast.answer,'this.currentListlast.answer') if(op){ this.currentListlast.answer = this.currentListlast.answer.filter(an=>an.answerBusiId!=op.answerBusiId) this.currentListlast.activeIndex = this.currentListlast.activeIndex.filter(index1=>index1!=itt-1) } }) } this.currentListlast.activeIndex.push(index) console.log(item.answerBusiId,'item.answerBusiId') this.currentListlast.answer.push({...item,answerId:item.answerBusiId,answerText:item.optionName}) this.toggleActive(item,index) } }else{ this.currentListlast.activeIndex.splice(idex,1) this.currentListlast.answer.splice(idex,1) this.toggleActive(item,index) if(item.ansJumpQuesNo){s this.currentListlast._ansJumpQuesNo = null } } } //console.log(JSON.stringify(this.currentListlast.answer),'this.currentListlast.answer') }, aaa(que){ var that = this var pcur = that.questionList[que.parentno-1] that.currentList.unshift(pcur) if(pcur.parentno!=0){ that.aaa(pcur) } }, gettmlx(item){ //单选题 if(item.questiontype==2&&item.ismult==0){ return 1 } //填空题 if(item.questiontype==1&&item.replytype==2){ return 2 } //多选 if(item.questiontype==2&&item.ismult==1){ return 3 } }, startRecording() { if (this.mediaRecorder && this.mediaRecorder.state === "inactive") { // 开始录音 this.recording = true; this.mediaRecorder.start(); console.log("录音中..."); } else { // 获取用户的音频输入 navigator.mediaDevices.getUserMedia({ audio: true }).then( stream => { console.log("授权成功!"); this.status = "授权成功!"; this.mediaRecorder = new MediaRecorder(stream); this.mediaRecorder.ondataavailable = e => this.chunks.push(e.data); this.hasMicrophonePermission = true; this.mediaRecorder.start(); this.recording = true; this.status = "录音中..."; console.log("录音中..."); this.lystatus = true; this.timer = setInterval(() => { this.recordingTime++; }, 1000); }, () => { this.$message({ type: "error", message: "授权失败!请检查麦克风权限。" }) } ); } }, pauseRecording() { if (this.mediaRecorder && this.mediaRecorder.state === "recording") { this.mediaRecorder.pause(); clearInterval(this.timer); this.status = "录音已暂停"; console.log("录音已暂停"); this.lystatus = false; } }, resumeRecording() { if (this.mediaRecorder && this.mediaRecorder.state === "paused") { this.mediaRecorder.resume(); this.lystatus = true; this.timer = setInterval(() => { this.recordingTime++; }, 1000); this.status = "继续录音中..."; console.log("继续录音中..."); this.lystatus=true } }, formatTime(totalSeconds) { const minutes = Math.floor(totalSeconds / 60); const seconds = totalSeconds % 60; return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`; }, stopRecording() { console.log(this.formatTime(this.recordingTime)) if (this.mediaRecorder && this.mediaRecorder.state === "recording") { // 停止录音 this.mediaRecorder.stop(); this.mediaRecorder.onstop = () => { const blob = new Blob(this.chunks, { type: "audio/ogg; codecs=opus" }); this.chunks = []; // 创建FormData对象 const formData = new FormData(); // 动态生成文件名 const fileName = 'recorded_audio.ogg'; formData.append('file', blob, 'recorded_audio.ogg'); formData.append('rel', 'r_ft_ftjl'); formData.append('attname', 'lywj'); formData.append('ftid', this.item.id); fetch('/www/public/shouye/ft_lysc', { method: 'POST', body: formData }) .then(response => response.json()) .then(data => { console.log('上传成功:', data.data); this.recordingstatus = data.data; console.log(this.recordingstatus) }) .catch(error => { console.error('上传失败:', error); }); }; this.recording = false; this.status = "录音结束"; console.log("录音结束"); } this.recording = false; }, goBack(){ if(this.item.iftest==1){ this.$router.push({ path: '/interviewLS', query: { status: '1' } }); }else{ this.$router.push('interviewLS') } }, onSubmit(formRef) { this.$refs.formRef.validate((valid) => { if (valid) { var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} let data = { ftjlpg:this.ftjlpg, ftyypg:this.ftyypg, ftyywb:this.ftyywb, ftzswb:this.ftzswb, ftzspg:this.ftzspg, ...this.form, ftid:this.item.id, lbid:this.lbid, } $.post("/www/public/shouye/ft_saveftjl", data, (res) => { if (res.error == 0) { localStorage.removeItem('saveredistm') let data = { stuid:this.item.xsid, } $.post("/www/public/st/ft_delredistm", data, (res) => { if (res.error == 0) { }else{ this.$message({ type: "error", message: res.message }) } }); if(res.data.statu==1){ this.$router.push({ path: '/interviewLS', query: { status: '1' } }); }else{ this.dialogVisible=true } }else{ this.$message({ type: "error", message: res.message }) } }); } else { console.log('error submit!!'); return false; } }); }, cancel(){ this.$router.push('interviewLS') }, getImgsrc(val) { return "/content/image/xljkls/"+val }, format(percentage) { return `${this.current} / ${this.questionList.length}`; }, toggleRecording() { if (this.isRecording) { this.recorder.stop(); this.isRecording = false; console.log("录音结束"); } else { this.recordedChunks = []; navigator.mediaDevices.getUserMedia({ audio: true }).then((stream) => { this.recorder = new MediaRecorder(stream); this.recorder.ondataavailable = (e) => { if (e.data.size > 0) { this.recordedChunks.push(e.data); } }; this.recorder.start(); this.isRecording = true; console.log("开始录音..."); }).catch((err) => { this.$message.error('授权失败!请检查麦克风权限。') }); } }, handleConfirm() { // 保存录音数据的逻辑,例如将录音数据转换为Blob并设置给音频元素的src const blob = new Blob(this.recordedChunks, { type: 'audio/webm' }); const audioUrl = URL.createObjectURL(blob); this.$refs.audioPlayer.src = audioUrl; this.$refs.audioPlayer.load(); // 加载音频数据 this.$refs.audioPlayer.play(); // 播放音频 console.log('录音已保存:', audioUrl); }, }, computed: { currentListlast(){ var len = this.currentList.length var cu = this.currentList[len-1] if(this.gettmlx(cu)==1||this.gettmlx(cu)==3){ cu.mpanswerdtolist.forEach((item,inde)=>{ if(item.replyType==2){ item.optionNameArr = item.optionName.split('%s') if(item.contentType&&!Array.isArray(item.contentType)){ item.fillValues = {} console.log(item.contentType,'item.contentType') item.contentType = item.contentType.split('#') item.rules = item.contentType.map((kk,ink)=>{ let rules={} if(kk=='0'){ rules.tag='el-input' item.fillValues[ink+''] = '' }else if(kk=='1'){ rules.tag='el-input-number' item.fillValues[ink+''] = undefined }else if(kk=='2'){ rules.tag='el-input-number' item.fillValues[ink+''] =undefined } return rules }) console.log(item.contentType,'item.contentType') console.log(item.fillValues,'item.fillValues') console.log(item.rules,'item.rules') if(item.contentRule&&item.contentRule.length){ item.contentRule = JSON.parse(item.contentRule) item.contentRule.map((kk,ink)=>{ var ins = Number(kk.number)-1 var arrr = kk.scope.split(',') var sco = [arrr[0].substring(1),arrr[1].substring(0,arrr[1].length-1)] console.log(sco,'sco') console.log(item.contentType,'item.contentType') if(item.contentType[ins]=='0'){ item.rules[ins].minlength = sco[0] item.rules[ins].maxlength = sco[1] }else if(item.contentType[ins]=='1'){ if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } item.rules[ins].step = 1 }else if(item.contentType[ins]=='2'){ item.rules[ins].precision = kk.decimal if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } } return 11 }) } }else{ } console.log(item.optionNameArr,'item') }else{ item.optionNameArr = [item.optionName] } }) } console.log(cu,'cu') console.log(JSON.stringify(this.currentList),'this.currentList') return cu }, calculatedPercentage() { if (!this.questionList.length) { return 0; // 避免除零错误 } return (this.current / this.questionList.length) * 110; }, calctmlx(){ //单选题 if(this.currentListlast&&this.currentListlast.questiontype==2&&this.currentListlast.ismult==0){ return 1 } //填空题 if(this.currentListlast&&this.currentListlast.questiontype==1&&this.currentListlast.replytype==2){ return 2 } //多选 if(this.currentListlast&&this.currentListlast.questiontype==2&&this.currentListlast.ismult==1){ return 3 } } }, watch:{ current:{ handler(val){ if(!val) return var that = this var cur = that.questionList[val-1] if(!cur){return} if(cur.questiontype==1&&cur.replytype==0){ that.current++ return } if(cur.parentno!=0){ if(that.currentList[0]?.parentno!=0){ that.currentList.unshift(cur) }else{ that.currentList = [] that.currentList.unshift(cur) } that.aaa(cur) }else{ var length = that.currentList.length that.currentList = [] that.currentList.unshift(cur) } }, immediate: true }, currentList:{ handler(val){ }, immediate:true }, answerNumber(val){ } }, created: function(){ let that = this that.item = JSON.parse(localStorage.getItem('stuItem')); let data = { ftid:that.item.id } $.post("/www/public/shouye/ft_selifdt", data, function(res){ if(res.error==0){ if(res.data.dtzt==1){ $.post("/www/public/shouye/ft_findyj", {ftid:that.item.id}, (res) => { if (res.error == 0) { that.html1 =res.data.jkwb that.html2 =res.data.jlwb that.html3 =res.data.sjwb that.html4 =res.data.wuwb that.html5 =res.data.yywb that.html6 =res.data.zswb }else{ this.$message({ type: "error", message: res.message }) } }); that.ftjlpg = res.data.ftjlpg that.ftyypg=res.data.ftyypg that.ftzspg = res.data.ftzspg that.ftyywb = res.data.ftyywb that.ftzswb = res.data.ftzswb that.lbid=res.data.id that.statusButton=false that.dialogVisible1=false } else{ that.statusButton=true } } }) let xdid = { tmxd:that.item.xd } $.post("/www/public/shouye/ft_lbtmbd", xdid, (res) => { if (res.error ==0 ) { this.yytm = res.data.yytm this.zstm = res.data.zstm this.tstm=res.data.tstm this.tstmmzf=res.data.tstmmzf } }); that.gettmlist() that.startTime = new Date().getTime(); }, mounted: function(){ /* $.post("/www/public/liangbiao/cp_getAccessToken", {}, function(res){ if(res.code==200){ localStorage.setItem('accessToken', res.data.accessToken) } })*/ // this.getOpenId() //this.dialogVisible1=true if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { navigator.mediaDevices.getUserMedia({ audio: true }).then( stream => { console.log("已获得麦克风权限!"); this.hasMicrophonePermission = true; // 获取权限成功,设置标志为 true }, () => { console.log("未获得麦克风权限!"); this.hasMicrophonePermission = false; // 获取权限失败,设置标志为 false } ); } else { console.log("浏览器不支持 getUserMedia"); // 如果浏览器不支持 getUserMedia,可以视情况设置标志为 false this.hasMicrophonePermission = false; } }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-interviewDetails-view", function(resolve, reject){ var template = "
\n
\n | 学生访谈\n
\n
\n
\n
\n \n
\n
\n
\n {{ item.xsmc }} \n
\n
\n
\n 学校:{{ item.xxmc }}\n
\n
\n 年级:{{item.xd==1?'小学':item.xd==2?'初中':item.xd==3?'高中':\n item.xd==4?'中职':\n item.xd==5?'高职':\n item.xd==7?'本科':\n item.xd==8?'硕士':\n item.xd==9?'博士':''}}{{ item.nj }}年级\n
\n
\n 学号:{{ item.xsxh }}\n
\n
\n 班级:{{ item.bj }}\n
\n
\n 联系方式:{{ item.xssjh }}\n
\n
\n
\n\n
\n
\n \n\n \n \n \n
---
\n
\n\n \n \n
{{ftyypg}}分
\n
\n\n \n \n
{{ftzspg}}分
\n
\n \n \n
---
\n\n
\n\n \n \n\n
{{data?data.ftyywb:''}}
\n \n
\n\n \n \n
{{data.ftzswb}}
\n \n
\n \n \n
十分感谢你参与本次访谈!通过我们的谈话内容,听上去你最近在学习和生活上似乎没有多少困扰,有时出现一些小的困扰,你也能够自己解决,或在他人(家长、老师、同学、朋友等)的帮助下顺利解决,这非常棒!如果以后出现新的困扰或挑战,我也鼓励你尝试跟老师、家长或你的同学/朋友聊一聊,通过他们的帮助、支持,以及你自己的应对方法,及时做出自我调整、灵活应对出现的困扰或挑战。本次访谈到这里就结束了,如果你没有其他问题的话就可以回教室啦,再见!
\n
十分感谢你参与本次访谈!通过我们的谈话内容,听上去你最近在学习和生活上似乎有一些困扰,有时你会因为这些困扰感到低落、难过、沮丧或愤怒。我们都理解这些是一些很常见、很正常的情绪反应,每个人在某个阶段可能都会有相似的感受。所以鼓励你尝试跟老师、家长或你的同学/朋友聊一聊,听听他们的建议,通过他们的帮助、支持,以及你自己的应对方法,及时做出自我调整,更有力地应对与解决现在面临的这些困扰。本次访谈到这里就结束了,如果你没有其他问题的话,就可以回教室啦,祝你一切顺利,再见!
\n
十分感谢你参与本次访谈!通过我们的谈话内容,听上去你最近在学习和生活上似乎有一定的困扰,你可能经常会因为这些困扰感到低落、难过、沮丧、或感到无力、无助、没有希望、甚至有想结束自己生命的想法等等。我们都理解当人们所面对的困扰和压力越大时,这些情绪和感受越容易出现。所以鼓励你尝试跟老师、家长或你的同学/朋友聊一聊,听听他们的建议;或去专业的心理健康服务机构或医院,听听专业人员的建议。通过他们的帮助、支持,以及你自己的应对策略,及时做出自我调整,更有力地应对与解决现在面临的这些困扰。本次访谈到这里就结束了,如果你没有其他问题的话,就可以回教室啦,祝你一切顺利,再见!
\n
十分感谢你参与本次访谈!通过我们的谈话,听上去你最近在学习和生活上似乎有一定的困扰,你可能经常会因为这些困扰感到低落、难过、沮丧、或感到无力、无助、没有希望、想到结束自己的生命等。我们都理解当人们所面对的困扰和压力越大时,这些情绪和感受越容易出现。所以我会鼓励你把自己的困扰和压力尝试跟老师、家长或你的同学/朋友聊一聊,听听他们的建议;或去专业的心理健康服务机构或医院,寻求专业人员的帮助。通过他们的帮助、支持,以及你自己的应对策略,及时做出自我调整,更有力地应对与解决现在面临的这些困扰。本次访谈到这里就结束了,如果你没有其他问题的话,就可以回教室啦,祝你一切顺利,再见!
\n
\n \n \n
(1)\t建议学校立即启动学生危机干预预案,及时联系学生家长并通知其到校协助危机干预与转介,由校级危机干预工作组成员陪同学生直至家长到校,避免让学生独处;
\n
(2)\t建议学校为家长提供心理危机相关的心理健康教育,帮助家长理解其严重性和紧急性;
\n
(3)\t建议学校将心理危机档案及时提供给家长并协助家长及时带孩子到当地相关专科医院或社区医院相关科室就医。
\n \n
\n \n \n
{{data?data.sfzdgy==1?'是':'否':''}}
\n
\n\n \n \n
{{data?data.sfcxzz==1?'是':'否':''}}
\n
\n \n
{{data?data.ftyj:''}}
\n
\n\n
\n
\n
\n
\n 访谈录音\n
\n
\n 录音地址:{{ data.lywj }}\n
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), item:'', size: '', data:'', ftyypg:'', ftzspg:'' }; }, methods: { goBack(){ this.$router.push('interviewLS') }, getImgsrc(val) { return "/content/image/xljkls/"+val }, }, created: function(){ this.item = JSON.parse(localStorage.getItem('stuItem')); console.log(this.item) let data = { ftid:this.item.id } $.post("/www/public/shouye/ft_ftdail", data, (res) => { if (res.error == 0) { this.data = res.data this.ftzspg =res.data.ftzspg this.ftyypg=res.data.ftyypg }else{ this.$message.error(res.message) } }); }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-interviewInfoOnline-view", function(resolve, reject){ var template = "
\n \n
\n

步骤一: 打开腾讯会议

\n

步骤二: 点击录音选择云录音

\n

步骤三: 访谈结束保存录音地址

\n

步骤四: 最后提交填写

\n
\n\n \n 继续访谈\n \n \n
\n | 学生访谈\n
\n
\n
\n
\n \n
\n
\n
\n {{ item.xsmc }} \n
\n
\n
\n 学校:{{ item.xxmc }}\n
\n
\n 年级:{{item.xd==1?'小学':item.xd==2?'初中':item.xd==3?'高中':\n item.xd==4?'中职':\n item.xd==5?'高职':\n item.xd==7?'本科':\n item.xd==8?'硕士':\n item.xd==9?'博士':''}}{{ item.nj }}年级\n
\n
\n 学号:{{ item.xsxh }}\n
\n
\n 班级:{{ item.bj }}\n
\n
\n 联系方式:{{ item.xssjh }}\n
\n
\n
\n\n
\n\n\n\n\n
\n \n \n
\n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : '' }}\n \n \n \n {{currentList[0]?.questioncontent.split('%s')[indd]}}\n \n \n \n
\n
\t\n
\n \n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : '' }}\n \n\n\n \n \n {{currentList[1]?.questioncontent.split('%s')[indd2]}}\n \n \n \n\n\n \n\n
\n \n
\n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : '' }}\n \n \n \n {{currentList[2]?.questioncontent.split('%s')[indd3]}}\n \n \n \n \n\n
\n
\n \n \n \n \n
\n
\n {{item.optionName}}\n
\n
\n \n
\n
\n {{item.optionName}}\n
\n
\n \n
\n
\n {{item.optionName}}\n
\n
\n \n
\n
\n\n \n
\n
\n
\n {{currentListlast?currentListlast.quesjumpquesno>questionList.length||current==questionList.length?'提 交':'下 一 题 ':''}}\n \n \n
\n
\n
\n
\n \n \n \n ---\n \n \n {{ ftyypg }} 分\n \n \n {{ ftzspg }} 分\n \n \n \n ---\n \n \n {{ftyywb}}\n \n \n \n {{ftzswb}}\n \n \n \n \n
\n 转介建议:\n 十分感谢你参与本次访谈!通过我们的谈话内容,听上去你最近在学习和生活上似乎没有多少困扰,有时出现一些小的困扰,你也能够自己解决,或在他人(家长、老师、同学、朋友等)的帮助下顺利解决,这非常棒!如果以后出现新的困扰或挑战,我也鼓励你尝试跟老师、家长或你的同学/朋友聊一聊,通过他们的帮助、支持,以及你自己的应对方法,及时做出自我调整、灵活应对出现的困扰或挑战。本次访谈到这里就结束了,如果你没有其他问题的话就可以回教室啦,再见!\n 十分感谢你参与本次访谈!通过我们的谈话内容,听上去你最近在学习和生活上似乎有一些困扰,有时你会因为这些困扰感到低落、难过、沮丧或愤怒。我们都理解这些是一些很常见、很正常的情绪反应,每个人在某个阶段可能都会有相似的感受。所以鼓励你尝试跟老师、家长或你的同学/朋友聊一聊,听听他们的建议,通过他们的帮助、支持,以及你自己的应对方法,及时做出自我调整,更有力地应对与解决现在面临的这些困扰。本次访谈到这里就结束了,如果你没有其他问题的话,就可以回教室啦,祝你一切顺利,再见!\n 十分感谢你参与本次访谈!通过我们的谈话内容,听上去你最近在学习和生活上似乎有一定的困扰,你可能经常会因为这些困扰感到低落、难过、沮丧、或感到无力、无助、没有希望、甚至有想结束自己生命的想法等等。我们都理解当人们所面对的困扰和压力越大时,这些情绪和感受越容易出现。所以鼓励你尝试跟老师、家长或你的同学/朋友聊一聊,听听他们的建议;或去专业的心理健康服务机构或医院,听听专业人员的建议。通过他们的帮助、支持,以及你自己的应对策略,及时做出自我调整,更有力地应对与解决现在面临的这些困扰。本次访谈到这里就结束了,如果你没有其他问题的话,就可以回教室啦,祝你一切顺利,再见!\n 十分感谢你参与本次访谈!通过我们的谈话,听上去你最近在学习和生活上似乎有一定的困扰,你可能经常会因为这些困扰感到低落、难过、沮丧、或感到无力、无助、没有希望、想到结束自己的生命等。我们都理解当人们所面对的困扰和压力越大时,这些情绪和感受越容易出现。所以我会鼓励你把自己的困扰和压力尝试跟老师、家长或你的同学/朋友聊一聊,听听他们的建议;或去专业的心理健康服务机构或医院,寻求专业人员的帮助。通过他们的帮助、支持,以及你自己的应对策略,及时做出自我调整,更有力地应对与解决现在面临的这些困扰。本次访谈到这里就结束了,如果你没有其他问题的话,就可以回教室啦,祝你一切顺利,再见!\n
\n
\n 学校层面:\n
(1)\t建议学校立即启动学生危机干预预案,及时联系学生家长并通知其到校协助危机干预与转介,由校级危机干预工作组成员陪同学生直至家长到校,避免让学生独处;
\n
(2)\t建议学校为家长提供心理危机相关的心理健康教育,帮助家长理解其严重性和紧急性;
\n
(3)\t建议学校将心理危机档案及时提供给家长并协助家长及时带孩子到当地相关专科医院或社区医院相关科室就医。
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 取消\n 提交\n \n \n \n
\n
\n \n
\n
\n 完成访谈\n
\n
\n 感谢您完成本次访谈!\n
\n
\n \n
好的
\n
\n \n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), item:'', openId:'', denominator: 16, activeIndex: -1, status:6, activeIndexs: [], input:'', textarea:'', questionList:[], current:0, currentList:[], ttMap:{}, loading:false, nextloading:false, evaId:'', //evaId:'', answerNumber:0, startTime:'', toolname:'', statusButton:true, colorMap:['','#067EFF','#FF8A0D','#3F23FF'], questionListbk:[], User:{}, questionAnswers:[ ], mediaRecorder: null, chunks: [], recording: false, recordingstatus: '', form:{ sfzdgy:'', sfcxzz:'', ftyj:'', lywj:'' }, dialogVisible: false, ftjlpg:'', ftyypg:'', ftzspg:'', lbid:'', score:0, dialogVisible1:false, isRecording: false, recorder: null, recordedChunks: [], audioUrl: null, yytm:[], zstm:[], tstm:[], tstmdf:0, tstmmzf:'', yytmdf:0, zstmdf:0, ftyywb:'', ftzswb:'', cur:'', lystatus:true, newTtMap:{}, Tg:false, yyjfft1df:0, yyjfft2df:0, yyjdqScoreSum:0, yyjdqSpecialScore:0, yyjwScoreSum1:0, yyjwScoreSum2:0, yyjwSpecialScore1:0, yyjwSpecialScore2:0, zsdf:0, jkza1df:0, tsjkza1df:0, tsjkza2df:0, sjjl1df:0, sjjl2df:0, sjjl3df:0, ftjlpg:'', ftsjpg:'', ftjkpg:'', ftsjwb:'', ftjkwb:'', ftjlwb:'', zszt:'', jlzt:'', yyzt:'', sjzt:'', jkzt:'', html1:'', html2:'', html3:'', html4:'', html5:'', html6:'', rules: { sfzdgy: [ { required: true, message: '此处是必填项', trigger: 'blur' }, ], sfcxzz: [ { required: true, message: '此处是必填项', trigger: 'blur' }, ], ftyj: [ { required: true, message: '此处是必填项', trigger: 'blur' }, ], lywj: [ { required: true, message: '此处是必填项', trigger: 'blur' }, { validator: this.validateHttpsUrl, trigger: 'blur' } ], }, lystatus: false, recordingTime: 0, timer: null, hasMicrophonePermission:false }; }, methods: { validateHttpsUrl(rule, value, callback) { if (!value) { callback(new Error('请输入网址')); } else if (!/^https:\/\/.*/.test(value)) { callback(new Error('此处应填写网址')); } else { callback(); } }, getredistm(){ var that = this var tmlist = localStorage.getItem('saveredistm') if(tmlist){ tmlist = JSON.parse(tmlist) that.questionAnswers = tmlist.answerList that.current = tmlist.current //that.current = 86 return } $.post("/www/public/st/getredistm", {stid:that.questionList[0]?.sjid}, function(res){ if(res.code==200){ if(res.data){ /*that.questionListbk = res.data let len =that.questionListbk.length let lastAnswer = that.questionListbk[len-1] if(len&&len>1){ res.data.forEach(item=>{ }) that.evaId = that.questionListbk[0] that.questionList[len-2].answer = lastAnswer that.current = len-1 //that.current = 194 }else{ that.current = 1 }*/ that.newTtMap = res.data.newTtMap that.questionAnswers = res.data.answerList that.current = res.data.current console.log(that.questionAnswers,'that.questionAnswers') }else{ that.current = 1 } }else{ that.current = 1 } //that.current = 86 //that.current = 220 }) }, validateHttpsUrl(rule, value, callback) { if (!value) { callback(new Error('请输入网址')); } else if (!/^https:\/\/.*/.test(value)) { callback(new Error('此处应填写网址')); } else { callback(); } }, goList(){ this.$router.push('interviewLS') }, open() { this.$alert('点击确定按钮开始答题。', '准备答题', { confirmButtonText: '确定', callback: action => { } }); }, previous(){ //this.status-- }, saveAll(){ console.log(this.Tg) if(this.current!=this.questionList.length&&this.Tg==false) return this.Tg=false this.endTime = new Date().getTime() const that = this that.loading = true that.nextloading=true var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} let data = { stuid:this.item.xsid, xm:this.item.xsmc, xxid:this.item.xx, xxmc:this.item.xxmc, nj:this.item.nj, bjid:this.item.bjid, bjmc:this.item.bj, xd:this.item.xd, ujs:this.item.yhjs, nfpc:this.item.xnd, questionAnswers:JSON.stringify({ toolId:this.currentListlast.toolid, openQuestionAnswerVOS:this.questionAnswers }), toolId:this.currentListlast.toolid, stid:this.questionList[0].sjid, dtcnt:this.answerNumber, dttime:this.calculateTimeDifference(this.startTime,this.endTime), ftid:this.item.id, ftyypg:this.yytmdf, ftzspg:this.zstmdf, ftyywb:this.ftyywb, ftzswb:this.ftzswb, ftxs:'1' } $.post("/www/public/shouye/ft_newsaveda", data, (res) => { if (res.error == 0) { this.ftjlpg = res.data.ftjlpg this.ftyypg=res.data.ftyypg this.ftzspg = res.data.ftzspg this.ftyywb=res.data.ftyywb this.ftzswb=res.data.ftzswb this.lbid=res.data.id this.statusButton=false }else{ this.$message({ type: "error", message: res.message }) } }); let info ={ zszt:this.zszt, jlzt:this.jlzt, yyzt:this.yyzt, sjzt:this.sjzt, jkzt:this.jkzt, ftid:this.item.id, ftxd:this.item.xd } console.log(info) $.post("/www/public/shouye/ft_saveftwd", info, (res) => { if (res.error == 0) { $.post("/www/public/shouye/ft_findyj", info, (res) => { let data ={ ftid:this.item.id, } if (res.error == 0) { this.html1 =res.data.jkwb this.html2 =res.data.jlwb this.html3 =res.data.sjwb this.html4 =res.data.wuwb this.html5 =res.data.yywb this.html6 =res.data.zswb }else{ this.$message({ type: "error", message: res.message }) } }); }else{ this.$message({ type: "error", message: res.message }) } }); }, calculateTimeDifference(startTime, endTime) { let timeDiff = endTime - startTime; let hours = Math.floor(timeDiff / (1000 * 60 * 60)); let minutes = Math.floor((timeDiff % (1000 * 60 * 60)) / (1000 * 60)); let seconds = Math.floor((timeDiff % (1000 * 60)) / 1000); return `${hours}时${minutes}分${seconds}秒`; }, submitSingle(){ var that = this if(that.loading) return that.loading = true console.log(that.currentListlast,'222222') if(that.currentListlast.questiontype==99){ that.next() return } var answer = that.currentListlast.answer if(that.calctmlx==1){ if(!answer||!answer.answerId){ that.loading = false return vant.Toast({ message:'请先选择/填写答案', icon: 'warning-o', }) //return that.$message.warning('请先答题') } }else if(that.calctmlx==2){ var inputContent = '' for(let iii = 0;iii{ if(item.fillValues){ console.log(item.fillValues,'item.fillValues') var keys = Object.keys(item.fillValues) keys.forEach(ii=>{ if(!item.fillValues[ii]){ mflag = true } }) } }) if(mflag){ return vant.Toast({ message:'选中选项有信息需未填写', icon: 'warning-o', }) } } }else{ if(Array.isArray(answer)&&!answer.length){ that.loading = false return vant.Toast({ message:'请先选择/填写答案', icon: 'warning-o', }) } } var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} var accessToken = localStorage.getItem('accessToken') var data = { toolId:that.currentListlast.toolid, //openId:that.openId, questionId:that.currentListlast.quesbusiid, evaId:that.evaId, } if(that.calctmlx==2){ data.inputContent = inputContent } if(that.calctmlx==1){ data.answerList = [that.currentListlast.answer] } if(that.calctmlx==3){ console.log(that.currentListlast.answer,'that.currentListlast.answer') var list = [] that.currentListlast.answer.forEach(item=>{ var text = '' console.log(item.fillValues) item.optionNameArr.forEach((iii,inn)=>{ var aaa if(item.fillValues){ aaa= item.fillValues[inn+'']?"####"+item.fillValues[inn+'']+"####":'' }else{ aaa = '' } text+=iii+aaa }) list.push({ answerId:item.answerId, answerText:text, }) }) data.answerList = list } let datas = { toolId:that.currentListlast.toolid, accessToken:localStorage.getItem('accessToken'), dadata:JSON.stringify(data) } if(that.calctmlx==3){ let checkboxRefs = that.$refs.checkboxRefs checkboxRefs.forEach(checkbox=>{ let inputbox = checkbox.querySelector('input[type="checkbox"]') inputbox.checked = false }) } if (that.calctmlx == 1) { const currentQuestionNumber = that.current; const scoreOfCurrentQuestion = that.currentListlast.answer.score; console.log('当前题目的题号:', currentQuestionNumber) console.log('需要加的分数:', scoreOfCurrentQuestion); let yyjw1 = ['1', '2', '3', '4', '8', '11', '14', '17', '20', '23', '26']; let yyjw2 = ['1', '2', '3', '4', '8', '33', '34', '35', '36', '37', '38']; let yyjwts1 = ['29']; let yyjwts2 = ['39']; for (let i = 0; i < yyjw1.length; i++) { if (yyjw1[i] == currentQuestionNumber) { that.yyjwScoreSum1 += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjw2.length; i++) { if (yyjw2[i] == currentQuestionNumber) { that.yyjwScoreSum2 += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjwts1.length; i++) { if (yyjwts1[i] == currentQuestionNumber) { that.yyjwSpecialScore1 += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjwts2.length; i++) { if (yyjwts2[i] == currentQuestionNumber) { that.yyjwSpecialScore2 += scoreOfCurrentQuestion; } } console.log(that.yyjwScoreSum1,'既往条件1得分') console.log(that.yyjwScoreSum2,'既往条件2得分') console.log(that.yyjwSpecialScore1,'特殊既往条件1得分') console.log(that.yyjwSpecialScore2,'特殊既往条件2得分') let yyjdq = ['1', '2', '3', '4', '7', '10', '13', '16', '19', '22', '25']; let yyjdqts = ['28']; for (let i = 0; i < yyjdq.length; i++) { if (yyjdq[i] == currentQuestionNumber) { that.yyjdqScoreSum += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjdqts.length; i++) { if (yyjdqts[i] == currentQuestionNumber) { that.yyjdqSpecialScore += scoreOfCurrentQuestion; } } console.log(that.yyjdqScoreSum,'当前条件1得分') console.log(that.yyjdqSpecialScore,'特殊当前条件1得分') let yyjfft1= ['30'] let yyjfft2= ['42'] for (let i = 0; i < yyjfft1.length; i++) { if (yyjfft1[i] == currentQuestionNumber) { that.yyjfft1df += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjfft2.length; i++) { if (yyjfft2[i] == currentQuestionNumber) { that.yyjfft2df += scoreOfCurrentQuestion; } } that.ftyypg = that.yyjwScoreSum1+that.yyjwScoreSum2+that.yyjdqScoreSum+that.yyjwSpecialScore1+that.yyjwSpecialScore2+ that.yyjdqSpecialScore+that.yyjfft1df+that.yyjfft2df console.log(that.ftyypg,'抑郁总分') if (that.yyjdqScoreSum >= 5 && that.yyjdqSpecialScore == 100 && that.yyjfft1df == 1 || that.yyjwScoreSum1 >= 5 && that.yyjwSpecialScore1 == 100 && that.yyjfft1df == 1 || that.yyjwScoreSum2 >= 5 && that.yyjwSpecialScore2 == 100 && that.yyjfft2df == 1) { console.log('抑郁发作-反复'); that.ftyywb ='抑郁发作-反复' that.yyzt ='3' } else if (that.yyjdqScoreSum >= 5 && that.yyjdqSpecialScore == 100) { console.log('抑郁发作-当前'); that.ftyywb ='抑郁发作-当前' that.yyzt ='2' } else if (that.yyjwScoreSum1 >= 5 && that.yyjwSpecialScore1 == 100 || that.yyjwScoreSum2 >= 5 && that.yyjwSpecialScore2 == 100) { console.log('抑郁发作-既往'); that.ftyywb ='抑郁发作-既往' that.yyzt ='1' } else { console.log('无抑郁'); that.ftyywb ='无抑郁' that.yyzt ='0' } //自杀 let zs = ['48','49','50','51','54','55','56','57','58','59','63','64','68']; for (let i = 0; i < zs.length; i++) { if (zs[i] == currentQuestionNumber) { that.zsdf +=scoreOfCurrentQuestion; } } that.ftzspg = that.zsdf console.log(that.ftzspg,'自杀得分') if(that.zsdf>17){ console.log('高度') that.ftzswb='高度' that.zszt ='3' }else if(that.zsdf>=9&&that.zsdf<=16){ console.log('中度') that.ftzswb='中度' that.zszt ='2' } else if(that.zsdf>=1&&that.zsdf<=8){ console.log('低度') that.ftzswb='低度' that.zszt ='1' }else{ console.log('无风险') that.ftzswb='无风险' that.zszt ='0' } //惊恐障碍 let jkza1 = ['166', '167', '168', '169', '170', '171', '172', '173', '174', '175', '176', '177', '178'] let tsjkza1=['164'] let tsjkza2=['179'] for (let i = 0; i < jkza1.length; i++) { if (jkza1[i] == currentQuestionNumber) { that.jkza1df +=scoreOfCurrentQuestion; } } for (let i = 0; i < tsjkza1.length; i++) { if (tsjkza1[i] == currentQuestionNumber) { that.tsjkza1df +=scoreOfCurrentQuestion; } } for (let i = 0; i < tsjkza2.length; i++) { if (tsjkza2[i] == currentQuestionNumber) { that.tsjkza2df +=scoreOfCurrentQuestion; } } that.ftjkpg = that.jkza1df+that.tsjkza1df+that.tsjkza2df console.log(that.ftjkpg,'惊恐障碍得分') if (that.jkza1df >= 4 && that.tsjkza1df == 100 && that.tsjkza2df == 1) { console.log('当前的惊恐障碍'); that.ftjkwb = '当前的惊恐障碍' that.jkzt ='1' } else if (that.jkza1df == 13) { console.log('终生的有限惊恐障碍'); that.ftjkwb = '终生的有限惊恐障碍' that.jkzt ='1' } else if (that.jkza1df >= 4 && that.tsjkza1df == 100) { console.log('终生惊恐障碍'); that.ftjkwb = '终生惊恐障碍' that.jkzt ='1' } else { console.log('无障碍'); that.ftjkwb = '无障碍' that.jkzt ='0' } //社交焦虑症 let sjjl1=['183'] let sjjl2=['184'] let sjjl3=['197'] for (let i = 0; i < sjjl1.length; i++) { if (sjjl1[i] == currentQuestionNumber) { that.sjjl1df +=scoreOfCurrentQuestion; } } for (let i = 0; i < sjjl2.length; i++) { if (sjjl2[i] == currentQuestionNumber) { that.sjjl2df +=scoreOfCurrentQuestion; } } for (let i = 0; i < sjjl3.length; i++) { if (sjjl3[i] == currentQuestionNumber) { that.sjjl3df +=scoreOfCurrentQuestion; } } that.ftsjpg =that.sjjl1df+that.sjjl2df+that.sjjl3df console.log(that.ftsjpg,'社交得分') if (that.sjjl2df==0&&that.sjjl1df==1) { console.log('非广泛性社交焦虑症'); that.ftsjwb='非广泛性社交焦虑症' that.sjzt='1' } else if (that.sjjl1df==1&&that.sjjl2df==1) { console.log('广泛性社交焦虑症'); that.ftsjwb='广泛性社交焦虑症' that.sjzt='1' } else { console.log('无'); that.ftsjwb='无' that.sjzt='0' } that.ftjlpg = that.sjjl3df console.log(that.ftjlpg,'焦虑得分') if (that.sjjl3df==1) { console.log('广泛性焦虑'); that.ftjlwb ='广泛性焦虑' that.jlzt='1' } else{ console.log('无'); that.ftjlwb ='无' that.jlzt='0' } } var data = { questionno:that.currentListlast.questionno, questionId:that.currentListlast.quesbusiid, inputContent:'', answerList:[{ answerId:'', answerText:'' }] } if(that.calctmlx==2){ data.inputContent = inputContent } if(that.calctmlx==1){ data.answerList = [{answerId:that.currentListlast.answer.answerId,answerText:''}] } if(that.calctmlx==3){ console.log(that.currentListlast.answer,'that.currentListlast.answer') var list = [] that.currentListlast.answer.forEach(item=>{ list.push({ answerId:item.answerId, answerText:item.answerId, }) }) data.answerList = list } that.questionAnswers.push(data) that.next() /* $.post("/www/public/st/savexfda", datas, function(res){ if(res&&res.code==200){ that.loading = false if(res.data.code==200){ that.evaId = res.data.data that.answerNumber++ that.next() }else{ that.$message({ type: "error", message: res.data.message }) } }else{ that.$message({ type: "error", message: '服务错误' }) that.loading = false } that.loading = false })*/ }, next(){ var that = this console.log(1111111) var answer = this.currentListlast.answer console.log(answer,'answer') //if(!answer||Array.isArray(answer)&&!answer.length) return that.$message.warning('请先答题') if(that.currentListlast.quesjumpquesno!=0){ this.current=this.currentListlast.quesjumpquesno }else if(that.currentListlast.scorejumpquesno!=0){ console.log(1) var scorejumpquesnoArr = that.currentListlast.scorejumpquesno.split(',') var lenth = scorejumpquesnoArr.length var score = answer.score console.log(answer,'answer') if(that.currentListlast.scorejumpnos){ console.log(that.newTtMap,'that.newTtMap') if(that.newTtMap[that.currentListlast.scorejumpnos]){ console.log(that.newTtMap,'that.newTtMap') }else{ console.log(that.newTtMap,'that.newTtMap') that.newTtMap[that.currentListlast.scorejumpnos] = 0 } that.newTtMap[that.currentListlast.scorejumpnos]+=score var arr = that.currentListlast.scorejumpnos.split(",") var th = arr[arr.length-1] var minarr=that.currentListlast.scorejumpmin.split(",") var maxarr=that.currentListlast.scorejumpmax.split(",") if(Number(th)==that.currentListlast.questionno){ let jumped = false for(let j=0;j=Number(minarr[j])&&that.newTtMap[that.currentListlast.scorejumpnos]<=Number(maxarr[j])){ that.current = Number(scorejumpquesnoArr[j]) jumped = true } } if(!jumped){ that.current++ } }else{ that.current++ } /*if(that.newTtMap[that.currentListlast.scorejumpnos]>=Number(this.currentListlast.scorejumpmin)&&that.newTtMap[that.currentListlast.scorejumpnos]<=Number(that.currentListlast.scorejumpmax)&&Number(th)==that.currentListlast.questionno){ console.log(that.currentListlast.scorejumpmax,'that.currentListlast.scorejumpmax') that.current = Number(that.currentListlast.scorejumpquesno) }else{ that.current++ }*/ /*console.log(3) var arr = that.currentListlast.scorejumpnos.split(",") that.ttMap[that.currentListlast.scorejumpnos]?console.log(1): that.ttMap[that.currentListlast.scorejumpnos]= {len:arr.length} var aaa = that.ttMap[that.currentListlast.scorejumpnos] if(score>=Number(this.currentListlast.scorejumpmin)&&score<=Number(this.currentListlast.scorejumpmax)){ aaa.score?aaa.score++:aaa.score=1 } if(aaa.score==aaa.len){ console.log(3) that.current = Number(this.currentListlast.scorejumpquesno) }else{ console.log(4) that.current++ }*/ }else{ if(score>=this.currentListlast.scorejumpmin&&score<=this.currentListlast.scorejumpmax){ that.current = Number(this.currentListlast.scorejumpquesno) console.log(6) }else{ console.log(7) that.current++ } } }else if(this.currentListlast._ansJumpQuesNo){ console.log(8) this.current=this.currentListlast._ansJumpQuesNo }else{ this.current++ console.log(this.current,'this.current111') } const jsonD = { answerList:that.questionAnswers, current:this.current, newTtMap:this.newTtMap } if(this.current<=this.questionList.length){ var aaab = JSON.stringify(jsonD) if(this.current%10==0){ $.post("/www/public/st/ft_saveredistm", {jsonData:aaab,stid:that.questionList[0]?.sjid}, function(res){ }) }else{ // localStorage.setItem('aa','34') localStorage.setItem('saveredistm',aaab) } } //this.activeIndexs = [] if(this.current>this.questionList.length){ this.current=this.questionList.length that.saveAll() }else{ that.loading = false } }, toggleActive(item,index) { if(item.mutexOptionNos){ if(item.mutexOptionNos){ var optionNos = item.mutexOptionNos.split(',') optionNos.forEach(itt=>{ let box = this.$refs.checkboxRefs[itt-1].querySelector('input[type="checkbox"]'); box.checked = false }) } } const checkbox = this.$refs.checkboxRefs[index].querySelector('input[type="checkbox"]'); checkbox.checked = !checkbox.checked; //this.updateCheckboxState(); }, updateCheckboxState() { this.$refs.checkboxRefs.forEach((checkboxRef, index) => { const checkbox = checkboxRef.querySelector('input[type="checkbox"]'); if (checkbox.checked) { this.activeIndexs.push(index); } }); }, gettmlist(){ var that = this const data = { rwxd:that.item.xd, ftid:that.item.id, } $.post("/www/public/shouye/ft_getftlb", data, function(res){ res.data.forEach(item=>{ let tmlx = that.gettmlx(item) if(tmlx==1){ item.answer = {} } //填空 if(tmlx==2){ //判断%s的数量 let _questioncontent = item.questioncontent.replace(/%s/g,'') var zhanweinumber = (item.questioncontent.length - _questioncontent.length)/2 //为0,说明是简答 console.log(zhanweinumber,'zhanweinumber',item.questionno) if(zhanweinumber==0){ item.isJianda = true }else if(zhanweinumber==1&&item.questioncontent.endsWith("%s")){ item.isJianda = true } console.log(item.isJianda,'item.isJianda') if(item.contenttype){ item.contenttype = item.contenttype.split('#') item.rules = item.contenttype.map((kk,ink)=>{ let rules={} if(kk=='0'){ rules.tag='el-input' }else if(kk=='1'){ rules.tag='el-input-number' }else if(kk=='2'){ rules.tag='el-input-number' } return rules }) console.log(item.rules,item.questionno) if(item.contentrule&&item.contentrule.length){ item.contentrule.map((kk,ink)=>{ var ins = Number(kk.number)-1 var arrr = kk.scope.split(',') var sco = [arrr[0].substring(1),arrr[1].substring(0,arrr[1].length-1)] console.log(sco,'sco') console.log(item.contenttype,'item.contenttype') if(item.contenttype&&item.contenttype[ins]=='0'){ item.rules[ins].minlength = sco[0] item.rules[ins].maxlength = sco[1] }else if(item.contenttype&&item.contenttype[ins]=='1'){ if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } item.rules[ins].step = 1 }else if(item.contenttype&&item.contenttype[ins]=='2'){ item.rules[ins].precision = kk.decimal if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } } return 11 }) }else{ } } var len1 = item.questioncontent.split("%s")?.length //构造答案个数,与输入框个数对应 if(item.isJianda&&zhanweinumber==0){ item.answer = new Array(1) }else{ item.answer = new Array(zhanweinumber) } } //多选 if(tmlx==3){ item.answer = [] item.activeIndex = [] } if(tmlx==4){ item.answer = [] } if(tmlx==5){ item.answer = new Array(item.maxoptcnt).fill('') } if(tmlx==6){ item.answer = 1 item.marks={ 1:item.startscope, [Number(item.segment)]:item.endscope } if(item.axisdesc){ var axisdescArr = item.axisdesc.split(';') item.marks[1] = axisdescArr[0] item.marks[Number(item.segment)] = axisdescArr[axisdescArr.length-1] } console.log(item.marks,'item.marks') } }) console.log(res.data,'that.questionList') that.questionList = res.data that.toolname = that.questionList[0]?.toolname that.getredistm() }) }, handleAct(item){ return this.currentListlast&&this.currentListlast.answer&&this.currentListlast.answer.answerBusiId==item.answerBusiId }, handleChoose(item,index){ if(this.calctmlx==1){ this.$set(this.currentListlast,'activeIndex',index) this.currentListlast.answer = {...item,answerId:item.answerBusiId,answerText:item.optionName} if(item.ansJumpQuesNo){ this.currentListlast._ansJumpQuesNo = item.ansJumpQuesNo }else{ this.currentListlast._ansJumpQuesNo = null } }else if(this.calctmlx==3){ var idex = this.currentListlast.activeIndex.indexOf(index) if(idex==-1){ if(item.ansJumpQuesNo){ this.currentListlast._ansJumpQuesNo = item.ansJumpQuesNo } if(this.currentListlast.maxoptcnt&&this.currentListlast.activeIndex.length>=this.currentListlast.maxoptcnt){ vant.Toast({ message:`最多选择${this.currentListlast.maxoptcnt}个选项`, icon: 'warning-o', }) }else{ if(item.mutexOptionNos){ var optionNos = item.mutexOptionNos.split(',') optionNos.forEach(itt=>{ var op = this.currentListlast.mpanswerdtolist[itt-1] console.log(op.answerBusiId,'op.answerBusiId') console.log(this.currentListlast.answer,'this.currentListlast.answer') if(op){ this.currentListlast.answer = this.currentListlast.answer.filter(an=>an.answerBusiId!=op.answerBusiId) this.currentListlast.activeIndex = this.currentListlast.activeIndex.filter(index1=>index1!=itt-1) } }) } this.currentListlast.activeIndex.push(index) console.log(item.answerBusiId,'item.answerBusiId') this.currentListlast.answer.push({...item,answerId:item.answerBusiId,answerText:item.optionName}) this.toggleActive(item,index) } }else{ this.currentListlast.activeIndex.splice(idex,1) this.currentListlast.answer.splice(idex,1) this.toggleActive(item,index) if(item.ansJumpQuesNo){s this.currentListlast._ansJumpQuesNo = null } } } //console.log(JSON.stringify(this.currentListlast.answer),'this.currentListlast.answer') }, aaa(que){ var that = this var pcur = that.questionList[que.parentno-1] that.currentList.unshift(pcur) if(pcur.parentno!=0){ that.aaa(pcur) } }, gettmlx(item){ //单选题 if(item.questiontype==2&&item.ismult==0){ return 1 } //填空题 if(item.questiontype==1&&item.replytype==2){ return 2 } //多选 if(item.questiontype==2&&item.ismult==1){ return 3 } }, goBack(){ if(this.item.iftest==1){ this.$router.push({ path: '/interviewLS', query: { status: '1' } }); }else{ this.$router.push('interviewLS') } }, formatTime(totalSeconds) { const minutes = Math.floor(totalSeconds / 60); const seconds = totalSeconds % 60; return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`; }, onSubmit(formRef) { this.$refs.formRef.validate((valid) => { if (valid) { var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} let data = { ftjlpg:this.ftjlpg, ftyypg:this.ftyypg, ftyywb:this.ftyywb, ftzswb:this.ftzswb, ftzspg:this.ftzspg, ...this.form, ftid:this.item.id, lbid:this.lbid, } $.post("/www/public/shouye/ft_saveftjl", data, (res) => { if (res.error == 0) { localStorage.removeItem('saveredistm') let data = { stuid:this.item.xsid, } $.post("/www/public/st/ft_delredistm", data, (res) => { if (res.error == 0) { }else{ this.$message({ type: "error", message: res.message }) } }); if(res.data.statu==1){ this.$router.push({ path: '/interviewLS', query: { status: '1' } }); }else{ this.dialogVisible=true } }else{ this.$message({ type: "error", message: res.message }) } }); } else { return false; } }); }, cancel(){ this.$router.push('interviewLS') }, getImgsrc(val) { return "/content/image/xljkls/"+val }, format(percentage) { return `${this.current} / ${this.questionList.length}`; }, }, computed: { currentListlast(){ var len = this.currentList.length var cu = this.currentList[len-1] if(this.gettmlx(cu)==1||this.gettmlx(cu)==3){ cu.mpanswerdtolist.forEach((item,inde)=>{ if(item.replyType==2){ item.optionNameArr = item.optionName.split('%s') if(item.contentType&&!Array.isArray(item.contentType)){ item.fillValues = {} console.log(item.contentType,'item.contentType') item.contentType = item.contentType.split('#') item.rules = item.contentType.map((kk,ink)=>{ let rules={} if(kk=='0'){ rules.tag='el-input' item.fillValues[ink+''] = '' }else if(kk=='1'){ rules.tag='el-input-number' item.fillValues[ink+''] = undefined }else if(kk=='2'){ rules.tag='el-input-number' item.fillValues[ink+''] =undefined } return rules }) console.log(item.contentType,'item.contentType') console.log(item.fillValues,'item.fillValues') console.log(item.rules,'item.rules') if(item.contentRule&&item.contentRule.length){ item.contentRule = JSON.parse(item.contentRule) item.contentRule.map((kk,ink)=>{ var ins = Number(kk.number)-1 var arrr = kk.scope.split(',') var sco = [arrr[0].substring(1),arrr[1].substring(0,arrr[1].length-1)] console.log(sco,'sco') console.log(item.contentType,'item.contentType') if(item.contentType[ins]=='0'){ item.rules[ins].minlength = sco[0] item.rules[ins].maxlength = sco[1] }else if(item.contentType[ins]=='1'){ if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } item.rules[ins].step = 1 }else if(item.contentType[ins]=='2'){ item.rules[ins].precision = kk.decimal if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } } return 11 }) } }else{ } console.log(item.optionNameArr,'item') }else{ item.optionNameArr = [item.optionName] } }) } console.log(cu,'cu') console.log(JSON.stringify(this.currentList),'this.currentList') return cu }, calculatedPercentage() { if (!this.questionList.length) { return 0; // 避免除零错误 } return (this.current / this.questionList.length) * 110; }, calctmlx(){ //单选题 if(this.currentListlast&&this.currentListlast.questiontype==2&&this.currentListlast.ismult==0){ return 1 } //填空题 if(this.currentListlast&&this.currentListlast.questiontype==1&&this.currentListlast.replytype==2){ return 2 } //多选 if(this.currentListlast&&this.currentListlast.questiontype==2&&this.currentListlast.ismult==1){ return 3 } } }, watch:{ current:{ handler(val){ if(!val) return var that = this var cur = that.questionList[val-1] if(!cur){return} if(cur.questiontype==1&&cur.replytype==0){ that.current++ return } if(cur.parentno!=0){ if(that.currentList[0]?.parentno!=0){ that.currentList.unshift(cur) }else{ that.currentList = [] that.currentList.unshift(cur) } that.aaa(cur) }else{ var length = that.currentList.length that.currentList = [] that.currentList.unshift(cur) } }, immediate: true }, currentList:{ handler(val){ }, immediate:true }, answerNumber(val){ } }, created: function(){ let that = this that.item = JSON.parse(localStorage.getItem('stuItem')); let data = { ftid:that.item.id } $.post("/www/public/shouye/ft_selifdt", data, function(res){ if(res.error==0){ if(res.data.dtzt==1){ $.post("/www/public/shouye/ft_findyj", {ftid:that.item.id}, (res) => { if (res.error == 0) { that.html1 =res.data.jkwb that.html2 =res.data.jlwb that.html3 =res.data.sjwb that.html4 =res.data.wuwb that.html5 =res.data.yywb that.html6 =res.data.zswb }else{ this.$message({ type: "error", message: res.message }) } }); that.ftjlpg = res.data.ftjlpg that.ftyypg=res.data.ftyypg that.ftzspg = res.data.ftzspg that.ftyywb = res.data.ftyywb that.ftzswb = res.data.ftzswb that.lbid=res.data.id that.statusButton=false that.dialogVisible1=false }else{ that.statusButton=true } } }) let xdid = { tmxd:that.item.xd } $.post("/www/public/shouye/ft_lbtmbd", xdid, (res) => { if (res.error ==0 ) { this.yytm = res.data.yytm this.zstm = res.data.zstm this.tstm=res.data.tstm this.tstmmzf=res.data.tstmmzf } }); that.gettmlist() that.startTime = new Date().getTime(); }, mounted: function(){ /* $.post("/www/public/liangbiao/cp_getAccessToken", {}, function(res){ if(res.code==200){ localStorage.setItem('accessToken', res.data.accessToken) } })*/ // this.getOpenId() //this.dialogVisible1=true if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { navigator.mediaDevices.getUserMedia({ audio: true }).then( stream => { console.log("已获得麦克风权限!"); this.hasMicrophonePermission = true; // 获取权限成功,设置标志为 true }, () => { console.log("未获得麦克风权限!"); this.hasMicrophonePermission = false; // 获取权限失败,设置标志为 false } ); } else { console.log("浏览器不支持 getUserMedia"); // 如果浏览器不支持 getUserMedia,可以视情况设置标志为 false this.hasMicrophonePermission = false; } }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-aggerLink-view", function(resolve, reject){ var template = "
\n \n
\n \n
\n \n 提交\n \n
\n \n
\n
\n {{info.tyhmc}}\n
\n
\n\n
\n
\n \n\n
\n
\n
\n 点 击 签 字\n
\n
\n\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { dialogVisible: false, signaturePad:'', blob:'', file:'', dataURL:'', info:'', tyhid:'', username:'', isWiderScreen: false, ftid:'', imgUrl:'' }; }, methods: { checkScreenWidth() { if (document.documentElement.clientWidth < 600) { this.isWiderScreen = true; } else { this.isWiderScreen = false; } }, openSignatureDialog() { this.dialogVisible = true; this.$nextTick(() => { this.initSignaturePad(); }); }, initSignaturePad() { let canvas = document.getElementById('canvas'); // 创建 SignaturePad let options = { penColor: 'rgb(0,0,0)', minWidth: 5, maxWidth: 10, }; this.signaturePad = new SignaturePad(canvas, options); this.resizeCanvas(); }, back(){ this.$router.push('evaluation') }, getTyh(){ const that = this; let data = { ftid:this.ftid, } $.post("/www/public/tyh/gettyh", data, function(res){ if(res.code==200&&res.data!==null){ res.data.map((item)=>{ if(item.qsjs==500){ that.info =item that.imgUrl=item.imgurl } }) }else{ that.$message({ type: "error", message: '服务错误' }) } }) }, resizeCanvas() { let canvas = document.getElementById('canvas') let ratio = Math.max(window.devicePixelRatio || 1, 1) canvas.width = canvas.offsetWidth * ratio canvas.height = canvas.offsetHeight * ratio let context = canvas.getContext('2d') context.scale(ratio, ratio) var signTitle = document.querySelector('.signTitle'); canvas.addEventListener('mouseenter', function() { signTitle.style.display = 'none'; }); canvas.addEventListener('mouseleave', function() { signTitle.style.display = 'block'; }); }, /**根据图片的 Base64 编码,把内容显示到签名板上*/ redisplay() { this.signaturePad && this.dataURL && this.signaturePad.fromDataURL(this.dataURL) }, /*清除签名板内容*/ clear() { this.signaturePad.clear() this.dataURL = null }, /*获取签名板内容(图片的 Base64 编码)*/ save() { this.dataURL = this.signaturePad.toDataURL() console.log( this.dataURL) let data = { tyhid:this.info.id, imgurl:this.dataURL, ftid:this.ftid, } console.log(data) const that =this $.post("/www/public/shouye/ft_savestutyh", data, function(res){ if(res.error==0){ that.$message.success('提交成功'); that.imgUrl = res.data that.dialogVisible=false that.getTyh }else{ that.$message({ type: "error", message: res.message }) } }) }, base64ToBlob(dataURL) { console.log(dataURL) let arr = dataURL.split(',') let mimeType = arr[0].match(/:(.*?);/)[1] || 'image/png' let encodeStr = atob(arr[1]) let n = encodeStr.length let u8Arr = new Uint8Array(n) while (n--) { u8Arr[n] = encodeStr.charCodeAt(n) } return new Blob([u8Arr], { type: mimeType }) }, //转换成file blobToFile(blob, fileName) { // MIME Type const type = blob.type || 'text/plain' return new File([blob], fileName, { type }) }, //生成图片 scImg(){ let blob = this.base64ToBlob(this.dataURL) this.file = this.blobToFile(blob, '签名图片.png') console.log(this.file) }, }, created: function(){ }, mounted: function(){ this.checkScreenWidth(); window.addEventListener('resize', this.checkScreenWidth); this.username = this.$route.query.username; this.tyhid = this.$route.query.tyhid; this.ftid = this.$route.query.id; this.getTyh() let canvas = document.getElementById('canvas') // 创建 SignaturePad let options = { penColor: "rgb(66, 133, 244)", minWidth: 5, maxWidth: 10, } this.signaturePad = new SignaturePad(canvas, options); this.resizeCanvas() }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-aggerTeacher-view", function(resolve, reject){ var template = "
\n \n
\n \n
\n \n 提交\n \n
\n \n
\n
\n {{info.tyhmc}}\n
\n
\n\n
\n
\n \n\n
\n
\n
\n 点 击 签 字\n
\n
\n\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { dialogVisible: false, signaturePad:'', blob:'', file:'', dataURL:'', info:'', tyhid:'', username:'', isWiderScreen: false, item:'', index:'', ftid:'', imgUrl:'' }; }, methods: { checkScreenWidth() { if (document.documentElement.clientWidth < 600) { this.isWiderScreen = true; } else { this.isWiderScreen = false; } }, openSignatureDialog() { this.dialogVisible = true; this.$nextTick(() => { this.initSignaturePad(); }); }, initSignaturePad() { let canvas = document.getElementById('canvas'); // 创建 SignaturePad let options = { penColor: 'rgb(0,0,0)', minWidth: 5, maxWidth: 10, }; this.signaturePad = new SignaturePad(canvas, options); this.resizeCanvas(); }, back(){ this.$router.push('evaluation') }, getTyh(){ const that = this; let data = { userid:JSON.parse(localStorage.getItem('user')).ID, } console.log(JSON.parse(localStorage.getItem('user')).Roles) $.post("/www/public/tyh/gettyh", data, function(res){ if(res.code==200&&res.data!==null){ res.data.map((item)=>{ if(item.qsjs==810){ that.info =item that.imgUrl=item.imgurl console.log(that.info) } }) }else{ that.$message({ type: "error", message: '服务错误' }) } }) }, resizeCanvas() { let canvas = document.getElementById('canvas') let ratio = Math.max(window.devicePixelRatio || 1, 1) canvas.width = canvas.offsetWidth * ratio canvas.height = canvas.offsetHeight * ratio let context = canvas.getContext('2d') context.scale(ratio, ratio) var signTitle = document.querySelector('.signTitle'); canvas.addEventListener('mouseenter', function() { signTitle.style.display = 'none'; }); canvas.addEventListener('mouseleave', function() { signTitle.style.display = 'block'; }); }, /**根据图片的 Base64 编码,把内容显示到签名板上*/ redisplay() { this.signaturePad && this.dataURL && this.signaturePad.fromDataURL(this.dataURL) }, /*清除签名板内容*/ clear() { this.signaturePad.clear() this.dataURL = null }, /*获取签名板内容(图片的 Base64 编码)*/ save() { this.dataURL = this.signaturePad.toDataURL() console.log( this.dataURL) let data = { tyhid:this.info.id, imgurl:this.dataURL, userid:JSON.parse(localStorage.getItem('user')).ID, } console.log(data) const that =this $.post("/www/public/shouye/ft_savetelbms", data, function(res){ if(res.error==0){ that.$message.success('提交成功'); that.$router.push('interviewLS') that.dialogVisible=false }else{ that.$message({ type: "error", message: res.message }) } }) }, base64ToBlob(dataURL) { console.log(dataURL) let arr = dataURL.split(',') let mimeType = arr[0].match(/:(.*?);/)[1] || 'image/png' let encodeStr = atob(arr[1]) let n = encodeStr.length let u8Arr = new Uint8Array(n) while (n--) { u8Arr[n] = encodeStr.charCodeAt(n) } return new Blob([u8Arr], { type: mimeType }) }, //转换成file blobToFile(blob, fileName) { // MIME Type const type = blob.type || 'text/plain' return new File([blob], fileName, { type }) }, //生成图片 scImg(){ let blob = this.base64ToBlob(this.dataURL) this.file = this.blobToFile(blob, '签名图片.png') console.log(this.file) }, }, created: function(){ let that = this that.item = JSON.parse(that.$route.query.item); that.index=JSON.parse(that.$route.query.index) }, mounted: function(){ this.checkScreenWidth(); window.addEventListener('resize', this.checkScreenWidth); this.getTyh() let canvas = document.getElementById('canvas') // 创建 SignaturePad let options = { penColor: "rgb(66, 133, 244)", minWidth: 5, maxWidth: 10, } this.signaturePad = new SignaturePad(canvas, options); this.resizeCanvas() }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-czsc-view", function(resolve, reject){ var template = "
\n 开始答题\n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid() }; }, methods: { goEaluation(){ window.open('/content/image/xljkImg/czsc.pdf','_blank') } }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-loginp-view", function(resolve, reject){ var template = "\n"; return (function(template, resolve, reject){ var store = new Vuex.Store({ state: { accessToken:'', userInfo:{}, user:{}, }, mutations: { accessToken(state, accessToken) { state.accessToken = accessToken; }, userInfo(state, userInfo) { state.userInfo = userInfo; }, user(state, user) { state.user = user; }, } }); seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), codesrc:'/owin/api/authcode?q=2069', ruleForm:{ name:'', phone:'' }, rules: { name: [ { required: true, message: '请输入姓名', trigger: 'blue' } ], phone: [ { required: true, message: '请输入电话号码', trigger: 'blue' } ], }, tyhid:'', }; }, methods: { rulesInput(formName){ this.$refs[formName].validate((valid) => { if (valid) { this.goHome() } else { return false; } }); }, rulesInputs(formName){ $.post("/www/public/mh/get_pgsxx", {}, function(res){ }) }, goHome(){ const that = this this.getCodeSrc() let data = { tyhid:this.tyhid, } $.post("/www/public/tyh/gettyhcp", data, function(res){ if(res.error==0){ that.$router.push({ path: "aggerp", query: { username:that.ruleForm.name, mobile:that.ruleForm.phone, tyhid:that.tyhid }, }); }else{ that.$message({ type: "error", message: res.message }) } }) }, getCodeSrc(){ this.codesrc = this.codesrc.replace(/\d+$/, parseInt(Math.random()*10000)) }, }, created: function(){ }, mounted: function(){ let hash = window.location.hash; let queryString = hash.substring(hash.indexOf('?') + 1); let params = new URLSearchParams(queryString); this.tyhid = params.get('tyhid'); console.log(this.tyhid); $.post("/owin/api/authcode", {}, function(res){ if(res.code==200){ } }) }, store: store, watch:{ //监听参数中的 props.markerLists 变化 $route:{ handler(newValue, oldValue){ if(newValue.query.otype == '0'){ this.routerAcitve = '/evaluation' }else if(newValue.query.otype == '1'){ this.routerAcitve = '/interview' }else{ this.routerAcitve = newValue.path } }, // 深度侦听需要遍历被侦听对象中的所有嵌套的属性,当用于大型数据结构时,开销很大。 // 因此请只在必要时才使用它,并且要留意性能。 deep: true, }, }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-aggerp-view", function(resolve, reject){ var template = "
\n \n
\n \n
\n \n 提交\n \n
\n \n
\n
\n {{info.tyhmc}}\n
\n
\n\n
\n
\n
\n 点 击 签 字\n
\n
\n\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { dialogVisible: false, signaturePad:'', blob:'', file:'', dataURL:'', info:'', tyhid:'', name:'', mobile:'', isWiderScreen: false }; }, methods: { checkScreenWidth() { if (document.documentElement.clientWidth < 600) { this.isWiderScreen = true; } else { this.isWiderScreen = false; } }, openSignatureDialog() { this.dialogVisible = true; this.$nextTick(() => { this.initSignaturePad(); }); }, initSignaturePad() { let canvas = document.getElementById('canvas'); // 创建 SignaturePad let options = { penColor: 'rgb(0,0,0)', minWidth: 5, maxWidth: 10, }; this.signaturePad = new SignaturePad(canvas, options); this.resizeCanvas(); }, back(){ this.$router.push('evaluation') }, getTyh(){ const that = this; let data = { tyhid:that.tyhid, } $.post("/www/public/tyh/gettyhcp", data, function(res){ if(res.code==200&&res.data!==null){ that.info = res.data if(res.data.isqs==1){ that.$router.push('evaluations') } }else{ that.$message({ type: "error", message: '服务错误' }) } }) }, resizeCanvas() { let canvas = document.getElementById('canvas') let ratio = Math.max(window.devicePixelRatio || 1, 1) canvas.width = canvas.offsetWidth * ratio canvas.height = canvas.offsetHeight * ratio let context = canvas.getContext('2d') context.scale(ratio, ratio) var signTitle = document.querySelector('.signTitle'); canvas.addEventListener('mouseenter', function() { signTitle.style.display = 'none'; }); canvas.addEventListener('mouseleave', function() { signTitle.style.display = 'block'; }); }, /**根据图片的 Base64 编码,把内容显示到签名板上*/ redisplay() { this.signaturePad && this.dataURL && this.signaturePad.fromDataURL(this.dataURL) }, /*清除签名板内容*/ clear() { this.signaturePad.clear() this.dataURL = null }, /*获取签名板内容(图片的 Base64 编码)*/ save() { this.dataURL = this.signaturePad.toDataURL() console.log( this.dataURL) let data = { tyhid:this.info.id, imgurl:this.dataURL, name:this.username, mobile:this.mobile } console.log(data) const that =this $.post("/www/public/tyh/savetyhcp", data, function(res){ if(res.code==200){ that.$message.success('提交成功'); that.dialogVisible=false that.$router.push('success') }else{ that.$message({ type: "error", message: res.message }) } }) }, base64ToBlob(dataURL) { console.log(dataURL) let arr = dataURL.split(',') let mimeType = arr[0].match(/:(.*?);/)[1] || 'image/png' let encodeStr = atob(arr[1]) let n = encodeStr.length let u8Arr = new Uint8Array(n) while (n--) { u8Arr[n] = encodeStr.charCodeAt(n) } return new Blob([u8Arr], { type: mimeType }) }, //转换成file blobToFile(blob, fileName) { // MIME Type const type = blob.type || 'text/plain' return new File([blob], fileName, { type }) }, //生成图片 scImg(){ let blob = this.base64ToBlob(this.dataURL) this.file = this.blobToFile(blob, '签名图片.png') console.log(this.file) }, }, created: function(){ }, mounted: function(){ this.checkScreenWidth(); window.addEventListener('resize', this.checkScreenWidth); this.username = this.$route.query.username; this.mobile= this.$route.query.mobile; this.tyhid = this.$route.query.tyhid; this.getTyh() let canvas = document.getElementById('canvas') // 创建 SignaturePad let options = { penColor: "rgb(66, 133, 244)", minWidth: 5, maxWidth: 10, } this.signaturePad = new SignaturePad(canvas, options); this.resizeCanvas() }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-interviewInfoOnlineGj-view", function(resolve, reject){ var template = "
\n \n
\n

步骤一: 打开腾讯会议

\n

步骤二: 点击录音选择云录音

\n

步骤三: 访谈结束保存录音地址

\n

步骤四: 最后提交填写

\n
\n\n \n 继续访谈\n \n \n
\n | 学生访谈\n
\n
\n
\n
\n \n
\n
\n
\n {{ item.xsmc }} \n
\n
\n
\n 学校:{{ item.xxmc }}\n
\n
\n 年级:{{item.xd==1?'小学':item.xd==2?'初中':item.xd==3?'高中':\n item.xd==4?'中职':\n item.xd==5?'高职':\n item.xd==7?'本科':\n item.xd==8?'硕士':\n item.xd==9?'博士':''}}{{ item.nj }}年级\n
\n
\n 学号:{{ item.xsxh }}\n
\n
\n 班级:{{ item.bj }}\n
\n
\n 联系方式:{{ item.xssjh }}\n
\n
\n
\n\n
\n\n\n\n\n \n
\n \n
\n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : calctmlx == 4||calctmlx == 5 ? '排序题' : calctmlx == 6?'滑块题':''}}\n \n \n \n {{currentList[0]?.questioncontent.split('%s')[indd]}}\n \n \n \n
\n
\t\n
\n \n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : calctmlx == 4||calctmlx == 5 ? '排序题' : ''}}\n \n\n\n \n \n {{currentList[1]?.questioncontent.split('%s')[indd2]}}\n \n \n\n \n
\n \n
\n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : calctmlx == 4||calctmlx == 5 ? '排序题' : ''}}\n \n \n \n {{currentList[2]?.questioncontent.split('%s')[indd3]}}\n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n\n \n {{item.optionNameArr[ind]}}\n \n __\n \n
\n
\n
\n \n
\n
\n \n \n {{item.optionNameArr[ind]}}\t\n \n \n \n \n
\n
\n \n
\n
\n
\n \n {{item.optionNameArr[ind]}}\n \n __\n \n
\n
\n
\n\n \n
\n
\n
\n \n {{item.optionNameArr[ind]}}\n \n __\n \n
\n
\n \n
\n
\n
\n
\n \n {{current==questionList.length?'提 交':'下 一 题 '}}\n \n \n
\n
\n
\n
\n \n \n {{ ftjlpg }} 分 \n \n \n {{ ftyypg }} 分\n \n \n {{ ftzspg }} 分\n \n \n \n {{ftjlwb}}\n \n \n {{ftyywb}}\n \n \n \n {{ftzswb}}\n \n \n \n {{ ftjkpg }} 分 \n\n \n \n \n {{ ftsjpg }} 分\n \n \n \n \n \n \n {{ftjkwb}}\n \n \n \n {{ftsjwb}}\n \n \n \n \n \n \n
\n {{ html1 ? html1.fkyjsm : '' }}:\n \n
\n
\n {{ html2 ? html2.fkyjsm : '' }}:\n \n
\n
\n {{ html3 ? html3.fkyjsm : '' }}:\n \n
\n
\n {{ html4 ? html4.fkyjsm : '' }}:\n \n
\n
\n {{ html5 ? html5.fkyjsm : '' }}:\n \n
\n
\n {{ html6? html6.fkyjsm : '' }}:\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 取消\n 提交\n \n \n \n
\n
\n \n
\n
\n 完成访谈\n
\n
\n 感谢您完成本次访谈!\n
\n
\n \n
好的
\n
\n \n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), item:'', openId:'', denominator: 16, activeIndex: -1, status:6, activeIndexs: [], input:'', textarea:'', questionList:[], current:0, currentList:[], ttMap:{}, loading:false, nextloading:false, evaId:'', //evaId:'', answerNumber:0, startTime:'', toolname:'', statusButton:true, colorMap:['','#067EFF','#FF8A0D','#3F23FF'], questionListbk:[], User:{}, questionAnswers:[ ], mediaRecorder: null, chunks: [], recording: false, recordingstatus: '', form:{ sfzdgy:'', sfcxzz:'', ftyj:'' }, dialogVisible: false, ftjlpg:'', ftyypg:'', ftzspg:'', lbid:'', score:0, dialogVisible1:false, isRecording: false, recorder: null, recordedChunks: [], audioUrl: null, yytm:[], zstm:[], tstm:[], tstmdf:0, tstmmzf:'', yytmdf:0, zstmdf:0, ftyywb:'', ftzswb:'', cur:'', lystatus:true, newTtMap:{}, Tg:false, yyjfft1df:0, yyjfft2df:0, yyjdqScoreSum:0, yyjdqSpecialScore:0, yyjwScoreSum1:0, yyjwScoreSum2:0, yyjwSpecialScore1:0, yyjwSpecialScore2:0, zsdf:0, jkza1df:0, tsjkza1df:0, tsjkza2df:0, sjjl1df:0, sjjl2df:0, sjjl3df:0, ftjlpg:'', ftsjpg:'', ftjkpg:'', ftsjwb:'', ftjkwb:'', ftjlwb:'', zszt:'', jlzt:'', yyzt:'', sjzt:'', jkzt:'', html1:'', html2:'', html3:'', html4:'', html5:'', html6:'', lywj:'', rules: { sfzdgy: [ { required: true, message: '此处是必填项', trigger: 'blur' }, ], sfcxzz: [ { required: true, message: '此处是必填项', trigger: 'blur' }, ], ftyj: [ { required: true, message: '此处是必填项', trigger: 'blur' }, ], lywj: [ { required: true, message: '此处是必填项', trigger: 'blur' }, { validator: this.validateHttpsUrl, trigger: 'blur' } ], }, lystatus: false, recordingTime: 0, timer: null, hasMicrophonePermission:false }; }, methods: { validateHttpsUrl(rule, value, callback) { if (!value) { callback(new Error('请输入网址')); } else if (!/^https:\/\/.*/.test(value)) { callback(new Error('此处应填写网址')); } else { callback(); } }, getredistm(){ var that = this var tmlist = localStorage.getItem('saveredistm') if(tmlist){ tmlist = JSON.parse(tmlist) that.questionAnswers = tmlist.answerList that.current = tmlist.current //that.current = 86 return } $.post("/www/public/st/getredistm", {stid:that.questionList[0]?.sjid}, function(res){ if(res.code==200){ if(res.data){ /*that.questionListbk = res.data let len =that.questionListbk.length let lastAnswer = that.questionListbk[len-1] if(len&&len>1){ res.data.forEach(item=>{ }) that.evaId = that.questionListbk[0] that.questionList[len-2].answer = lastAnswer that.current = len-1 //that.current = 194 }else{ that.current = 1 }*/ that.newTtMap = res.data.newTtMap that.questionAnswers = res.data.answerList that.current = res.data.current console.log(that.questionAnswers,'that.questionAnswers') }else{ that.current = 1 } }else{ that.current = 1 } //that.current = 86 //that.current = 220 }) }, validateHttpsUrl(rule, value, callback) { if (!value) { callback(new Error('请输入网址')); } else if (!/^https:\/\/.*/.test(value)) { callback(new Error('此处应填写网址')); } else { callback(); } }, goList(){ this.$router.push('interviewLS') }, open() { this.$alert('点击确定按钮开始答题。', '准备答题', { confirmButtonText: '确定', callback: action => { } }); }, previous(){ //this.status-- }, saveAll(){ console.log(this.Tg) if(this.current!=this.questionList.length&&this.Tg==false) return this.Tg=false this.endTime = new Date().getTime() const that = this that.loading = true that.nextloading=true var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} let data = { stuid:this.item.xsid, xm:this.item.xsmc, xxid:this.item.xx, xxmc:this.item.xxmc, nj:this.item.nj, bjid:this.item.bjid, bjmc:this.item.bj, xd:this.item.xd, ujs:this.item.yhjs, nfpc:this.item.xnd, questionAnswers:JSON.stringify({ toolId:this.currentListlast.toolid, openQuestionAnswerVOS:this.questionAnswers }), //openid:this.openId, stid:this.questionList[0].sjid, dtcnt:this.answerNumber, toolId:this.currentListlast.toolid, dttime:this.calculateTimeDifference(this.startTime,this.endTime), ftid:this.item.id, ftjlpg:this.ftjlpg, ftsjpg:this.ftsjpg, ftjkpg:this.ftjkpg, ftyypg:this.ftyypg, ftzspg:this.ftzspg, ftyywb:this.ftyywb, ftzswb:this.ftzswb, ftsjwb:this.ftsjwb, ftjkwb:this.ftjkwb, ftjlwb:this.ftjlwb, ftxs:'1' } $.post("/www/public/shouye/ft_newsaveda", data, (res) => { if (res.error == 0) { this.ftjlpg = res.data.ftjlpg this.ftyypg=res.data.ftyypg this.ftzspg = res.data.ftzspg this.ftsjpg = res.data.ftsjpg this.ftjkpg = res.data.ftjkpg this.ftyywb=res.data.ftyywb this.ftzswb=res.data.ftzswb this.ftsjwb=res.data.ftsjwb this.ftjkwb=res.data.ftjkwb this.ftjlwb=res.data.ftjlwb this.lbid=res.data.id this.statusButton=false }else{ this.$message({ type: "error", message: res.message }) } }); let info ={ zszt:this.zszt, jlzt:this.jlzt, yyzt:this.yyzt, sjzt:this.sjzt, jkzt:this.jkzt, ftid:this.item.id, ftxd:this.item.xd } console.log(info) $.post("/www/public/shouye/ft_saveftwd", info, (res) => { if (res.error == 0) { $.post("/www/public/shouye/ft_findyj", info, (res) => { let data ={ ftid:this.item.id, } if (res.error == 0) { this.html1 =res.data.jkwb this.html2 =res.data.jlwb this.html3 =res.data.sjwb this.html4 =res.data.wuwb this.html5 =res.data.yywb this.html6 =res.data.zswb }else{ this.$message({ type: "error", message: res.message }) } }); }else{ this.$message({ type: "error", message: res.message }) } }); }, calculateTimeDifference(startTime, endTime) { let timeDiff = endTime - startTime; let hours = Math.floor(timeDiff / (1000 * 60 * 60)); let minutes = Math.floor((timeDiff % (1000 * 60 * 60)) / (1000 * 60)); let seconds = Math.floor((timeDiff % (1000 * 60)) / 1000); return `${hours}时${minutes}分${seconds}秒`; }, submitSingle(){ var that = this if(that.loading) return that.loading = true console.log(that.currentListlast,'222222') if(that.currentListlast.questiontype==99){ that.next() return } var answer = that.currentListlast.answer if(that.calctmlx==1){ if(!answer||!answer.answerId){ that.loading = false return vant.Toast({ message:'请先选择/填写答案', icon: 'warning-o', }) //return that.$message.warning('请先答题') } }else if(that.calctmlx==2){ var inputContent = '' for(let iii = 0;iii{ if(item.fillValues){ console.log(item.fillValues,'item.fillValues') var keys = Object.keys(item.fillValues) keys.forEach(ii=>{ if(!item.fillValues[ii]){ mflag = true } }) } }) if(mflag){ return vant.Toast({ message:'选中选项有信息需未填写', icon: 'warning-o', }) } } }else{ if(Array.isArray(answer)&&!answer.length){ that.loading = false return vant.Toast({ message:'请先选择/填写答案', icon: 'warning-o', }) } } var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} var accessToken = localStorage.getItem('accessToken') var data = { toolId:that.currentListlast.toolid, //openId:that.openId, questionId:that.currentListlast.quesbusiid, evaId:that.evaId, } if(that.calctmlx==2){ data.inputContent = inputContent } if(that.calctmlx==1){ data.answerList = [that.currentListlast.answer] } if(that.calctmlx==3){ console.log(that.currentListlast.answer,'that.currentListlast.answer') var list = [] that.currentListlast.answer.forEach(item=>{ var text = '' console.log(item.fillValues) item.optionNameArr.forEach((iii,inn)=>{ var aaa if(item.fillValues){ aaa= item.fillValues[inn+'']?"####"+item.fillValues[inn+'']+"####":'' }else{ aaa = '' } text+=iii+aaa }) list.push({ answerId:item.answerId, answerText:text, }) }) data.answerList = list } let datas = { toolId:that.currentListlast.toolid, accessToken:localStorage.getItem('accessToken'), dadata:JSON.stringify(data) } if(that.calctmlx==3){ let checkboxRefs = that.$refs.checkboxRefs checkboxRefs.forEach(checkbox=>{ let inputbox = checkbox.querySelector('input[type="checkbox"]') inputbox.checked = false }) } if (that.calctmlx == 1) { const currentQuestionNumber = that.current; const scoreOfCurrentQuestion = that.currentListlast.answer.score; console.log('当前题目的题号:', currentQuestionNumber) console.log('需要加的分数:', scoreOfCurrentQuestion); let yyjw1 = ['1', '2', '3', '4', '8', '11', '14', '17', '20', '23', '26']; let yyjw2 = ['1', '2', '3', '4', '8', '33', '34', '35', '36', '37', '38']; let yyjwts1 = ['29']; let yyjwts2 = ['39']; for (let i = 0; i < yyjw1.length; i++) { if (yyjw1[i] == currentQuestionNumber) { that.yyjwScoreSum1 += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjw2.length; i++) { if (yyjw2[i] == currentQuestionNumber) { that.yyjwScoreSum2 += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjwts1.length; i++) { if (yyjwts1[i] == currentQuestionNumber) { that.yyjwSpecialScore1 += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjwts2.length; i++) { if (yyjwts2[i] == currentQuestionNumber) { that.yyjwSpecialScore2 += scoreOfCurrentQuestion; } } console.log(that.yyjwScoreSum1,'既往条件1得分') console.log(that.yyjwScoreSum2,'既往条件2得分') console.log(that.yyjwSpecialScore1,'特殊既往条件1得分') console.log(that.yyjwSpecialScore2,'特殊既往条件2得分') let yyjdq = ['1', '2', '3', '4', '7', '10', '13', '16', '19', '22', '25']; let yyjdqts = ['28']; for (let i = 0; i < yyjdq.length; i++) { if (yyjdq[i] == currentQuestionNumber) { that.yyjdqScoreSum += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjdqts.length; i++) { if (yyjdqts[i] == currentQuestionNumber) { that.yyjdqSpecialScore += scoreOfCurrentQuestion; } } console.log(that.yyjdqScoreSum,'当前条件1得分') console.log(that.yyjdqSpecialScore,'特殊当前条件1得分') let yyjfft1= ['30'] let yyjfft2= ['42'] for (let i = 0; i < yyjfft1.length; i++) { if (yyjfft1[i] == currentQuestionNumber) { that.yyjfft1df += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjfft2.length; i++) { if (yyjfft2[i] == currentQuestionNumber) { that.yyjfft2df += scoreOfCurrentQuestion; } } that.ftyypg = that.yyjwScoreSum1+that.yyjwScoreSum2+that.yyjdqScoreSum+that.yyjwSpecialScore1+that.yyjwSpecialScore2+ that.yyjdqSpecialScore+that.yyjfft1df+that.yyjfft2df console.log(that.ftyypg,'抑郁总分') if (that.yyjdqScoreSum >= 5 && that.yyjdqSpecialScore == 100 && that.yyjfft1df == 1 || that.yyjwScoreSum1 >= 5 && that.yyjwSpecialScore1 == 100 && that.yyjfft1df == 1 || that.yyjwScoreSum2 >= 5 && that.yyjwSpecialScore2 == 100 && that.yyjfft2df == 1) { console.log('抑郁发作-反复'); that.ftyywb ='抑郁发作-反复' that.yyzt ='3' } else if (that.yyjdqScoreSum >= 5 && that.yyjdqSpecialScore == 100) { console.log('抑郁发作-当前'); that.ftyywb ='抑郁发作-当前' that.yyzt ='2' } else if (that.yyjwScoreSum1 >= 5 && that.yyjwSpecialScore1 == 100 || that.yyjwScoreSum2 >= 5 && that.yyjwSpecialScore2 == 100) { console.log('抑郁发作-既往'); that.ftyywb ='抑郁发作-既往' that.yyzt ='1' } else { console.log('无抑郁'); that.ftyywb ='无抑郁' that.yyzt ='0' } //自杀 let zs = ['48','49','50','51','54','55','56','57','58','59','63','64','68']; for (let i = 0; i < zs.length; i++) { if (zs[i] == currentQuestionNumber) { that.zsdf +=scoreOfCurrentQuestion; } } that.ftzspg = that.zsdf console.log(that.ftzspg,'自杀得分') if(that.zsdf>17){ console.log('高度') that.ftzswb='高度' that.zszt ='3' }else if(that.zsdf>=9&&that.zsdf<=16){ console.log('中度') that.ftzswb='中度' that.zszt ='2' } else if(that.zsdf>=1&&that.zsdf<=8){ console.log('低度') that.ftzswb='低度' that.zszt ='1' }else{ console.log('无风险') that.ftzswb='无风险' that.zszt ='0' } //惊恐障碍 let jkza1 = ['166', '167', '168', '169', '170', '171', '172', '173', '174', '175', '176', '177', '178'] let tsjkza1=['164'] let tsjkza2=['179'] for (let i = 0; i < jkza1.length; i++) { if (jkza1[i] == currentQuestionNumber) { that.jkza1df +=scoreOfCurrentQuestion; } } for (let i = 0; i < tsjkza1.length; i++) { if (tsjkza1[i] == currentQuestionNumber) { that.tsjkza1df +=scoreOfCurrentQuestion; } } for (let i = 0; i < tsjkza2.length; i++) { if (tsjkza2[i] == currentQuestionNumber) { that.tsjkza2df +=scoreOfCurrentQuestion; } } that.ftjkpg = that.jkza1df+that.tsjkza1df+that.tsjkza2df console.log(that.ftjkpg,'惊恐障碍得分') if (that.jkza1df >= 4 && that.tsjkza1df == 100 && that.tsjkza2df == 1) { console.log('当前的惊恐障碍'); that.ftjkwb = '当前的惊恐障碍' that.jkzt ='1' } else if (that.jkza1df == 13) { console.log('终生的有限惊恐障碍'); that.ftjkwb = '终生的有限惊恐障碍' that.jkzt ='1' } else if (that.jkza1df >= 4 && that.tsjkza1df == 100) { console.log('终生惊恐障碍'); that.ftjkwb = '终生惊恐障碍' that.jkzt ='1' } else { console.log('无障碍'); that.ftjkwb = '无障碍' that.jkzt ='0' } //社交焦虑症 let sjjl1=['183'] let sjjl2=['184'] let sjjl3=['197'] for (let i = 0; i < sjjl1.length; i++) { if (sjjl1[i] == currentQuestionNumber) { that.sjjl1df +=scoreOfCurrentQuestion; } } for (let i = 0; i < sjjl2.length; i++) { if (sjjl2[i] == currentQuestionNumber) { that.sjjl2df +=scoreOfCurrentQuestion; } } for (let i = 0; i < sjjl3.length; i++) { if (sjjl3[i] == currentQuestionNumber) { that.sjjl3df +=scoreOfCurrentQuestion; } } that.ftsjpg =that.sjjl1df+that.sjjl2df+that.sjjl3df console.log(that.ftsjpg,'社交得分') if (that.sjjl2df==0&&that.sjjl1df==1) { console.log('非广泛性社交焦虑症'); that.ftsjwb='非广泛性社交焦虑症' that.sjzt='1' } else if (that.sjjl1df==1&&that.sjjl2df==1) { console.log('广泛性社交焦虑症'); that.ftsjwb='广泛性社交焦虑症' that.sjzt='1' } else { console.log('无'); that.ftsjwb='无' that.sjzt='0' } that.ftjlpg = that.sjjl3df console.log(that.ftjlpg,'焦虑得分') if (that.sjjl3df==1) { console.log('广泛性焦虑'); that.ftjlwb ='广泛性焦虑' that.jlzt='1' } else{ console.log('无'); that.ftjlwb ='无' that.jlzt='0' } } var data = { questionno:that.currentListlast.questionno, questionId:that.currentListlast.quesbusiid, inputContent:'', answerList:[{ answerId:'', answerText:'' }] } if(that.calctmlx==2){ data.inputContent = inputContent } if(that.calctmlx==1){ data.answerList = [{answerId:that.currentListlast.answer.answerId,answerText:''}] } if(that.calctmlx==3){ console.log(that.currentListlast.answer,'that.currentListlast.answer') var list = [] that.currentListlast.answer.forEach(item=>{ list.push({ answerId:item.answerId, answerText:item.answerId, }) }) data.answerList = list } that.questionAnswers.push(data) that.next() /* $.post("/www/public/st/savexfda", datas, function(res){ if(res&&res.code==200){ that.loading = false if(res.data.code==200){ that.evaId = res.data.data that.answerNumber++ that.next() }else{ that.$message({ type: "error", message: res.data.message }) } }else{ that.$message({ type: "error", message: '服务错误' }) that.loading = false } that.loading = false })*/ }, next(){ var that = this console.log(1111111) var answer = this.currentListlast.answer console.log(answer,'answer') //if(!answer||Array.isArray(answer)&&!answer.length) return that.$message.warning('请先答题') if(that.currentListlast.quesjumpquesno!=0){ this.current=this.currentListlast.quesjumpquesno }else if(that.currentListlast.scorejumpquesno!=0){ console.log(1) var scorejumpquesnoArr = that.currentListlast.scorejumpquesno.split(',') var lenth = scorejumpquesnoArr.length var score = answer.score console.log(answer,'answer') if(that.currentListlast.scorejumpnos){ console.log(that.newTtMap,'that.newTtMap') if(that.newTtMap[that.currentListlast.scorejumpnos]){ console.log(that.newTtMap,'that.newTtMap') }else{ console.log(that.newTtMap,'that.newTtMap') that.newTtMap[that.currentListlast.scorejumpnos] = 0 } that.newTtMap[that.currentListlast.scorejumpnos]+=score var arr = that.currentListlast.scorejumpnos.split(",") var th = arr[arr.length-1] var minarr=that.currentListlast.scorejumpmin.split(",") var maxarr=that.currentListlast.scorejumpmax.split(",") if(Number(th)==that.currentListlast.questionno){ let jumped = false for(let j=0;j=Number(minarr[j])&&that.newTtMap[that.currentListlast.scorejumpnos]<=Number(maxarr[j])){ that.current = Number(scorejumpquesnoArr[j]) jumped = true } } if(!jumped){ that.current++ } }else{ that.current++ } /*if(that.newTtMap[that.currentListlast.scorejumpnos]>=Number(this.currentListlast.scorejumpmin)&&that.newTtMap[that.currentListlast.scorejumpnos]<=Number(that.currentListlast.scorejumpmax)&&Number(th)==that.currentListlast.questionno){ console.log(that.currentListlast.scorejumpmax,'that.currentListlast.scorejumpmax') that.current = Number(that.currentListlast.scorejumpquesno) }else{ that.current++ }*/ /*console.log(3) var arr = that.currentListlast.scorejumpnos.split(",") that.ttMap[that.currentListlast.scorejumpnos]?console.log(1): that.ttMap[that.currentListlast.scorejumpnos]= {len:arr.length} var aaa = that.ttMap[that.currentListlast.scorejumpnos] if(score>=Number(this.currentListlast.scorejumpmin)&&score<=Number(this.currentListlast.scorejumpmax)){ aaa.score?aaa.score++:aaa.score=1 } if(aaa.score==aaa.len){ console.log(3) that.current = Number(this.currentListlast.scorejumpquesno) }else{ console.log(4) that.current++ }*/ }else{ if(score>=this.currentListlast.scorejumpmin&&score<=this.currentListlast.scorejumpmax){ that.current = Number(this.currentListlast.scorejumpquesno) console.log(6) }else{ console.log(7) that.current++ } } }else if(this.currentListlast._ansJumpQuesNo){ console.log(8) this.current=this.currentListlast._ansJumpQuesNo }else{ this.current++ console.log(this.current,'this.current111') } const jsonD = { answerList:that.questionAnswers, current:this.current, newTtMap:this.newTtMap } if(this.current<=this.questionList.length){ var aaab = JSON.stringify(jsonD) if(this.current%10==0){ $.post("/www/public/st/ft_saveredistm", {jsonData:aaab,stid:that.questionList[0]?.sjid}, function(res){ }) }else{ // localStorage.setItem('aa','34') localStorage.setItem('saveredistm',aaab) } } //this.activeIndexs = [] if(this.current>this.questionList.length){ this.current=this.questionList.length that.saveAll() }else{ that.loading = false } }, toggleActive(item,index) { if(item.mutexOptionNos){ if(item.mutexOptionNos){ var optionNos = item.mutexOptionNos.split(',') optionNos.forEach(itt=>{ let box = this.$refs.checkboxRefs[itt-1].querySelector('input[type="checkbox"]'); box.checked = false }) } } const checkbox = this.$refs.checkboxRefs[index].querySelector('input[type="checkbox"]'); checkbox.checked = !checkbox.checked; //this.updateCheckboxState(); }, updateCheckboxState() { this.$refs.checkboxRefs.forEach((checkboxRef, index) => { const checkbox = checkboxRef.querySelector('input[type="checkbox"]'); if (checkbox.checked) { this.activeIndexs.push(index); } }); }, gettmlist(){ var that = this const data = { rwxd:that.item.xd, ftid:that.item.id, } $.post("/www/public/shouye/ft_getftlb", data, function(res){ res.data.forEach(item=>{ let tmlx = that.gettmlx(item) if(tmlx==1){ item.answer = {} } //填空 if(tmlx==2){ //判断%s的数量 let _questioncontent = item.questioncontent.replace(/%s/g,'') var zhanweinumber = (item.questioncontent.length - _questioncontent.length)/2 //为0,说明是简答 console.log(zhanweinumber,'zhanweinumber',item.questionno) if(zhanweinumber==0){ item.isJianda = true }else if(zhanweinumber==1&&item.questioncontent.endsWith("%s")){ item.isJianda = true } console.log(item.isJianda,'item.isJianda') if(item.contenttype){ item.contenttype = item.contenttype.split('#') item.rules = item.contenttype.map((kk,ink)=>{ let rules={} if(kk=='0'){ rules.tag='el-input' }else if(kk=='1'){ rules.tag='el-input-number' }else if(kk=='2'){ rules.tag='el-input-number' } return rules }) console.log(item.rules,item.questionno) if(item.contentrule&&item.contentrule.length){ item.contentrule.map((kk,ink)=>{ var ins = Number(kk.number)-1 var arrr = kk.scope.split(',') var sco = [arrr[0].substring(1),arrr[1].substring(0,arrr[1].length-1)] console.log(sco,'sco') console.log(item.contenttype,'item.contenttype') if(item.contenttype&&item.contenttype[ins]=='0'){ item.rules[ins].minlength = sco[0] item.rules[ins].maxlength = sco[1] }else if(item.contenttype&&item.contenttype[ins]=='1'){ if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } item.rules[ins].step = 1 }else if(item.contenttype&&item.contenttype[ins]=='2'){ item.rules[ins].precision = kk.decimal if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } } return 11 }) }else{ } } var len1 = item.questioncontent.split("%s")?.length //构造答案个数,与输入框个数对应 if(item.isJianda&&zhanweinumber==0){ item.answer = new Array(1) }else{ item.answer = new Array(zhanweinumber) } } //多选 if(tmlx==3){ item.answer = [] item.activeIndex = [] } if(tmlx==4){ item.answer = [] } if(tmlx==5){ item.answer = new Array(item.maxoptcnt).fill('') } if(tmlx==6){ item.answer = 1 item.marks={ 1:item.startscope, [Number(item.segment)]:item.endscope } if(item.axisdesc){ var axisdescArr = item.axisdesc.split(';') item.marks[1] = axisdescArr[0] item.marks[Number(item.segment)] = axisdescArr[axisdescArr.length-1] } console.log(item.marks,'item.marks') } }) console.log(res.data,'that.questionList') that.questionList = res.data that.toolname = that.questionList[0]?.toolname that.getredistm() }) }, handleAct(item){ return this.currentListlast&&this.currentListlast.answer&&this.currentListlast.answer.answerBusiId==item.answerBusiId }, handleChoose(item,index){ if(this.calctmlx==1){ this.$set(this.currentListlast,'activeIndex',index) this.currentListlast.answer = {...item,answerId:item.answerBusiId,answerText:item.optionName} if(item.ansJumpQuesNo){ this.currentListlast._ansJumpQuesNo = item.ansJumpQuesNo }else{ this.currentListlast._ansJumpQuesNo = null } }else if(this.calctmlx==3){ var idex = this.currentListlast.activeIndex.indexOf(index) if(idex==-1){ if(item.ansJumpQuesNo){ this.currentListlast._ansJumpQuesNo = item.ansJumpQuesNo } if(this.currentListlast.maxoptcnt&&this.currentListlast.activeIndex.length>=this.currentListlast.maxoptcnt){ vant.Toast({ message:`最多选择${this.currentListlast.maxoptcnt}个选项`, icon: 'warning-o', }) }else{ if(item.mutexOptionNos){ var optionNos = item.mutexOptionNos.split(',') optionNos.forEach(itt=>{ var op = this.currentListlast.mpanswerdtolist[itt-1] console.log(op.answerBusiId,'op.answerBusiId') console.log(this.currentListlast.answer,'this.currentListlast.answer') if(op){ this.currentListlast.answer = this.currentListlast.answer.filter(an=>an.answerBusiId!=op.answerBusiId) this.currentListlast.activeIndex = this.currentListlast.activeIndex.filter(index1=>index1!=itt-1) } }) } this.currentListlast.activeIndex.push(index) console.log(item.answerBusiId,'item.answerBusiId') this.currentListlast.answer.push({...item,answerId:item.answerBusiId,answerText:item.optionName}) this.toggleActive(item,index) } }else{ this.currentListlast.activeIndex.splice(idex,1) this.currentListlast.answer.splice(idex,1) this.toggleActive(item,index) if(item.ansJumpQuesNo){s this.currentListlast._ansJumpQuesNo = null } } } //console.log(JSON.stringify(this.currentListlast.answer),'this.currentListlast.answer') }, aaa(que){ var that = this var pcur = that.questionList[que.parentno-1] that.currentList.unshift(pcur) if(pcur.parentno!=0){ that.aaa(pcur) } }, gettmlx(item){ //单选题 if(item.questiontype==2&&item.ismult==0){ return 1 } //填空题 if(item.questiontype==1&&item.replytype==2){ return 2 } //多选 if(item.questiontype==2&&item.ismult==1){ return 3 } }, goBack(){ if(this.item.iftest==1){ this.$router.push({ path: '/interviewLS', query: { status: '1' } }); }else{ this.$router.push('interviewLS') } }, formatTime(totalSeconds) { const minutes = Math.floor(totalSeconds / 60); const seconds = totalSeconds % 60; return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`; }, onSubmit(formRef) { this.$refs.formRef.validate((valid) => { if (valid) { var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} let data = { ftjlpg:this.ftjlpg, ftyypg:this.ftyypg, ftzspg:this.ftzspg, ftsjpg:this.ftsjpg , ftjkpg:this.ftjkpg, ftyywb:this.ftyywb, ftzswb:this.ftzswb, ftsjwb:this.ftsjwb, ftjkwb:this.ftjkwb, ftjlwb:this.ftjlwb, ...this.form, ftid:this.item.id, lbid:this.lbid, } $.post("/www/public/shouye/ft_saveftjl", data, (res) => { if (res.error == 0) { localStorage.removeItem('saveredistm') let data = { stuid:this.item.xsid, } $.post("/www/public/st/ft_delredistm", data, (res) => { if (res.error == 0) { }else{ this.$message({ type: "error", message: res.message }) } }); if(res.data.statu==1){ this.$router.push({ path: '/interviewLS', query: { status: '1' } }); }else{ this.dialogVisible=true } }else{ this.$message({ type: "error", message: res.message }) } }); } else { return false; } }); }, cancel(){ this.$router.push('interviewLS') }, getImgsrc(val) { return "/content/image/xljkls/"+val }, format(percentage) { return `${this.current} / ${this.questionList.length}`; }, }, computed: { currentListlast(){ var len = this.currentList.length var cu = this.currentList[len-1] if(this.gettmlx(cu)==1||this.gettmlx(cu)==3){ cu.mpanswerdtolist.forEach((item,inde)=>{ if(item.replyType==2){ item.optionNameArr = item.optionName.split('%s') if(item.contentType&&!Array.isArray(item.contentType)){ item.fillValues = {} console.log(item.contentType,'item.contentType') item.contentType = item.contentType.split('#') item.rules = item.contentType.map((kk,ink)=>{ let rules={} if(kk=='0'){ rules.tag='el-input' item.fillValues[ink+''] = '' }else if(kk=='1'){ rules.tag='el-input-number' item.fillValues[ink+''] = undefined }else if(kk=='2'){ rules.tag='el-input-number' item.fillValues[ink+''] =undefined } return rules }) console.log(item.contentType,'item.contentType') console.log(item.fillValues,'item.fillValues') console.log(item.rules,'item.rules') if(item.contentRule&&item.contentRule.length){ item.contentRule = JSON.parse(item.contentRule) item.contentRule.map((kk,ink)=>{ var ins = Number(kk.number)-1 var arrr = kk.scope.split(',') var sco = [arrr[0].substring(1),arrr[1].substring(0,arrr[1].length-1)] console.log(sco,'sco') console.log(item.contentType,'item.contentType') if(item.contentType[ins]=='0'){ item.rules[ins].minlength = sco[0] item.rules[ins].maxlength = sco[1] }else if(item.contentType[ins]=='1'){ if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } item.rules[ins].step = 1 }else if(item.contentType[ins]=='2'){ item.rules[ins].precision = kk.decimal if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } } return 11 }) } }else{ } console.log(item.optionNameArr,'item') }else{ item.optionNameArr = [item.optionName] } }) } console.log(cu,'cu') console.log(JSON.stringify(this.currentList),'this.currentList') return cu }, calculatedPercentage() { if (!this.questionList.length) { return 0; // 避免除零错误 } return (this.current / this.questionList.length) * 110; }, calctmlx(){ //单选题 if(this.currentListlast&&this.currentListlast.questiontype==2&&this.currentListlast.ismult==0){ return 1 } //填空题 if(this.currentListlast&&this.currentListlast.questiontype==1&&this.currentListlast.replytype==2){ return 2 } //多选 if(this.currentListlast&&this.currentListlast.questiontype==2&&this.currentListlast.ismult==1){ return 3 } } }, watch:{ current:{ handler(val){ if(!val) return var that = this var cur = that.questionList[val-1] if(!cur){return} if(cur.questiontype==1&&cur.replytype==0){ that.current++ return } if(cur.parentno!=0){ if(that.currentList[0]?.parentno!=0){ that.currentList.unshift(cur) }else{ that.currentList = [] that.currentList.unshift(cur) } that.aaa(cur) }else{ var length = that.currentList.length that.currentList = [] that.currentList.unshift(cur) } }, immediate: true }, currentList:{ handler(val){ }, immediate:true }, answerNumber(val){ } }, created: function(){ let that = this that.item = JSON.parse(localStorage.getItem('stuItem')); let data = { ftid:that.item.id } $.post("/www/public/shouye/ft_selifdt", data, function(res){ if(res.error==0){ if(res.data.dtzt==1){ $.post("/www/public/shouye/ft_findyj", {ftid:that.item.id}, (res) => { if (res.error == 0) { that.html1 =res.data.jkwb that.html2 =res.data.jlwb that.html3 =res.data.sjwb that.html4 =res.data.wuwb that.html5 =res.data.yywb that.html6 =res.data.zswb }else{ this.$message({ type: "error", message: res.message }) } }); that.ftjlpg = res.data.ftjlpg that.ftyypg=res.data.ftyypg that.ftzspg = res.data.ftzspg that.ftsjpg = res.data.ftsjpg that.ftjkpg = res.data.ftjkpg that.ftyywb=res.data.ftyywb that.ftzswb=res.data.ftzswb that.ftsjwb=res.data.ftsjwb that.ftjkwb=res.data.ftjkwb that.ftjlwb=res.data.ftjlwb that.lbid=res.data.id that.statusButton=false that.dialogVisible1=false }else{ that.statusButton=true } } }) let xdid = { tmxd:that.item.xd } $.post("/www/public/shouye/ft_lbtmbd", xdid, (res) => { if (res.error ==0 ) { this.yytm = res.data.yytm this.zstm = res.data.zstm this.tstm=res.data.tstm this.tstmmzf=res.data.tstmmzf } }); that.gettmlist() that.startTime = new Date().getTime(); }, mounted: function(){ /* $.post("/www/public/liangbiao/cp_getAccessToken", {}, function(res){ if(res.code==200){ localStorage.setItem('accessToken', res.data.accessToken) } })*/ // this.getOpenId() //this.dialogVisible1=true if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { navigator.mediaDevices.getUserMedia({ audio: true }).then( stream => { console.log("已获得麦克风权限!"); this.hasMicrophonePermission = true; // 获取权限成功,设置标志为 true }, () => { console.log("未获得麦克风权限!"); this.hasMicrophonePermission = false; // 获取权限失败,设置标志为 false } ); } else { console.log("浏览器不支持 getUserMedia"); // 如果浏览器不支持 getUserMedia,可以视情况设置标志为 false this.hasMicrophonePermission = false; } }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-interviewInfoLSGj-view", function(resolve, reject){ var template = "
\n \n \n\n \n {{ isRecording ? '停止测试' : '测试录音' }}\n 播放\n 下一步\n \n \n
\n | 学生访谈\n
\n
\n
\n
\n \n
\n
\n
\n {{ item.xsmc }} \n
\n
\n
\n 学校:{{ item.xxmc }}\n
\n
\n 年级:{{item.xd==1?'小学':item.xd==2?'初中':item.xd==3?'高中':\n item.xd==4?'中职':\n item.xd==5?'高职':\n item.xd==7?'本科':\n item.xd==8?'硕士':\n item.xd==9?'博士':''}}{{ item.nj }}年级\n
\n
\n 学号:{{ item.xsxh }}\n
\n
\n 班级:{{ item.bj }}\n
\n
\n 联系方式:{{ item.xssjh }}\n
\n
\n\n
\n\n
\n
\n 开始
录音\n
\n
\n 暂停
录音\n
\n
\n 继续
录音\n
\n

{{ formatTime(recordingTime) }}

\n
\n
\n\n\n\n\n
\n \n
\n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : calctmlx == 4||calctmlx == 5 ? '排序题' : calctmlx == 6?'滑块题':''}}\n \n \n \n {{currentList[0]?.questioncontent.split('%s')[indd]}}\n \n \n \n
\n
\t\n
\n \n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : calctmlx == 4||calctmlx == 5 ? '排序题' : ''}}\n \n\n\n \n \n {{currentList[1]?.questioncontent.split('%s')[indd2]}}\n \n \n\n \n
\n \n
\n
\n \n {{ calctmlx == 1 ? '单选' : calctmlx == 2 ? '填空' : calctmlx == 3 ? '多选' : calctmlx == 4||calctmlx == 5 ? '排序题' : ''}}\n \n \n \n {{currentList[2]?.questioncontent.split('%s')[indd3]}}\n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n\n \n {{item.optionNameArr[ind]}}\n \n __\n \n
\n
\n
\n \n
\n
\n \n \n {{item.optionNameArr[ind]}}\t\n \n \n \n \n
\n
\n \n
\n
\n
\n \n {{item.optionNameArr[ind]}}\n \n __\n \n
\n
\n
\n\n \n
\n
\n
\n \n {{item.optionNameArr[ind]}}\n \n __\n \n
\n
\n \n
\n
\n
\n
\n \n {{current==questionList.length?'提 交':'下 一 题 '}}\n \n \n
\n
\n
\n
\n \n \n {{ ftjlpg }} 分 \n \n \n {{ ftyypg }} 分\n \n \n {{ ftzspg }} 分\n \n \n \n {{ftjlwb}}\n \n \n {{ftyywb}}\n \n \n \n {{ftzswb}}\n \n \n \n {{ ftjkpg }} 分 \n\n \n \n \n {{ ftsjpg }} 分\n \n \n \n \n \n \n {{ftjkwb}}\n \n \n \n {{ftsjwb}}\n \n \n \n \n \n \n
\n {{ html1 ? html1.fkyjsm : '' }}:\n \n
\n
\n {{ html2 ? html2.fkyjsm : '' }}:\n \n
\n
\n {{ html3 ? html3.fkyjsm : '' }}:\n \n
\n
\n {{ html4 ? html4.fkyjsm : '' }}:\n \n
\n
\n {{ html5 ? html5.fkyjsm : '' }}:\n \n
\n
\n {{ html6? html6.fkyjsm : '' }}:\n \n
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 取消\n 提交\n \n \n \n
\n
\n \n
\n
\n 完成访谈\n
\n
\n 感谢您完成本次访谈!\n
\n
\n \n
好的
\n
\n \n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), item:'', openId:'', denominator: 16, activeIndex: -1, status:6, activeIndexs: [], input:'', textarea:'', questionList:[], current:0, currentList:[], ttMap:{}, loading:false, nextloading:false, evaId:'', //evaId:'', answerNumber:0, startTime:'', toolname:'', statusButton:true, colorMap:['','#067EFF','#FF8A0D','#3F23FF'], questionListbk:[], User:{}, questionAnswers:[ ], mediaRecorder: null, chunks: [], recording: false, recordingstatus: '', form:{ sfzdgy:'', sfcxzz:'', ftyj:'' }, dialogVisible: false, ftjlpg:'', ftyypg:'', ftzspg:'', lbid:'', score:0, dialogVisible1:false, isRecording: false, recorder: null, recordedChunks: [], audioUrl: null, yytm:[], zstm:[], tstm:[], tstmdf:0, tstmmzf:'', yytmdf:0, zstmdf:0, ftyywb:'', ftzswb:'', cur:'', lystatus:true, newTtMap:{}, Tg:false, yyjfft1df:0, yyjfft2df:0, yyjdqScoreSum:0, yyjdqSpecialScore:0, yyjwScoreSum1:0, yyjwScoreSum2:0, yyjwSpecialScore1:0, yyjwSpecialScore2:0, zsdf:0, jkza1df:0, tsjkza1df:0, tsjkza2df:0, sjjl1df:0, sjjl2df:0, sjjl3df:0, ftjlpg:'', ftsjpg:'', ftjkpg:'', ftsjwb:'', ftjkwb:'', ftjlwb:'', zszt:'', jlzt:'', yyzt:'', sjzt:'', jkzt:'', html1:'', html2:'', html3:'', html4:'', html5:'', html6:'', rules: { sfzdgy: [ { required: true, message: '此处是必填项', trigger: 'blur' }, ], sfcxzz: [ { required: true, message: '此处是必填项', trigger: 'blur' }, ], ftyj: [ { required: true, message: '此处是必填项', trigger: 'blur' }, ], }, lystatus: false, recordingTime: 0, timer: null, hasMicrophonePermission:false }; }, methods: { getredistm(){ var that = this var tmlist = localStorage.getItem('saveredistm') if(tmlist){ tmlist = JSON.parse(tmlist) that.questionAnswers = tmlist.answerList that.current = tmlist.current //that.current = 86 return } $.post("/www/public/st/getredistm", {stid:that.questionList[0]?.sjid}, function(res){ if(res.code==200){ if(res.data){ /*that.questionListbk = res.data let len =that.questionListbk.length let lastAnswer = that.questionListbk[len-1] if(len&&len>1){ res.data.forEach(item=>{ }) that.evaId = that.questionListbk[0] that.questionList[len-2].answer = lastAnswer that.current = len-1 //that.current = 194 }else{ that.current = 1 }*/ that.newTtMap = res.data.newTtMap that.questionAnswers = res.data.answerList that.current = res.data.current console.log(that.questionAnswers,'that.questionAnswers') }else{ that.current = 1 } }else{ that.current = 1 } //that.current = 86 //that.current = 220 }) }, goList(){ this.$router.push('interviewLS') }, open() { this.$alert('点击确定按钮开始答题。', '准备答题', { confirmButtonText: '确定', callback: action => { } }); }, previous(){ //this.status-- }, saveAll(){ console.log(this.Tg) if(this.current!=this.questionList.length&&this.Tg==false) return if(this.recording){ this.stopRecording() } this.Tg=false this.endTime = new Date().getTime() const that = this that.loading = true that.nextloading=true var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} let data = { stuid:this.item.xsid, xm:this.item.xsmc, xxid:this.item.xx, xxmc:this.item.xxmc, nj:this.item.nj, bjid:this.item.bjid, bjmc:this.item.bj, xd:this.item.xd, ujs:this.item.yhjs, nfpc:this.item.xnd, questionAnswers:JSON.stringify({ toolId:this.currentListlast.toolid, openQuestionAnswerVOS:this.questionAnswers }), //openid:this.openId, stid:this.questionList[0].sjid, dtcnt:this.answerNumber, toolId:this.currentListlast.toolid, dttime:this.calculateTimeDifference(this.startTime,this.endTime), ftid:this.item.id, ftjlpg:this.ftjlpg, ftsjpg:this.ftsjpg, ftjkpg:this.ftjkpg, ftyypg:this.ftyypg, ftzspg:this.ftzspg, ftyywb:this.ftyywb, ftzswb:this.ftzswb, ftsjwb:this.ftsjwb, ftjkwb:this.ftjkwb, ftjlwb:this.ftjlwb, ftxs:'2' } $.post("/www/public/shouye/ft_newsaveda", data, (res) => { if (res.error == 0) { this.ftjlpg = res.data.ftjlpg this.ftyypg=res.data.ftyypg this.ftzspg = res.data.ftzspg this.ftsjpg = res.data.ftsjpg this.ftjkpg = res.data.ftjkpg this.ftyywb=res.data.ftyywb this.ftzswb=res.data.ftzswb this.ftsjwb=res.data.ftsjwb this.ftjkwb=res.data.ftjkwb this.ftjlwb=res.data.ftjlwb this.lbid=res.data.id this.statusButton=false }else{ this.$message({ type: "error", message: res.message }) } }); let info ={ zszt:this.zszt, jlzt:this.jlzt, yyzt:this.yyzt, sjzt:this.sjzt, jkzt:this.jkzt, ftid:this.item.id, ftxd:this.item.xd } console.log(info) $.post("/www/public/shouye/ft_saveftwd", info, (res) => { if (res.error == 0) { $.post("/www/public/st/ft_findyj", info, (res) => { let data ={ ftid:this.item.id, } if (res.error == 0) { this.html1 =res.data.jkwb this.html2 =res.data.jlwb this.html3 =res.data.sjwb this.html4 =res.data.wuwb this.html5 =res.data.yywb this.html6 =res.data.zswb }else{ this.$message({ type: "error", message: res.message }) } }); }else{ this.$message({ type: "error", message: res.message }) } }); }, calculateTimeDifference(startTime, endTime) { let timeDiff = endTime - startTime; let hours = Math.floor(timeDiff / (1000 * 60 * 60)); let minutes = Math.floor((timeDiff % (1000 * 60 * 60)) / (1000 * 60)); let seconds = Math.floor((timeDiff % (1000 * 60)) / 1000); return `${hours}时${minutes}分${seconds}秒`; }, submitSingle(){ // 在这里检查标志变量,决定是否执行后续代码 if (this.hasMicrophonePermission) { // 执行后续代码,例如调用 submitSingle() 方法 console.log("已获得麦克风权限,执行后续操作。"); } else { // 没有权限的处理逻辑 console.log("没有麦克风权限,无法执行后续操作。"); this.$message({ type: "error", message: "授权失败!请检查麦克风权限。" }) return } if(!this.recording){ this.startRecording() } var that = this if(that.loading) return that.loading = true console.log(that.currentListlast,'222222') if(that.currentListlast.questiontype==99){ that.next() return } var answer = that.currentListlast.answer if(that.calctmlx==1){ if(!answer||!answer.answerId){ that.loading = false return vant.Toast({ message:'请先选择/填写答案', icon: 'warning-o', }) //return that.$message.warning('请先答题') } }else if(that.calctmlx==2){ var inputContent = '' for(let iii = 0;iii{ if(item.fillValues){ console.log(item.fillValues,'item.fillValues') var keys = Object.keys(item.fillValues) keys.forEach(ii=>{ if(!item.fillValues[ii]){ mflag = true } }) } }) if(mflag){ return vant.Toast({ message:'选中选项有信息需未填写', icon: 'warning-o', }) } } }else{ if(Array.isArray(answer)&&!answer.length){ that.loading = false return vant.Toast({ message:'请先选择/填写答案', icon: 'warning-o', }) } } var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} var accessToken = localStorage.getItem('accessToken') var data = { toolId:that.currentListlast.toolid, //openId:that.openId, questionId:that.currentListlast.quesbusiid, evaId:that.evaId, } if(that.calctmlx==2){ data.inputContent = inputContent } if(that.calctmlx==1){ data.answerList = [that.currentListlast.answer] } if(that.calctmlx==3){ console.log(that.currentListlast.answer,'that.currentListlast.answer') var list = [] that.currentListlast.answer.forEach(item=>{ var text = '' console.log(item.fillValues) item.optionNameArr.forEach((iii,inn)=>{ var aaa if(item.fillValues){ aaa= item.fillValues[inn+'']?"####"+item.fillValues[inn+'']+"####":'' }else{ aaa = '' } text+=iii+aaa }) list.push({ answerId:item.answerId, answerText:text, }) }) data.answerList = list } let datas = { toolId:that.currentListlast.toolid, accessToken:localStorage.getItem('accessToken'), dadata:JSON.stringify(data) } if(that.calctmlx==3){ let checkboxRefs = that.$refs.checkboxRefs checkboxRefs.forEach(checkbox=>{ let inputbox = checkbox.querySelector('input[type="checkbox"]') inputbox.checked = false }) } if (that.calctmlx == 1) { const currentQuestionNumber = that.current; const scoreOfCurrentQuestion = that.currentListlast.answer.score; console.log('当前题目的题号:', currentQuestionNumber) console.log('需要加的分数:', scoreOfCurrentQuestion); let yyjw1 = ['1', '2', '3', '4', '8', '11', '14', '17', '20', '23', '26']; let yyjw2 = ['1', '2', '3', '4', '8', '33', '34', '35', '36', '37', '38']; let yyjwts1 = ['29']; let yyjwts2 = ['39']; for (let i = 0; i < yyjw1.length; i++) { if (yyjw1[i] == currentQuestionNumber) { that.yyjwScoreSum1 += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjw2.length; i++) { if (yyjw2[i] == currentQuestionNumber) { that.yyjwScoreSum2 += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjwts1.length; i++) { if (yyjwts1[i] == currentQuestionNumber) { that.yyjwSpecialScore1 += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjwts2.length; i++) { if (yyjwts2[i] == currentQuestionNumber) { that.yyjwSpecialScore2 += scoreOfCurrentQuestion; } } console.log(that.yyjwScoreSum1,'既往条件1得分') console.log(that.yyjwScoreSum2,'既往条件2得分') console.log(that.yyjwSpecialScore1,'特殊既往条件1得分') console.log(that.yyjwSpecialScore2,'特殊既往条件2得分') let yyjdq = ['1', '2', '3', '4', '7', '10', '13', '16', '19', '22', '25']; let yyjdqts = ['28']; for (let i = 0; i < yyjdq.length; i++) { if (yyjdq[i] == currentQuestionNumber) { that.yyjdqScoreSum += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjdqts.length; i++) { if (yyjdqts[i] == currentQuestionNumber) { that.yyjdqSpecialScore += scoreOfCurrentQuestion; } } console.log(that.yyjdqScoreSum,'当前条件1得分') console.log(that.yyjdqSpecialScore,'特殊当前条件1得分') let yyjfft1= ['30'] let yyjfft2= ['42'] for (let i = 0; i < yyjfft1.length; i++) { if (yyjfft1[i] == currentQuestionNumber) { that.yyjfft1df += scoreOfCurrentQuestion; } } for (let i = 0; i < yyjfft2.length; i++) { if (yyjfft2[i] == currentQuestionNumber) { that.yyjfft2df += scoreOfCurrentQuestion; } } that.ftyypg = that.yyjwScoreSum1+that.yyjwScoreSum2+that.yyjdqScoreSum+that.yyjwSpecialScore1+that.yyjwSpecialScore2+ that.yyjdqSpecialScore+that.yyjfft1df+that.yyjfft2df console.log(that.ftyypg,'抑郁总分') if (that.yyjdqScoreSum >= 5 && that.yyjdqSpecialScore == 100 && that.yyjfft1df == 1 || that.yyjwScoreSum1 >= 5 && that.yyjwSpecialScore1 == 100 && that.yyjfft1df == 1 || that.yyjwScoreSum2 >= 5 && that.yyjwSpecialScore2 == 100 && that.yyjfft2df == 1) { console.log('抑郁发作-反复'); that.ftyywb ='抑郁发作-反复' that.yyzt ='3' } else if (that.yyjdqScoreSum >= 5 && that.yyjdqSpecialScore == 100) { console.log('抑郁发作-当前'); that.ftyywb ='抑郁发作-当前' that.yyzt ='2' } else if (that.yyjwScoreSum1 >= 5 && that.yyjwSpecialScore1 == 100 || that.yyjwScoreSum2 >= 5 && that.yyjwSpecialScore2 == 100) { console.log('抑郁发作-既往'); that.ftyywb ='抑郁发作-既往' that.yyzt ='1' } else { console.log('无抑郁'); that.ftyywb ='无抑郁' that.yyzt ='0' } //自杀 let zs = ['48','49','50','51','54','55','56','57','58','59','63','64','68']; for (let i = 0; i < zs.length; i++) { if (zs[i] == currentQuestionNumber) { that.zsdf +=scoreOfCurrentQuestion; } } that.ftzspg = that.zsdf console.log(that.ftzspg,'自杀得分') if(that.zsdf>17){ console.log('高度') that.ftzswb='高度' that.zszt ='3' }else if(that.zsdf>=9&&that.zsdf<=16){ console.log('中度') that.ftzswb='中度' that.zszt ='2' } else if(that.zsdf>=1&&that.zsdf<=8){ console.log('低度') that.ftzswb='低度' that.zszt ='1' }else{ console.log('无风险') that.ftzswb='无风险' that.zszt ='0' } //惊恐障碍 let jkza1 = ['166', '167', '168', '169', '170', '171', '172', '173', '174', '175', '176', '177', '178'] let tsjkza1=['164'] let tsjkza2=['179'] for (let i = 0; i < jkza1.length; i++) { if (jkza1[i] == currentQuestionNumber) { that.jkza1df +=scoreOfCurrentQuestion; } } for (let i = 0; i < tsjkza1.length; i++) { if (tsjkza1[i] == currentQuestionNumber) { that.tsjkza1df +=scoreOfCurrentQuestion; } } for (let i = 0; i < tsjkza2.length; i++) { if (tsjkza2[i] == currentQuestionNumber) { that.tsjkza2df +=scoreOfCurrentQuestion; } } that.ftjkpg = that.jkza1df+that.tsjkza1df+that.tsjkza2df console.log(that.ftjkpg,'惊恐障碍得分') if (that.jkza1df >= 4 && that.tsjkza1df == 100 && that.tsjkza2df == 1) { console.log('当前的惊恐障碍'); that.ftjkwb = '当前的惊恐障碍' that.jkzt ='1' } else if (that.jkza1df == 13) { console.log('终生的有限惊恐障碍'); that.ftjkwb = '终生的有限惊恐障碍' that.jkzt ='1' } else if (that.jkza1df >= 4 && that.tsjkza1df == 100) { console.log('终生惊恐障碍'); that.ftjkwb = '终生惊恐障碍' that.jkzt ='1' } else { console.log('无障碍'); that.ftjkwb = '无障碍' that.jkzt ='0' } //社交焦虑症 let sjjl1=['183'] let sjjl2=['184'] let sjjl3=['197'] for (let i = 0; i < sjjl1.length; i++) { if (sjjl1[i] == currentQuestionNumber) { that.sjjl1df +=scoreOfCurrentQuestion; } } for (let i = 0; i < sjjl2.length; i++) { if (sjjl2[i] == currentQuestionNumber) { that.sjjl2df +=scoreOfCurrentQuestion; } } for (let i = 0; i < sjjl3.length; i++) { if (sjjl3[i] == currentQuestionNumber) { that.sjjl3df +=scoreOfCurrentQuestion; } } that.ftsjpg =that.sjjl1df+that.sjjl2df+that.sjjl3df console.log(that.ftsjpg,'社交得分') if (that.sjjl2df==0&&that.sjjl1df==1) { console.log('非广泛性社交焦虑症'); that.ftsjwb='非广泛性社交焦虑症' that.sjzt='1' } else if (that.sjjl1df==1&&that.sjjl2df==1) { console.log('广泛性社交焦虑症'); that.ftsjwb='广泛性社交焦虑症' that.sjzt='1' } else { console.log('无'); that.ftsjwb='无' that.sjzt='0' } that.ftjlpg = that.sjjl3df console.log(that.ftjlpg,'焦虑得分') if (that.sjjl3df==1) { console.log('广泛性焦虑'); that.ftjlwb ='广泛性焦虑' that.jlzt='1' } else{ console.log('无'); that.ftjlwb ='无' that.jlzt='0' } } var data = { questionno:that.currentListlast.questionno, questionId:that.currentListlast.quesbusiid, inputContent:'', answerList:[{ answerId:'', answerText:'' }] } if(that.calctmlx==2){ data.inputContent = inputContent } if(that.calctmlx==1){ data.answerList = [{answerId:that.currentListlast.answer.answerId,answerText:''}] } if(that.calctmlx==3){ console.log(that.currentListlast.answer,'that.currentListlast.answer') var list = [] that.currentListlast.answer.forEach(item=>{ list.push({ answerId:item.answerId, answerText:item.answerId, }) }) data.answerList = list } that.questionAnswers.push(data) that.next() /* $.post("/www/public/st/savexfda", datas, function(res){ if(res&&res.code==200){ that.loading = false if(res.data.code==200){ that.evaId = res.data.data that.answerNumber++ that.next() }else{ that.$message({ type: "error", message: res.data.message }) } }else{ that.$message({ type: "error", message: '服务错误' }) that.loading = false } that.loading = false })*/ }, /* getOpenId(){ let data = { stuid:this.item.xsid, stuname:this.item.xsmc, accessToken:localStorage.getItem('accessToken') } $.post("/www/public/shouye/ft_getxfxsxx", data, (res) => { if (res.code === 200) { this.openId=res.data.openId } }); },*/ next(){ var that = this console.log(1111111) var answer = this.currentListlast.answer console.log(answer,'answer') //if(!answer||Array.isArray(answer)&&!answer.length) return that.$message.warning('请先答题') if(that.currentListlast.quesjumpquesno!=0){ this.current=this.currentListlast.quesjumpquesno }else if(that.currentListlast.scorejumpquesno!=0){ console.log(1) var scorejumpquesnoArr = that.currentListlast.scorejumpquesno.split(',') var lenth = scorejumpquesnoArr.length var score = answer.score console.log(answer,'answer') if(that.currentListlast.scorejumpnos){ console.log(that.newTtMap,'that.newTtMap') if(that.newTtMap[that.currentListlast.scorejumpnos]){ console.log(that.newTtMap,'that.newTtMap') }else{ console.log(that.newTtMap,'that.newTtMap') that.newTtMap[that.currentListlast.scorejumpnos] = 0 } that.newTtMap[that.currentListlast.scorejumpnos]+=score var arr = that.currentListlast.scorejumpnos.split(",") var th = arr[arr.length-1] var minarr=that.currentListlast.scorejumpmin.split(",") var maxarr=that.currentListlast.scorejumpmax.split(",") if(Number(th)==that.currentListlast.questionno){ let jumped = false for(let j=0;j=Number(minarr[j])&&that.newTtMap[that.currentListlast.scorejumpnos]<=Number(maxarr[j])){ that.current = Number(scorejumpquesnoArr[j]) jumped = true } } if(!jumped){ that.current++ } }else{ that.current++ } /*if(that.newTtMap[that.currentListlast.scorejumpnos]>=Number(this.currentListlast.scorejumpmin)&&that.newTtMap[that.currentListlast.scorejumpnos]<=Number(that.currentListlast.scorejumpmax)&&Number(th)==that.currentListlast.questionno){ console.log(that.currentListlast.scorejumpmax,'that.currentListlast.scorejumpmax') that.current = Number(that.currentListlast.scorejumpquesno) }else{ that.current++ }*/ /*console.log(3) var arr = that.currentListlast.scorejumpnos.split(",") that.ttMap[that.currentListlast.scorejumpnos]?console.log(1): that.ttMap[that.currentListlast.scorejumpnos]= {len:arr.length} var aaa = that.ttMap[that.currentListlast.scorejumpnos] if(score>=Number(this.currentListlast.scorejumpmin)&&score<=Number(this.currentListlast.scorejumpmax)){ aaa.score?aaa.score++:aaa.score=1 } if(aaa.score==aaa.len){ console.log(3) that.current = Number(this.currentListlast.scorejumpquesno) }else{ console.log(4) that.current++ }*/ }else{ if(score>=this.currentListlast.scorejumpmin&&score<=this.currentListlast.scorejumpmax){ that.current = Number(this.currentListlast.scorejumpquesno) console.log(6) }else{ console.log(7) that.current++ } } }else if(this.currentListlast._ansJumpQuesNo){ console.log(8) this.current=this.currentListlast._ansJumpQuesNo }else{ this.current++ console.log(this.current,'this.current111') } const jsonD = { answerList:that.questionAnswers, current:this.current, newTtMap:this.newTtMap } if(this.current<=this.questionList.length){ var aaab = JSON.stringify(jsonD) if(this.current%10==0){ $.post("/www/public/st/ft_saveredistm", {jsonData:aaab,stid:that.questionList[0]?.sjid}, function(res){ }) }else{ // localStorage.setItem('aa','34') localStorage.setItem('saveredistm',aaab) } } //this.activeIndexs = [] if(this.current>this.questionList.length){ this.current=this.questionList.length that.saveAll() }else{ that.loading = false } }, toggleActive(item,index) { if(item.mutexOptionNos){ if(item.mutexOptionNos){ var optionNos = item.mutexOptionNos.split(',') optionNos.forEach(itt=>{ let box = this.$refs.checkboxRefs[itt-1].querySelector('input[type="checkbox"]'); box.checked = false }) } } const checkbox = this.$refs.checkboxRefs[index].querySelector('input[type="checkbox"]'); checkbox.checked = !checkbox.checked; //this.updateCheckboxState(); }, updateCheckboxState() { this.$refs.checkboxRefs.forEach((checkboxRef, index) => { const checkbox = checkboxRef.querySelector('input[type="checkbox"]'); if (checkbox.checked) { this.activeIndexs.push(index); } }); }, gettmlist(){ var that = this const data = { rwxd:that.item.xd, ftid:that.item.id, } $.post("/www/public/shouye/ft_getftlb", data, function(res){ res.data.forEach(item=>{ let tmlx = that.gettmlx(item) if(tmlx==1){ item.answer = {} } //填空 if(tmlx==2){ //判断%s的数量 let _questioncontent = item.questioncontent.replace(/%s/g,'') var zhanweinumber = (item.questioncontent.length - _questioncontent.length)/2 //为0,说明是简答 console.log(zhanweinumber,'zhanweinumber',item.questionno) if(zhanweinumber==0){ item.isJianda = true }else if(zhanweinumber==1&&item.questioncontent.endsWith("%s")){ item.isJianda = true } console.log(item.isJianda,'item.isJianda') if(item.contenttype){ item.contenttype = item.contenttype.split('#') item.rules = item.contenttype.map((kk,ink)=>{ let rules={} if(kk=='0'){ rules.tag='el-input' }else if(kk=='1'){ rules.tag='el-input-number' }else if(kk=='2'){ rules.tag='el-input-number' } return rules }) console.log(item.rules,item.questionno) if(item.contentrule&&item.contentrule.length){ item.contentrule.map((kk,ink)=>{ var ins = Number(kk.number)-1 var arrr = kk.scope.split(',') var sco = [arrr[0].substring(1),arrr[1].substring(0,arrr[1].length-1)] console.log(sco,'sco') console.log(item.contenttype,'item.contenttype') if(item.contenttype&&item.contenttype[ins]=='0'){ item.rules[ins].minlength = sco[0] item.rules[ins].maxlength = sco[1] }else if(item.contenttype&&item.contenttype[ins]=='1'){ if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } item.rules[ins].step = 1 }else if(item.contenttype&&item.contenttype[ins]=='2'){ item.rules[ins].precision = kk.decimal if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } } return 11 }) }else{ } } var len1 = item.questioncontent.split("%s")?.length //构造答案个数,与输入框个数对应 if(item.isJianda&&zhanweinumber==0){ item.answer = new Array(1) }else{ item.answer = new Array(zhanweinumber) } } //多选 if(tmlx==3){ item.answer = [] item.activeIndex = [] } if(tmlx==4){ item.answer = [] } if(tmlx==5){ item.answer = new Array(item.maxoptcnt).fill('') } if(tmlx==6){ item.answer = 1 item.marks={ 1:item.startscope, [Number(item.segment)]:item.endscope } if(item.axisdesc){ var axisdescArr = item.axisdesc.split(';') item.marks[1] = axisdescArr[0] item.marks[Number(item.segment)] = axisdescArr[axisdescArr.length-1] } console.log(item.marks,'item.marks') } }) console.log(res.data,'that.questionList') that.questionList = res.data that.toolname = that.questionList[0]?.toolname that.getredistm() }) }, handleAct(item){ return this.currentListlast&&this.currentListlast.answer&&this.currentListlast.answer.answerBusiId==item.answerBusiId }, handleChoose(item,index){ if(this.calctmlx==1){ this.$set(this.currentListlast,'activeIndex',index) this.currentListlast.answer = {...item,answerId:item.answerBusiId,answerText:item.optionName} if(item.ansJumpQuesNo){ this.currentListlast._ansJumpQuesNo = item.ansJumpQuesNo }else{ this.currentListlast._ansJumpQuesNo = null } }else if(this.calctmlx==3){ var idex = this.currentListlast.activeIndex.indexOf(index) if(idex==-1){ if(item.ansJumpQuesNo){ this.currentListlast._ansJumpQuesNo = item.ansJumpQuesNo } if(this.currentListlast.maxoptcnt&&this.currentListlast.activeIndex.length>=this.currentListlast.maxoptcnt){ vant.Toast({ message:`最多选择${this.currentListlast.maxoptcnt}个选项`, icon: 'warning-o', }) }else{ if(item.mutexOptionNos){ var optionNos = item.mutexOptionNos.split(',') optionNos.forEach(itt=>{ var op = this.currentListlast.mpanswerdtolist[itt-1] console.log(op.answerBusiId,'op.answerBusiId') console.log(this.currentListlast.answer,'this.currentListlast.answer') if(op){ this.currentListlast.answer = this.currentListlast.answer.filter(an=>an.answerBusiId!=op.answerBusiId) this.currentListlast.activeIndex = this.currentListlast.activeIndex.filter(index1=>index1!=itt-1) } }) } this.currentListlast.activeIndex.push(index) console.log(item.answerBusiId,'item.answerBusiId') this.currentListlast.answer.push({...item,answerId:item.answerBusiId,answerText:item.optionName}) this.toggleActive(item,index) } }else{ this.currentListlast.activeIndex.splice(idex,1) this.currentListlast.answer.splice(idex,1) this.toggleActive(item,index) if(item.ansJumpQuesNo){s this.currentListlast._ansJumpQuesNo = null } } } //console.log(JSON.stringify(this.currentListlast.answer),'this.currentListlast.answer') }, aaa(que){ var that = this var pcur = that.questionList[que.parentno-1] that.currentList.unshift(pcur) if(pcur.parentno!=0){ that.aaa(pcur) } }, gettmlx(item){ //单选题 if(item.questiontype==2&&item.ismult==0){ return 1 } //填空题 if(item.questiontype==1&&item.replytype==2){ return 2 } //多选 if(item.questiontype==2&&item.ismult==1){ return 3 } }, startRecording() { if (this.mediaRecorder && this.mediaRecorder.state === "inactive") { // 开始录音 this.recording = true; this.mediaRecorder.start(); console.log("录音中..."); } else { // 获取用户的音频输入 navigator.mediaDevices.getUserMedia({ audio: true }).then( stream => { console.log("授权成功!"); this.status = "授权成功!"; this.mediaRecorder = new MediaRecorder(stream); this.mediaRecorder.ondataavailable = e => this.chunks.push(e.data); this.hasMicrophonePermission = true; this.mediaRecorder.start(); this.recording = true; this.status = "录音中..."; console.log("录音中..."); this.lystatus = true; this.timer = setInterval(() => { this.recordingTime++; }, 1000); }, () => { this.$message({ type: "error", message: "授权失败!请检查麦克风权限。" }) } ); } }, pauseRecording() { if (this.mediaRecorder && this.mediaRecorder.state === "recording") { this.mediaRecorder.pause(); clearInterval(this.timer); this.status = "录音已暂停"; console.log("录音已暂停"); this.lystatus = false; } }, resumeRecording() { if (this.mediaRecorder && this.mediaRecorder.state === "paused") { this.mediaRecorder.resume(); this.lystatus = true; this.timer = setInterval(() => { this.recordingTime++; }, 1000); this.status = "继续录音中..."; console.log("继续录音中..."); this.lystatus=true } }, formatTime(totalSeconds) { const minutes = Math.floor(totalSeconds / 60); const seconds = totalSeconds % 60; return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`; }, stopRecording() { console.log(this.formatTime(this.recordingTime)) if (this.mediaRecorder && this.mediaRecorder.state === "recording") { // 停止录音 this.mediaRecorder.stop(); this.mediaRecorder.onstop = () => { const blob = new Blob(this.chunks, { type: "audio/ogg; codecs=opus" }); this.chunks = []; // 创建FormData对象 const formData = new FormData(); // 动态生成文件名 const fileName = 'recorded_audio.ogg'; formData.append('file', blob, 'recorded_audio.ogg'); formData.append('rel', 'r_ft_ftjl'); formData.append('attname', 'lywj'); formData.append('ftid', this.item.id); fetch('/www/public/shouye/ft_lysc', { method: 'POST', body: formData }) .then(response => response.json()) .then(data => { console.log('上传成功:', data.data); this.recordingstatus = data.data; console.log(this.recordingstatus) }) .catch(error => { console.error('上传失败:', error); }); }; this.recording = false; this.status = "录音结束"; console.log("录音结束"); } this.recording = false; }, goBack(){ if(this.item.iftest==1){ this.$router.push({ path: '/interviewLS', query: { status: '1' } }); }else{ this.$router.push('interviewLS') } }, onSubmit(formRef) { this.$refs.formRef.validate((valid) => { if (valid) { var userInfo = localStorage.getItem('userInfo')?JSON.parse(localStorage.getItem('userInfo')):{} let data = { ftjlpg:this.ftjlpg, ftyypg:this.ftyypg, ftzspg:this.ftzspg, ftsjpg:this.ftsjpg , ftjkpg:this.ftjkpg, ftyywb:this.ftyywb, ftzswb:this.ftzswb, ftsjwb:this.ftsjwb, ftjkwb:this.ftjkwb, ftjlwb:this.ftjlwb, ...this.form, ftid:this.item.id, lbid:this.lbid, } $.post("/www/public/shouye/ft_saveftjl", data, (res) => { if (res.error == 0) { localStorage.removeItem('saveredistm') let data = { stuid:this.item.xsid, } $.post("/www/public/st/ft_delredistm", data, (res) => { if (res.error == 0) { }else{ this.$message({ type: "error", message: res.message }) } }); if(res.data.statu==1){ this.$router.push({ path: '/interviewLS', query: { status: '1' } }); }else{ this.dialogVisible=true } }else{ this.$message({ type: "error", message: res.message }) } }); } else { console.log('error submit!!'); return false; } }); }, cancel(){ this.$router.push('interviewLS') }, getImgsrc(val) { return "/content/image/xljkls/"+val }, format(percentage) { return `${this.current} / ${this.questionList.length}`; }, toggleRecording() { if (this.isRecording) { this.recorder.stop(); this.isRecording = false; console.log("录音结束"); } else { this.recordedChunks = []; navigator.mediaDevices.getUserMedia({ audio: true }).then((stream) => { this.recorder = new MediaRecorder(stream); this.recorder.ondataavailable = (e) => { if (e.data.size > 0) { this.recordedChunks.push(e.data); } }; this.recorder.start(); this.isRecording = true; console.log("开始录音..."); }).catch((err) => { this.$message.error('授权失败!请检查麦克风权限。') }); } }, handleConfirm() { // 保存录音数据的逻辑,例如将录音数据转换为Blob并设置给音频元素的src const blob = new Blob(this.recordedChunks, { type: 'audio/webm' }); const audioUrl = URL.createObjectURL(blob); this.$refs.audioPlayer.src = audioUrl; this.$refs.audioPlayer.load(); // 加载音频数据 this.$refs.audioPlayer.play(); // 播放音频 console.log('录音已保存:', audioUrl); }, }, beforeDestroy() { clearInterval(this.timer); }, computed: { currentListlast(){ var len = this.currentList.length var cu = this.currentList[len-1] if(this.gettmlx(cu)==1||this.gettmlx(cu)==3){ cu.mpanswerdtolist.forEach((item,inde)=>{ if(item.replyType==2){ item.optionNameArr = item.optionName.split('%s') if(item.contentType&&!Array.isArray(item.contentType)){ item.fillValues = {} console.log(item.contentType,'item.contentType') item.contentType = item.contentType.split('#') item.rules = item.contentType.map((kk,ink)=>{ let rules={} if(kk=='0'){ rules.tag='el-input' item.fillValues[ink+''] = '' }else if(kk=='1'){ rules.tag='el-input-number' item.fillValues[ink+''] = undefined }else if(kk=='2'){ rules.tag='el-input-number' item.fillValues[ink+''] =undefined } return rules }) console.log(item.contentType,'item.contentType') console.log(item.fillValues,'item.fillValues') console.log(item.rules,'item.rules') if(item.contentRule&&item.contentRule.length){ item.contentRule = JSON.parse(item.contentRule) item.contentRule.map((kk,ink)=>{ var ins = Number(kk.number)-1 var arrr = kk.scope.split(',') var sco = [arrr[0].substring(1),arrr[1].substring(0,arrr[1].length-1)] console.log(sco,'sco') console.log(item.contentType,'item.contentType') if(item.contentType[ins]=='0'){ item.rules[ins].minlength = sco[0] item.rules[ins].maxlength = sco[1] }else if(item.contentType[ins]=='1'){ if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } item.rules[ins].step = 1 }else if(item.contentType[ins]=='2'){ item.rules[ins].precision = kk.decimal if(sco[0]!='--'){ item.rules[ins].min = Number(sco[0]) } if(sco[1]!='++'){ item.rules[ins].max = Number(sco[1]) } } return 11 }) } }else{ } console.log(item.optionNameArr,'item') }else{ item.optionNameArr = [item.optionName] } }) } console.log(cu,'cu') console.log(JSON.stringify(this.currentList),'this.currentList') return cu }, calculatedPercentage() { if (!this.questionList.length) { return 0; // 避免除零错误 } return (this.current / this.questionList.length) * 110; }, calctmlx(){ //单选题 if(this.currentListlast&&this.currentListlast.questiontype==2&&this.currentListlast.ismult==0){ return 1 } //填空题 if(this.currentListlast&&this.currentListlast.questiontype==1&&this.currentListlast.replytype==2){ return 2 } //多选 if(this.currentListlast&&this.currentListlast.questiontype==2&&this.currentListlast.ismult==1){ return 3 } } }, watch:{ current:{ handler(val){ if(!val) return var that = this var cur = that.questionList[val-1] if(!cur){return} if(cur.questiontype==1&&cur.replytype==0){ that.current++ return } if(cur.parentno!=0){ if(that.currentList[0]?.parentno!=0){ that.currentList.unshift(cur) }else{ that.currentList = [] that.currentList.unshift(cur) } that.aaa(cur) }else{ var length = that.currentList.length that.currentList = [] that.currentList.unshift(cur) } }, immediate: true }, currentList:{ handler(val){ }, immediate:true }, answerNumber(val){ } }, created: function(){ let that = this that.item = JSON.parse(localStorage.getItem('stuItem')); let data = { ftid:that.item.id } $.post("/www/public/shouye/ft_selifdt", data, function(res){ if(res.error==0){ if(res.data.dtzt==1){ $.post("/www/public/shouye/ft_findyj", {ftid:that.item.id}, (res) => { if (res.error == 0) { that.html1 =res.data.jkwb that.html2 =res.data.jlwb that.html3 =res.data.sjwb that.html4 =res.data.wuwb that.html5 =res.data.yywb that.html6 =res.data.zswb }else{ this.$message({ type: "error", message: res.message }) } }); that.ftjlpg = res.data.ftjlpg that.ftyypg=res.data.ftyypg that.ftzspg = res.data.ftzspg that.ftsjpg = res.data.ftsjpg that.ftjkpg = res.data.ftjkpg that.ftyywb=res.data.ftyywb that.ftzswb=res.data.ftzswb that.ftsjwb=res.data.ftsjwb that.ftjkwb=res.data.ftjkwb that.ftjlwb=res.data.ftjlwb that.lbid=res.data.id that.statusButton=false that.dialogVisible1=false }else{ that.statusButton=true } } }) let xdid = { tmxd:that.item.xd } $.post("/www/public/shouye/ft_lbtmbd", xdid, (res) => { if (res.error ==0 ) { this.yytm = res.data.yytm this.zstm = res.data.zstm this.tstm=res.data.tstm this.tstmmzf=res.data.tstmmzf } }); that.gettmlist() that.startTime = new Date().getTime(); }, mounted: function(){ /* $.post("/www/public/liangbiao/cp_getAccessToken", {}, function(res){ if(res.code==200){ localStorage.setItem('accessToken', res.data.accessToken) } })*/ // this.getOpenId() //this.dialogVisible1=true if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { navigator.mediaDevices.getUserMedia({ audio: true }).then( stream => { console.log("已获得麦克风权限!"); this.hasMicrophonePermission = true; // 获取权限成功,设置标志为 true }, () => { console.log("未获得麦克风权限!"); this.hasMicrophonePermission = false; // 获取权限失败,设置标志为 false } ); } else { console.log("浏览器不支持 getUserMedia"); // 如果浏览器不支持 getUserMedia,可以视情况设置标志为 false this.hasMicrophonePermission = false; } }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-interviewDetailsGj-view", function(resolve, reject){ var template = "
\n
\n | 学生访谈\n
\n
\n
\n
\n \n
\n
\n
\n {{ item.xsmc }} \n
\n
\n
\n 学校:{{ item.xxmc }}\n
\n
\n 年级:{{item.xd==1?'小学':item.xd==2?'初中':item.xd==3?'高中':\n item.xd==4?'中职':\n item.xd==5?'高职':\n item.xd==7?'本科':\n item.xd==8?'硕士':\n item.xd==9?'博士':''}}{{ item.nj }}年级\n
\n
\n 学号:{{ item.xsxh }}\n
\n
\n 班级:{{ item.bj }}\n
\n
\n 联系方式:{{ item.xssjh }}\n
\n
\n
\n\n
\n
\n \n\n \n \n
{{ ftjlpg }}分
\n
\n\n \n \n
{{ftyypg}}分
\n
\n\n \n \n
{{ftzspg}}分
\n
\n \n \n
{{ftjlwb}}
\n\n
\n\n \n \n\n
{{ftyywb}}
\n \n
\n\n \n \n
{{ftzswb}}
\n \n
\n\n \n \n
{{ftjkpg}}分
\n
\n\n \n \n
{{ftsjpg}}分
\n\n
\n \n \n
\n
\n \n \n
{{ftjkwb}}
\n
\n\n \n \n
{{ftsjwb}}
\n
\n\n\n\n \n \n \n
\n
\n\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n
\n\n
\n \n \n \n
{{data?data.sfzdgy==1?'是':'否':''}}
\n
\n\n \n \n
{{data?data.sfcxzz==1?'是':'否':''}}
\n
\n \n
{{data?data.ftyj:''}}
\n
\n\n
\n
\n
\n
\n 访谈录音\n
\n
\n 录音地址:{{ data.lywj }}\n
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), item:'', size: '', data:'', ftjlpg:'', ftyypg:'', ftzspg:'', ftsjpg:'', ftjkpg:'', ftyywb:'', ftzswb:'', ftsjwb:'', ftjkwb:'', ftjlwb:'', html1:'', html2:'', html3:'', html4:'', html5:'', html6:'', }; }, methods: { goBack(){ this.$router.push('interviewLS') }, getImgsrc(val) { return "/content/image/xljkls/"+val }, }, created: function(){ this.item = JSON.parse(localStorage.getItem('stuItem')); console.log(this.item) let data = { ftid:this.item.id } $.post("/www/public/shouye/ft_ftdail", data, (res) => { if (res.error == 0) { this.data = res.data this.ftjlpg = res.data.ftjlpg this.ftyypg=res.data.ftyypg this.ftzspg = res.data.ftzspg this.ftsjpg = res.data.ftsjpg this.ftjkpg = res.data.ftjkpg this.ftyywb=res.data.ftyywb this.ftzswb=res.data.ftzswb this.ftsjwb=res.data.ftsjwb this.ftjkwb=res.data.ftjkwb this.ftjlwb=res.data.ftjlwb }else{ this.$message.error(res.message) } }); $.post("/www/public/shouye/ft_findyj", data, (res) => { if (res.error == 0) { this.html1 =res.data.jkwb this.html2 =res.data.jlwb this.html3 =res.data.sjwb this.html4 =res.data.wuwb this.html5 =res.data.yywb this.html6 =res.data.zswb }else{ this.$message({ type: "error", message: res.message }) } }); }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-operatingManual-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n\n
\n
\n 获取麦克风权限流程\n
\n
\n\n

\n 1.进入测试页面获取麦克风权限\n

\n

\n 2.点击每次访问时都允许授权页面使用电脑麦克风\n

\n
\n \n
\n\n
\n
\n\n
\n
\n 如果不小心点了不允许或没有弹框页面禁用了麦克风需要手动获取权限\n
\n
\n

\n 1.点击网址右侧麦克风按钮\n

\n
\n \n
\n

\n 2.选择始终允许选项点击完成后刷新页面\n

\n
\n \n
\n
\n 下一步\n
\n\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid() }; }, methods: { next(){ this.$router.push('testRecording') } }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-testRecording-view", function(resolve, reject){ var template = "
\n \n
\n \n
\n
\n
\n
\n\n
\n
\n 点击下方按钮开始录音\n
\n
\n
\n
\n\n
\n
\n
\n 00.00\n
\n 开始录音\n
\n
\n
\n
\n\n
\n
\n 录音中...随便说句话(比如:测试录音),点击停止录音\n
\n
\n
\n
\n \n
\n
\n\n
\n
\n
\n {{ formattedTime }}\n
\n 停止录音\n\n
\n
\n
\n
\n\n
\n
\n 录音已完成,点击播放录音 (如果可以听到声音并且很清晰请点击下一步,如果听不到请检查设备)\n
\n
\n
\n \n
\n 播放录音\n 重新录音\n 下一步\n
\n
\n
\n\n
\n \n
\n\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), mediaRecorder: null, chunks: [], isRecording: false, audioUrl: null, step: 1, audioContext: null, analyser: null, dataArray: null, canvasContext: null, canvasWidth: 500, canvasHeight: 100, startTime: null, elapsedTime: 0, timer: null }; }, methods: { step1(){ this.step=1 }, next(){ this.$router.push('ftrsc') }, setupMediaRecorder() { navigator.mediaDevices.getUserMedia({ audio: true }) .then(stream => { this.mediaRecorder = new MediaRecorder(stream); this.mediaRecorder.ondataavailable = e => { this.chunks.push(e.data); }; this.mediaRecorder.onstop = () => { const blob = new Blob(this.chunks, { 'type': 'audio/ogg; codecs=opus' }); this.audioUrl = URL.createObjectURL(blob); this.$refs.recordedAudio.src = this.audioUrl; this.$refs.recordedAudio.style.display = 'block'; this.step = 3; // 切换到第三步:录音完成 }; }) .catch(err => { this.$message({ type: "error", message: "授权失败!请检查麦克风权限。" }) }); }, startRecording() { if (this.mediaRecorder) { this.chunks = []; this.mediaRecorder.start(); this.isRecording = true; this.step = 2; // 切换到第二步:录音中 this.startTime = Date.now(); this.timer = setInterval(() => { this.elapsedTime = Math.floor((Date.now() - this.startTime) / 1000); }, 1000); // 每秒更新一次计时器 // 在这里可以添加录音开始的相关逻辑,如开始录音的函数调用 } else { this.$message({ type: "error", message: "授权失败!请检查麦克风权限。" }) } }, stopRecording() { this.mediaRecorder.stop(); this.isRecording = false; }, playRecording() { this.$refs.recordedAudio.play(); } }, computed: { formattedTime() { // 格式化时间显示为 mm:ss const minutes = Math.floor(this.elapsedTime / 60); const seconds = this.elapsedTime % 60; return `${minutes < 10 ? '0' : ''}${minutes}:${seconds < 10 ? '0' : ''}${seconds}`; } }, created: function(){ }, mounted: function(){ this.setupMediaRecorder(); }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-aggerTest-view", function(resolve, reject){ var template = "
\n \n
\n
\n \n
\n \n \n
\n 扫码签署知情书\n
\n
\n
\n \n
\n\n
\n \n 关闭\n \n \n \n \n \n
\n
\n {{info.tyhmc}}\n
\n
\n\n
\n
\n \n\n
\n
\n
\n 暂 未 签 名\n
\n
\n
\n 重新获取二维码\n 再次发送短信\n 下一步\n
\n\n
\n \n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { dialogVisible: false, signaturePad:'', blob:'', file:'', dataURL:'', info:'', tyhid:'', username:'', isWiderScreen: false, ftid:'', imgUrl:'', item:'', status:'', qrcode:'', dialogVisible:false }; }, methods: { next(){ this.$router.push('InterviewGuidance') }, open(){ let data = { ftid:this.item.id } $.post("/www/public/shouye/ft_getstutyhewm", data, (res) => { if (res.error == 0) { this.qrcode = res.data.qrcode this.getQRcode() } }); this.dialogVisible =true }, getQRcode(){ document.getElementById("qrcode").innerHTML = ''; let that = this new QRCode(document.getElementById("qrcode"), { width: '200',//宽 height: '200',//高 text: that.qrcode,//二维码内容 colorDark : "#000000", colorLight : "#ffffff", correctLevel : QRCode.CorrectLevel.H, }); }, checkScreenWidth() { if (document.documentElement.clientWidth < 600) { this.isWiderScreen = true; } else { this.isWiderScreen = false; } }, openSignatureDialog() { this.dialogVisible = true; this.$nextTick(() => { this.initSignaturePad(); }); }, initSignaturePad() { let canvas = document.getElementById('canvas'); // 创建 SignaturePad let options = { penColor: 'rgb(0,0,0)', minWidth: 5, maxWidth: 10, }; this.signaturePad = new SignaturePad(canvas, options); this.resizeCanvas(); }, back(){ this.$router.push('evaluation') }, getTyh(){ const that = this; let data = { ftid:this.ftid, } $.post("/www/public/tyh/gettyh", data, function(res){ if(res.code==200&&res.data!==null){ res.data.map((item)=>{ if(item.qsjs==500){ that.info =item that.imgUrl=item.imgurl } }) }else{ that.$message({ type: "error", message: '服务错误' }) } }) }, resizeCanvas() { let canvas = document.getElementById('canvas') let ratio = Math.max(window.devicePixelRatio || 1, 1) canvas.width = canvas.offsetWidth * ratio canvas.height = canvas.offsetHeight * ratio let context = canvas.getContext('2d') context.scale(ratio, ratio) var signTitle = document.querySelector('.signTitle'); canvas.addEventListener('mouseenter', function() { signTitle.style.display = 'none'; }); canvas.addEventListener('mouseleave', function() { signTitle.style.display = 'block'; }); }, /**根据图片的 Base64 编码,把内容显示到签名板上*/ redisplay() { this.signaturePad && this.dataURL && this.signaturePad.fromDataURL(this.dataURL) }, /*清除签名板内容*/ clear() { this.signaturePad.clear() this.dataURL = null }, /*获取签名板内容(图片的 Base64 编码)*/ save() { this.dataURL = this.signaturePad.toDataURL() console.log( this.dataURL) let data = { imgurl:this.dataURL, ftid:this.ftid, } console.log(data) const that =this $.post("/www/public/shouye/ft_savestutyh", data, function(res){ if(res.error==0){ that.$message.success('提交成功'); that.imgUrl = res.data that.dialogVisible=false that.getTyh }else{ that.$message({ type: "error", message: res.message }) } }) }, base64ToBlob(dataURL) { console.log(dataURL) let arr = dataURL.split(',') let mimeType = arr[0].match(/:(.*?);/)[1] || 'image/png' let encodeStr = atob(arr[1]) let n = encodeStr.length let u8Arr = new Uint8Array(n) while (n--) { u8Arr[n] = encodeStr.charCodeAt(n) } return new Blob([u8Arr], { type: mimeType }) }, //转换成file blobToFile(blob, fileName) { // MIME Type const type = blob.type || 'text/plain' return new File([blob], fileName, { type }) }, //生成图片 scImg(){ let blob = this.base64ToBlob(this.dataURL) this.file = this.blobToFile(blob, '签名图片.png') console.log(this.file) }, }, created: function(){ }, mounted: function(){ this.checkScreenWidth(); window.addEventListener('resize', this.checkScreenWidth); this.item = JSON.parse(localStorage.getItem('stuItem')); this.status = JSON.parse(localStorage.getItem('stuStatus')); this.username = this.item.xsmc; this.ftid = this.item.id; this.getTyh() let canvas = document.getElementById('canvas') // 创建 SignaturePad let options = { penColor: "rgb(66, 133, 244)", minWidth: 5, maxWidth: 10, } this.signaturePad = new SignaturePad(canvas, options); this.resizeCanvas() }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-InterviewGuidance-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n\n
\n
\n 热身引导环节\n
\n
\n
\n\n
\n
\n 下一步\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), title:'', info:'', item:'', status:'' }; }, methods: { next(){ if(this.status==1){ if(this.item.xd<5){ this.$router.push({ path: '/interviewInfoLS', }); }else{ this.$router.push({ path: '/interviewInfoLSGj', }); } } if(this.status==2){ if(this.item.xd<5){ this.$router.push({ path: '/interviewInfoOnline', }); }else{ this.$router.push({ path: '/interviewInfoOnlineGj', }); } } }, }, created: function(){ this.item = JSON.parse(localStorage.getItem('stuItem')); this.status = JSON.parse(localStorage.getItem('stuStatus')); }, mounted: function(){ const that =this let data = { userid:JSON.parse(localStorage.getItem('stuStatus')).ID } $.post("/www/public/shouye/ft_getftzdy", data, function(res){ if(res.error==0){ that.title = res.data[0].tyhmc that.info = res.data[0].tyhnr console.log(that.info) }else{ that.$message({ type: "error", message: res.message }) } }) }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftInterviewHomepage-view", function(resolve, reject){ var template = "
\n
\n
\n
\n 您好,{{userInfo.Nickname}}访谈员~\n
\n
\n
\n {{gzdwmc}}\n
\n\n
\n
\n
\n
\n \n
\n
\n
\n\n
\n
\n
\n
\n \n
\n
\n
\n 学习要求\n
\n
\n 勤奋、专注、思考、实践\n
\n
\n
\n
\n
\n \n
\n
\n
\n 学习课程\n
\n
\n 应知应会,方能胜任\n
\n
\n
\n
\n
\n \n\n
\n
\n
\n 在线考试\n
\n
\n 冷静分析,沉着应对\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n 考试记录\n
\n
\n 即时记录,准确回顾 \n
\n
\n
\n
\n
\n \n
\n
\n
\n 考试证书\n
\n
\n 权威认证,实力见证\n
\n
\n
\n\n \n \n
\n
\n \n
\n
\n
\n 访谈练习\n
\n
\n 模拟实战,应对自如\n
\n
\n
\n
\n
\n \n
\n
\n
\n 开始访谈\n
\n
\n 倾听理解,建立信任\n
\n
\n
\n
\n
\n \n
\n
\n
\n 通知公告\n
\n
\n 重要通知,及时关注\n
\n
\n
\n
\n
\n \n
\n
\n
\n 操作手册\n
\n
\n 详尽指南,一目了然\n
\n
\n
\n
\n
\n\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { butList:[], active:0, tzggList:[], value:'', reverse: false, crq:'', rqList:[], currentList:[], userInfo:{}, type:'', gzdwmc:'', ifqs:'' }; }, methods: { gointerviewLS(status) { this.$router.push({ path: '/interviewLS', query: { status: status } }); }, gg(){ window.open('https://xinlijc.bnu.edu.cn/www/dd/vue/spa/xljk#/FTnotice','_blank') }, czsc(){ window.open('https://xinlijc.bnu.edu.cn/content/image/xljkImg/ftsc.pdf','_blank') }, kszs(){ const that =this let data = { } $.post("/www/public/shouye/px_ftlssy_zscx", data, function(res){ if(res.error==0){ window.open(res.data.url) }else{ that.$message.error(res.message) } }) }, ksft(){ const that = this console.log(that.type) if(that.type==1){ if(that.ifqs==1){ this.$router.push({ path: '/interviewLS', }); }else{ that.$router.push('aggerTeacher') } } if(this.type==2){ that.$alert('该访谈员未完成培训无法开始访谈', '提示', { confirmButtonText: '确定', type: 'warning', callback: action => { } }); } }, routerPush(path){ this.$router.push(path) }, getImgsrc:function(val) { return "/content/image/xljkImg/"+val }, getIndex(index){ this.active = index }, onPanelChange(value, mode) { console.log(value, mode); }, getDay(val){ if(this.rqList.length>0){ if(val.type=='current-month'){ //this.currentList.push(val.day) } if(val.type=='current-month'&&this.rqList.indexOf(val.day)>=0){ return true }else{ return false } } }, getDate(val){ //console.log(this.currentList) this.crq = val this.getdb() }, //获取待办 getdb:function(){ let that = this //$.post("/www/py/fwpt/test", {crq:this.crq}, function(res){ $.post("/www/py/fwpt/user_event", {crq:this.crq}, function(res){ if(res.success==1){ if(res.data.data){ that.tzggList = res.data.data that.rqList = res.data.rq } } }) }, }, created: function(){ let that = this that.getdb() that.userInfo =localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} $.post("/www/public/shouye/px_fty_sfftls", {}, function(res){ that.gzdwmc = res.data.gzdwmc that.type=res.data.type that.ifqs=res.data.ifqs }) }, mounted: function(){ }, props: ['title', 'data', 'config','isHeight'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftcourseLearning-view", function(resolve, reject){ var template = "
\n \n\n
\n
\n
\n
\n \n
\n
\n
\n
\n 全国心理健康监测课程介绍\n
\n
\n 培训工作的目的在于帮助参与访谈和干预工作的各级人员明确访谈工作内容及流程,掌握不同类型心理健康问题和心理危机风险访谈及初步干预的基础知识和技能,实现由一线访谈员、到参与项目的各级人力资源、再到项目工作组成员的协同工作,进而推进全国心理健康监测的基本工作,健全全国学生心理健康监测体系。\n
\n
\n
\n 开设单位:\n
\n
\n 北京师范大学心理学部\n
\n
\n
\n
\n
\n
\n 培训工作实施时间规划:\n
\n
\n 2天线上培训课程自主学习(16课时)+1天线下集中培训(8课时)\n
\n
\n 课程要点:\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n 01\n
\n
\n
\n
\n 理解心理健康监测的基本概念和重要性\n\n
\n
\n 理解心理健康监测在基础教育领域的作用和意义掌握心理健康监测的标准化流程和工作原理。\n\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n 02\n
\n
\n
\n
\n 熟悉标准化的访谈工具和流程\n\n
\n
\n

\n 学习使用标准化的访谈工具进行危机风险问题的识别和分级。\n

\n

熟悉执行标准化访谈流程,确保信息的准确性和一致性。

\n\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n 03\n
\n
\n
\n
\n 掌握危机风险问题的访谈技巧\n\n
\n
\n

\n 学习有效的访谈技巧,包括倾听、提问和表达同理心。\n

\n

熟练运用访谈技巧识别并评估危机风险问题

\n\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n 04\n
\n
\n
\n
\n初步干预措施和转介建议\n
\n
\n

\n 理解并能实施危机分级,并为不同的危机等级人群提供有效的初步干预措施\n

\n

定合适的转介建议,确保危机问题得到及时的专业支持。

\n\n
\n
\n
\n
\n
\n
\n \n
\n \n
\n 05\n
\n
\n
\n
\n 伦理和保密要求\n\n
\n
\n

\n 理解并遵守心理健康访谈的伦理准则和保密要求。\n

\n

确保在工作中维护受访者的隐私和权利。

\n
\n
\n
\n \n \n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), khlxnr:'', kcjs:'', kcfm:'' }; }, methods: { getList(){ const that =this let data = { } $.post("/www/public/shouye/px_ftlssy_xxyq", data, function(res){ if(res.error==0){ that.khlxnr = res.data[0].khlxnr that.kcjs = res.data[0].kcjs that.kcfm = res.data[0].kcfm }else{ that.$message({ type: "error", message: res.message }) } }) }, goBack(){ this.$router.go(-1) }, }, created: function(){ }, mounted: function(){ const that =this that.getList() }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftexamination-view", function(resolve, reject){ var template = "
\n \n
\n\n
\n
\n
\n
\n
{{item.sjmc}}
\n
\n 总分:{{ item.sjzfs }}分\n 及格分:{{ item.sjjgx }}分\n
\n
\n
\n 剩余时间:\n \n {{ countdown.hours }} : {{ countdown.minutes }} : {{ countdown.seconds }}\n
\n
\n
\n
\n
\n {{ getTitle(type) }}(共{{ questionList[type].total_count }}题,共{{ questionList[type].total_score\n }}分)\n
\n
\n
\n {{ children.tmfs }}分\n
{{ subIndex + 1 }}. {{ children.tmwt }}
\n
\n
\n \n \n \n {{ option.key }}.\n {{ option.value }}\n \n \n \n \n \n \n {{ option.key }}.\n {{ option.value }}\n \n \n \n \n \n A.正确\n B.错误\n \n \n\n
\n\n
\n\n
\n
\n 下一步\n
\n
\n\n
\n
\n
\n
\n \n \n \n 答题卡\n
\n
已答
\n
未答
\n
当前题目
\n
\n
\n
\n
\n
\n {{ getTitle(type) }}(共{{ questionList[type].total_count }}题,共{{ questionList[type].total_score\n }}分)\n
\n
    \n
  • {{ subIndex + 1 }}\n
  • \n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n
\n
{{item.sjmc}}
\n
\n 总分:{{ item.sjzfs }}分\n 及格分:{{ item.sjjgx }}分\n
\n
\n
\n 剩余时间:\n \n {{ countdown.hours }} : {{ countdown.minutes }} : {{ countdown.seconds }}\n
\n
\n
\n
\n
\n {{ getTitle(type) }}(共{{ questionList[type].total_count }}题,共{{ questionList[type].total_score\n }}分)\n
\n
\n
\n 20分\n
{{ currentQuestionIndex + 1 }}.
\n
\n
\n
\n

{{item.tmwt}}

\n \n
\n
\n
\n\n
\n
\n 上一步\n 上一题\n 交卷\n 下一题\n\n\n
\n\n\n
\n\n
\n\n
\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { timer: null, type:true, currentQuestionIndex: 0, countdown: { days: 0, hours: '00', minutes: '00', seconds: '00' }, current: 1, // 当前题目sort // 答案 id answer formData: [], // 问卷问题存 questionList: [], questionListBak: { radio: [], checkbox: [], trueFalse: [] }, // 面包屑list,一般缓存再vuex 和sessionStroge breadcrumbList: [ { name: '项目列表', path: '/question' }, { name: '以及状态自查问卷', path: '/survey' } ], rules: { username: [{ required: true, message: '请输入用户名', trigger: 'blur' }], password: { required: true, message: '请输入密码', trigger: 'blur' } } }; }, methods: { syb(){ this.type =true }, next(){ this.type =false }, nextQuestion() { if (this.currentQuestionIndex < this.questionList.row_4.data.length - 1) { this.currentQuestionIndex++; } }, previousQuestion() { if (this.currentQuestionIndex > 0) { this.currentQuestionIndex--; } }, goBack(){ this.$router.go(-1) }, // 模拟获取问卷list getList() { const that =this let data = { sjid:that.item.sjid } $.post("/www/public/shouye/px_ftlssy_ks_sj_tmxqxx", data, function(res){ if(res.error==0){ try { const target = res.data Object.keys(target).forEach(key => { console.log(key) target[key].data.forEach(child => { child.answer = key === 'row_2' ? [] : '' }) }) that.questionList =res.data console.log(that.questionList) } catch (e) { console.error(e) } } }) }, // 点击跳转问题 handleCurrent(item, type, index) { document.querySelector('#' + type + index).scrollIntoView(true) this.current = { ...item, type, index } }, // 判断是否存在值 isExistAnswer(item, type) { // checkbox时需要数组为空, 如果可能存在 值为数字0的话 ,需要自行细化非空选项 let result = false switch (type) { case 'row_2': result = !!(item.answer && item.answer.length) break default: result = !!item.answer || item.answer === 0 break } return result }, back() { this.$router.go(-1) }, transformData(data) { return data.map(item => { if( Array.isArray(item.answer)){ var answers = item.answer.join(',') return { tmid: item.tmid, answer: answers }; } return { tmid: item.tmid, answer: item.answer }; }); }, transformDatas(data){ let arr = [] data.forEach(item=>{ item.tmwt.forEach(v=>{ var obj = { tmid: v.tmid, answer: v.answer }; arr.push(obj) }) }) return arr }, // 保存 save() { /* let unAnswerList = '' Object.keys(this.questionList).forEach(key => { const unfinished = this.questionList[key].data.filter(row => !this.isExistAnswer(row)) if (unfinished.length) { unAnswerList = unAnswerList + '' + this.getTitle(key) + '
' + (unfinished.map((item, index) => index + 1).join(',')) + '

' console.log('unfinished', unfinished) } }) if (unAnswerList.length) { this.$confirm('以下题目未回答:
' + unAnswerList, { dangerouslyUseHTMLString: true }) return } */ this.$confirm('是否提交问卷?', '保存提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { if (this.timer) { clearInterval(this.timer) this.timer = null window.localStorage.removeItem('distance') } // 答案过滤 缺 this.formData = Object.values(this.questionList).map(row => { }) console.log(this.questionList.row_4.data,'asdasddsadasd') console.log(this.transformDatas(this.questionList.row_4.data),'dsazxczxczxczxxc') const questionArr = [ ...(this.questionList.row_1?.data ? this.transformData(this.questionList.row_1.data) : []), ...(this.questionList.row_2?.data ? this.transformData(this.questionList.row_2.data) : []), ...(this.questionList.row_3?.data ? this.transformData(this.questionList.row_3.data) : []), ...(this.questionList.row_4?.data ? this.transformDatas(this.questionList.row_4.data) : []) ]; // 保存的方法 do something const that =this let data = { questionAnswers:JSON.stringify(questionArr), ksrwid:that.item.id, ksmc:that.item.ksmc, kslx:that.item.kslx, sjid:that.item.sjid, sjmc:that.item.sjmc, sjjgx:that.item.sjjgx, sjzfs:that.item.sjzfs } $.post("/www/public/shouye/px_ftlssy_ks_save_exam_record", data, function(res){ if(res.error==0){ that.$message({ type: 'success', message: '保存成功!' }) that.$router.go(-2) }else{ that.$message({ type: 'error', message: res.message }) } }) }).catch((e) => { console.error(e) this.$message({ type: 'info', message: '已取消保存' }) }) }, // 计算当前题型总分 // calcTotal(type) { // return this.questionList[type].reduce((total, item) => { // return total + item.score // }, 0) // }, // 计算当前题型总分 getTitle(type) { const titleObj = { row_1: '单选题', row_2: '多选题', row_3: '判断题', row_4: '问答题', } return titleObj[type] }, /* 倒计时 * @params {string} endTime number 毫秒 * */ startCountdown(endTime) { clearInterval(this.timer) this.timer = setInterval(() => { const now = new Date().getTime() const distance = endTime - now if (distance <= 0) { clearInterval(this.timer) this.timer = null window.localStorage.removeItem('endTime') return } const _hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)) const _minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)) const _seconds = Math.floor((distance % (1000 * 60)) / 1000) this.$set(this.countdown, 'days', Math.floor(distance / (1000 * 60 * 60 * 24))) this.$set(this.countdown, 'hours', _hours < 10 ? '0' + _hours : _hours) this.$set(this.countdown, 'minutes', _minutes < 10 ? '0' + _minutes : _minutes) this.$set(this.countdown, 'seconds', _seconds < 10 ? '0' + _seconds : _seconds) }, 1000) } }, created: function(){ const that =this that.item = JSON.parse(this.$route.query.item || '{}'); console.log(that.item) }, computed: { totalScore() { return Object.values(this.questionList).reduce((total, row) => { return total + row.total_score }, 0) } }, watch: { questionList: { handler(newVal) { window.localStorage.setItem('questionList', JSON.stringify(newVal)) }, deep: true } }, mounted() { // 先获取缓存的list // const _questionList = window.localStorage.getItem('questionList') if (false) { this.questionList = JSON.parse(_questionList) } else { // 没有缓存,再请求接口 this.getList() } // 执行倒计时 let _endTime = window.localStorage.getItem('endTime') if (!_endTime) { _endTime = new Date().getTime() + 3600000 window.localStorage.setItem('endTime', _endTime + '') } this.startCountdown(+_endTime) }, beforeDestroy() { window.localStorage.removeItem('questionList') if (this.timer) { clearInterval(this.timer) window.localStorage.removeItem('endTime') } }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDzlxz-view", function(resolve, reject){ var template = "
\n \n\t\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), loopData0: [ { lanhuimage0: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPnge6cbfd075f5424b938564c64b59194e05f48858976d2e5263fef0f82df6c2540', lanhutext0: '国家义务教育质量监测宣传文档.word', lanhutext1: '9.8kb', lanhuimage1: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngba1ec869aeb2beacf55e54800ffda69d264fb1070ca06eba225647a0a1d108d3', lanhutext2: '下载', }, { lanhuimage0: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng0ec5150422b89ae622764f7a8aae77a8e248413eeea4b20a0daad5e56763cc8c', lanhutext0: '国家义务教育质量监测宣传视频.pdf', lanhutext1: '9.8kb', lanhuimage1: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngba1ec869aeb2beacf55e54800ffda69d264fb1070ca06eba225647a0a1d108d3', lanhutext2: '下载', }, { lanhuimage0: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng434f0af02fa2201275396e9b5a8ee88455ab3cb871811892ac329ddd61702909', lanhutext0: '国家义务教育质量监测宣传视频.mp4', lanhutext1: '9.8kb', lanhuimage1: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngba1ec869aeb2beacf55e54800ffda69d264fb1070ca06eba225647a0a1d108d3', lanhutext2: '下载', }, { lanhuimage0: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngaff21cfa97cd62fbed39b077eae2a3e776d53419f20e6973820aa2086aa19b32', lanhutext0: '国家义务教育质量监测宣传视频.zip', lanhutext1: '9.8kb', lanhuimage1: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngba1ec869aeb2beacf55e54800ffda69d264fb1070ca06eba225647a0a1d108d3', lanhutext2: '下载', }, { lanhuimage0: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng3e19c7404fb0bd70b4b81ca0108e9ca8323ca3560b4ab6cc9d8d79902276b9de', lanhutext0: '国家义务教育质量监测宣传视频.excel', lanhutext1: '9.8kb', lanhuimage1: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngba1ec869aeb2beacf55e54800ffda69d264fb1070ca06eba225647a0a1d108d3', lanhutext2: '下载', }, { lanhuimage0: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPng4c5d398b3fd2558acd837119d3a788dca319feb92b6e991fb1caff53d712995e', lanhutext0: '国家义务教育质量监测宣传.jpg', lanhutext1: '9.8kb', lanhuimage1: 'https://lanhu.oss-cn-beijing.aliyuncs.com/SketchPngba1ec869aeb2beacf55e54800ffda69d264fb1070ca06eba225647a0a1d108d3', lanhutext2: '下载', }, ], constants: {}, }; }, methods: { }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDnav", function(resolve, reject){ var template = "
\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n 取 消\n 确 定\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n 取 消\n 确 定\n
\n
\n
\n
\n \"\"/\n

\n 全国学生心理健康监测与服务平台\n

\n
\n
\n \n \"\"/\n \n

\n {{Nickname}}\n \n

\n \n 机构信息\n 操作手册\n 修改密码\n 退出登录\n \n
\n\n
\n
\n
\n

\n \n 返回/{{currentPage}}\n

\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), searchValue:'', dialogVisible:false, dialogVisibles:false, formLabelWidth: '130px', Roles:'', form: { xm: '', sjhm: '', }, forms: { oldpassword: '', newpassword: '', confirmNewpassword: '' }, rules: { }, ruless: { oldpassword: [ { required: true, message: '请输入当前密码', trigger: 'blur' } ], newpassword: [ { required: true, message: '请输入新密码', trigger: 'blur' }, { pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[@$!%*?&=])[A-Za-z\d@$!%*?&=]{8,14}$/, message: '密码格式不符合要求,需包含字母、数字和特殊字符,长度8-14位', trigger: 'blur' } ], confirmNewpassword: [ { required: true, message: '请再次输入新密码', trigger: 'blur' }, { validator: this.validatePasswordMatch, trigger: 'blur' } ] } }; }, methods: { czsc(){ window.open('https://kdocs.cn/l/ctIwhZTg8RKd','_blank') }, grxx(){}, xgmm(){}, validatePasswordMatch(rule, value, callback) { if (value !== this.forms.newpassword) { callback(new Error('两次输入的新密码不一致')); } else { callback(); } }, formatDate(date) { const d = new Date(date); const year = d.getFullYear(); const month = ('0' + (d.getMonth() + 1)).slice(-2); const day = ('0' + d.getDate()).slice(-2); return `${year}-${month}-${day}`; }, save() { const that = this if (that.form.sr) { that.form.sr = that.formatDate(that.form.sr); } that.$refs.formRef.validate((valid) => { if (valid) { const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data = { ...that.form, } $.post("/www/public/shangbao/edituserinfo ", data, function(res){ if(res.error==0){ that.$message.success('提交成功') that.dialogVisible =false }else{ that.$message.error(res.message) } }) } else { console.error('表单验证失败'); return false; } });}, saves() { const that = this that.$refs.formRefs.validate((valid) => { if (valid) { const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data = { ...that.forms } $.post("/www/public/shangbao/editPassword", data, function(res){ if(res.error==0){ that.$message.success('修改成功') that.dialogVisible =false that.logout() }else{ that.$message.error(res.message) } }) } else { console.error('表单验证失败'); return false; } });}, jfjc(){ this.dialogVisible =true }, jfjcs(){ this.dialogVisibles =true }, goHome(){ this.$router.go('-1') }, logoutyuancheng(){ var that = this data = { } url = "/www/public/home/doout" $.post(url, data, function(res){ if(res.success==1){ that.$message.success('已退出登录') }else{ that.$message.error(res.message) } }).fail((xhr,status,error)=>{ that.$message('请求错误') }) }, logout(){ this.logoutyuancheng() localStorage.removeItem('user') localStorage.removeItem('xxjd') localStorage.removeItem('glyInfo') this.$store.commit('user',undefined) this.$router.replace('/login') } }, created: function(){ const that = this const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' this.Roles=localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).Roles[0]:'' let data ={ xxyid : id } $.get("/www/public/shangbao/finduserinfo", data, function(res){ if(res.error==0){ that.form = res.data }else{ that.$message.error(res.message) } }) }, mounted: function(){ }, computed:{ Nickname(){ var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} return user.Nickname } }, props: ['title', 'data', 'config','currentPage','color'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDzlxz1-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n \n 资料下载\n
\n
\n
\n
\n
\n \n
\n
\n

\n {{item.name}}\n

\n
\n
\n
\n\n
\n \n
\n \n

下载

\n
\n
\n
\n
\n \n
\n \n
\n
\n

\n {{item.filename}}\n 已上传\n 文件未下载上传\n

\n
\n

\n 上传文件名:{{item.originFilename}}\n

\n

\n 接受上传类型:{{getAccept(item.file)}}\n

\n
\n
\n
\n
\n
\n \n \n
\n \n

下载

\n
\n
\n \n customUpload(val,item)\"\n :on-error=\"onError\">\n
\n \n

上传

\n
\n\n
\n
\n \n
\n \n

删除

\n
\n
\n\n \n
\n \n

预览

\n
\n
\n\n
\n
\n \n
\n \n
\n
\n

\n {{item.filename}}\n 已上传\n 文件未下载上传\n

\n
\n

\n 上传文件名:{{item.originFilename}}\n

\n

\n 接受上传类型:{{getAccept(item.file)}}\n

\n
\n
\n
\n
\n
\n
\n \n
\n \n

等待更新

\n
\n
\n
\n \n \n customUpload(val,item)\"\n :on-error=\"onError\">\n
\n \n

上传

\n
\n\n
\n
\n \n
\n \n

删除

\n
\n
\n\n \n
\n \n

预览

\n
\n
\n\n
\n
\n
\n
\n
\n \n 资料上传\n
\n
\n
\n \n
\n \n
\n
\n

\n 模板名称:{{item.filename}}\n 已上传\n 文件未下载上传\n

\n
\n

\n 上传文件名:{{item.originFilename}}\n

\n

\n 接受上传类型:{{getAccept(item.file)}}\n

\n
\n
\n
\n
\n
\n \n
\n \n

下载

\n
\n
\n customUpload(val,item)\"\n :on-error=\"onError\">\n
\n \n

上传

\n
\n\n
\n
\n \n
\n \n

删除

\n
\n
\n\n \n
\n \n

预览

\n
\n
\n\n
\n
\n\n
\n
\n
\n
\n \n
\n \n\n
\n
\n

\n 待上传材料:{{item.filename}}\n 已上传\n 文件未上传\n

\n
\n

\n 上传文件名:{{item.originFilename}}\n

\n

\n 接受上传类型: .zip\n

\n
\n
\n
\n
\n
\n \n
\n \n

下载

\n
\n
\n customUpload(val,item)\"\n :on-error=\"onError\">\n
\n \n

上传

\n
\n\n
\n
\n \n
\n \n

删除

\n
\n
\n\n\n
\n
\n\n
\n \n \n \n\n\n \n\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), loading:false, pages:{ pageSize:10, pageNo:1 }, List:[], typeMap:["/jpglogo.png","/yasuologo.png","/mp4logo.png","/wordlogo.png","/excellogo.png","/pdflogo.png"], loopData0: [ ], loopData4: [ ], loopData1:[], loopData2:[], total:0, constants: {},}; }, methods: { YBXCYBJexportFn(activeName){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { username:user.Username } var url = '/www/public/shangbao/dcxxycybj' var name = '样本校抽样班级名单.xls' axios({ method: 'get', url, params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ console.log(res,'res') let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', name); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, XXexportFn(activeName){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { schoolid, } var url var name if(activeName=='first'){ url = "/www/public/shangbao/exportStudent" name = '学生账号.xls' }else if(activeName == 'second'){ url = "/www/public/shangbao/exportteather" name = '教师账号.xls' }else{ url = "/www/public/shouye/px_webftybm_dcbxftyzh" name = '访谈员账号.xls' } axios({ method: 'get', url, params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ console.log(res,'res') let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', name); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, DexportFn(){ var that = this var name //var user = this.$store.state.user var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var username = user.Username var bm = username.substring(3) let type if(user.Roles.includes('220')){ type='1' name = '市级管理员账号信息.xls' if(['110000','120000','310000','500000'].includes(bm)){ type='1' name = '区县管理员账号信息.xls' } }else if(user.Roles.includes('310')){ type='2' name = '区县管理员账号信息.xls' } const params = { username:user.Username, type, state:'1' } axios({ method: 'get', url: '/www/public/shangbao/dcsqxzh', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; //let name = type=='1'?'市及管理员账号' aLink.setAttribute('download', name); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, exportFn(){ var that = this //var user = this.$store.state.user var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} let type if(user.Roles.includes('220')){ type='1' }else if(user.Roles.includes('310')){ type='2' } const params = { username:user.Username, type, state:'1', } axios({ method: 'get', url: '/www/public/shangbao/exportzgxxx', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; //let name = type=='1'?'市及管理员账号' aLink.setAttribute('download', '直管校管理员账号.xls'); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, delfn(item){ var that = this const params = { id:item.recordId, tempid:item.filetempid } $.post("/www/public/shangbao/deletefilerecord", params, function(res){ if(res.error==0){ that.$message.success('删除成功') that.getList() }else{ that.$message.error(res.message) } }).fail((err)=>{ that.loading = false that.$message({ type: "error", message: '请求错误' }) }) }, yulan(item){ window.open('/core/UForm/fileviewer/r_temp_file_record?ff=id&fv='+item.recordId,'_blank') }, onError(){}, customUpload2(params) { var that = this that.loading = true var xxjd = localStorage.getItem('xxjd') //1小学 2初中 3高中 4中职 5高职 7本科 8硕士 9博士 var importType if(['1'].indexOf(xxjd)!=-1){ importType = '1' }else if(['2'].indexOf(xxjd)!=-1){ importType = '2' }else if(['3'].indexOf(xxjd)!=-1){ importType = '3' }else if(['4'].indexOf(xxjd)!=-1){ importType = '4' } const formData = new FormData() formData.append('file', params.file) // 这是file入参,文件信息 formData.append('type', importType) // 这是file入参,文件信息 // 调接口 axios.post(`/www/public/shangbao/import_bj_info_new`, formData, { headers: { 'Content-Type': 'multipart/form-data' } }) .then(({data}) => { if(data&&data.success==1){ that.$message.success(data.message) that.loading = false }else{ that.loading = false that.$message.error(data.message) } }) .catch(error => { that.loading = false console.error(error); }); }, customUpload(params,item) { var that = this that.loading = true var xxjd = localStorage.getItem('xxjd') //1小学 2初中 3高中 4中职 5高职 7本科 8硕士 9博士 var importType if(['1','2','3'].indexOf(xxjd)!=-1){ importType = '1' }else{ importType = '2' } // params是一个对象,包含了file和fileList, // 但是这个params参数可能每个版本不一样值就不一样,到时候自己打印看看, // 反正file的值就是原始的File对象 const formData = new FormData() console.log(params.file,'params.file') formData.append('file', params.file) // 这是file入参,文件信息 // 如果extraParams是个对象,循环加入formData for (const key in this.extraParams) { formData.append(key, this.extraParams[key]) } // 如果extraParams是个单独的值,直接加入 var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID var roles=user.UserFilter.urole // 调接口 axios.post(`/www/public/shangbao/addfiletemprecord?filetempid=${item.id}`, formData, { headers: { 'Content-Type': 'multipart/form-data' } }) .then(({data}) => { if(data&&data.success==1){ that.$message.success(data.message) that.loading = false that.getList() }else{ that.loading = false that.$message.error(data.message) } }) .catch(error => { that.loading = false console.error(error); }); }, handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pageSize = val this.getList() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pageNo = val this.getList() }, exportFn1(){ var that = this //var user = this.$store.state.user var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} const params = { username:user.Username, djsmc:that.djsmc } axios({ method: 'get', url: '/www/public/shangbao/exportxqnxxdc', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; //let name = type=='1'?'市及管理员账号' aLink.setAttribute('download', '辖区内学校管理员账号.xls'); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, teshudownload(item){ if(item.id==2){ this.exportFn1() }else if(item.id==1){ this.DexportFn() }else if(item.id==3){ this.XXexportFn('first') }else if(item.id==4){ this.XXexportFn('second') }else if(item.id==5){ this.YBXCYBJexportFn() }else if(item.id==6){ this.ptljurl() }else if(item.id==7){ this.bjxxdown() }else if(item.id==8){ this.xljkfzrdown() } }, bjxxdown(activeName){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { } var url = '/www/public/shangbao/exportbj' var name = '班级信息.xls' axios({ method: 'get', url, params: { }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ console.log(res,'res') let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', name); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, xljkfzrdown(activeName){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { } var url = '/www/public/shangbao/exportxxfzr' var name = '心理健康负责人账号信息.xls' axios({ method: 'get', url, params: { }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ console.log(res,'res') let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', name); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, ptljurl(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var xxjd = localStorage.getItem('xxjd') var schoolid = user.ID var type = '' if(['1'].includes(xxjd)){ type='1' }else if(['2','3','4'].includes(xxjd)){ type='2' }else if(['5','6'].includes(xxjd)){ type='3' } const params = { type } var url = '/www/public/shangbao/downloadUrl' var name = '全国学生心理健康监测与服务平台链接.url' axios({ method: 'get', url, params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ console.log(res,'res') let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', name); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, download(item){ var that = this let params = {} var name if(item.isupload=='1'){ params = { id :item.recordId, type:'2' } name = item.originFilename }else if(item.isupload=='2'){ params = { id :item.filetempid, type:'1' } name = item.filename } // window.open(item.file) axios({ method: 'get', url: '/www/public/shangbao/downloadtempFile', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ console.log(res,'res') let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', name); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('下载成功') }else{ this.$message.error('下载失败') } }) }, getFileTypeUrl(name){ var url = '' if(name){ var houzhui = this.gettype(name) if(houzhui=='pdf'){ url = '/content/image/xljkImg/pdf.png' }else if(houzhui=='xls'||houzhui=='xlsx'){ url = '/content/image/xljkImg/exceltubiao.png' }else if(houzhui=='jpg'||houzhui=='jpeg'||houzhui=='png'){ url = '/content/image/xljkImg/jpg.png' }else if(houzhui=='doc'||houzhui=='docx'){ url = '/content/image/xljkImg/word.png' }else{ url = '/content/image/xljkImg/qtwjlx.png' } } return url }, gettype(name){ var houzhui if(name){ var arr = name.split('.') houzhui = arr[1] } return houzhui }, getAccept(name){ var accept var houzhui = this.gettype(name) if(houzhui=='xls'||houzhui=='xlsx'){ accept = '.xls,.xlsx' }else if(houzhui=='doc'||houzhui=='docx'||houzhui=='pdf'||houzhui=='zip'){ accept = '.doc,.docx,.pdf,.zip' }else{ accept = '.zip' } return accept }, getList(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var type if(user.Roles.includes('450')){ var xd = localStorage.getItem('xxjd') if(['1','2','3','4'].includes(xd)){ type='1' }else{ type='2' } } const params = { type, } $.get("/www/public/shangbao/findfiletyperecord", params, function(res){ if(res.success==1){ that.loopData0 = res.data.filter(item=>item.sfsc=='0') that.loopData1 = res.data.filter(item=>item.sfsc=='1') that.loopData2 = res.data.filter(item=>item.sfsc=='2') that.loopData4 = res.data.filter(item=>item.sfsc=='4') }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, }, created: function(){ this.getList() }, computed:{ yuzhishuju(){ var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var arr = [] if(user.Roles.includes('220')){ arr = [ {name:'市、区、县管理员账号.xls',id:1,img:"/content/image/xljkImg/excellogo.png"}, {name:'样本校名单及账号.xls',id:2,img:"/content/image/xljkImg/excellogo.png"}, {name:'样本校抽样班级.xls',id:5,img:"/content/image/xljkImg/excellogo.png"}, ] }else if(user.Roles.includes('450')){ var xxjd = localStorage.getItem('xxjd') if(['1','2','3','4'].includes(xxjd)){ arr = [ {name:'老师测评账号.xls',id:4,img:"/content/image/xljkImg/excellogo.png"}, {name:'学生测评账号.xls',id:3,img:"/content/image/xljkImg/excellogo.png"}, {name:'抽样班级信息.xls',id:7,img:"/content/image/xljkImg/excellogo.png"}, {name:'心理健康负责人测评账号.xls',id:8,img:"/content/image/xljkImg/excellogo.png"}, {name:'全国学生心理健康监测与服务平台链接.url',id:6,img:"/content/image/xljkImg/google.png"} ] }else{ arr = [ {name:'老师测评账号.xls',id:4,img:"/content/image/xljkImg/excellogo.png"}, {name:'学生测评账号.xls',id:3,img:"/content/image/xljkImg/excellogo.png"}, {name:'抽样班级信息.xls',id:7,img:"/content/image/xljkImg/excellogo.png"}, {name:'全国学生心理健康监测与服务平台链接.url',id:6,img:"/content/image/xljkImg/google.png"} ] } }else{ arr = [ {name:'样本校抽样班级.xls',id:5,img:"/content/image/xljkImg/excellogo.png"}, ] } return arr } }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftlearningCatalog-view", function(resolve, reject){ var template = "
\n
\n | 学习课程\n
\n\n
\n
\n
\n \n
\n
\n
\n

\n 安全防范实训指导培训课程\n

\n

\n 提高政治素养:增强教师的政治思想素质和职提高政治素养:增强教师的政治思想素质和职提高政治素养:增强教师的政治思想素质和职\n

\n
\n
\n \n 讲师:李宏伟\n
\n
\n \n 讲师:李宏伟\n
\n\n
\n 在线学习\n
\n
\n
\n
\n 学习目录\n
\n
\n 第一课:安全知识防范指导\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid() }; }, methods: { goBack(){ }, }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDxxsb-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n \"\"/\n

\n 信息上报\n

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), centerDialogVisible:false, jindu:{}, dialogVisible: false, xiafajindu:{}, isCheckedsdx:{issmcy:-1,shzt:''}, ybxshzt:{}, gzzzt:0 } }, methods: { getgzzshzt(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var gzzid = user.ID const params = { gzzid } $.get("/www/public/shangbao/gzz-getgzzshzt", params, function(res){ if(res.success==1){ that.gzzzt = res.data.gzzzt that.xgzt = res.data.xgzt }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{ console.log(xhr,status,error) that.$message.error(error||'未知错误') }) }, getybxshzt(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} $.get("/www/public/shangbao/sdjyt-ybxxxhdcx", {username:user.Username}, function(res){ if(res.success==1){ that.ybxshzt = res.data }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{ console.log(xhr,status,error) that.$message.error(error||'未知错误') }) }, handleClose(){ return true }, goshenhe(){ this.$refs.baseDialogXDjddc.show() }, confirm(){ this.$router.push('/XDjibenzigeshenhe') }, getxiafajindu(){ var that = this const params = { } $.get("/www/public/shangbao/findsfxfstate", params, function(res){ if(res.success==1){ that.xiafajindu = res.data }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, getIsCheckedsdx(){ var that = this const params = { } $.get("/www/public/shangbao/findschloolshztandsfsdx", params, function(res){ if(res.success==1){ console.log(res.data,'res.data') that.isCheckedsdx = res.data }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, getjindu(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID //xxid,pageno,pagesize const params = { xxid:schoolid, } $.get("/www/public/shangbao/cnt_sb_jd", params, function(res){ if(res.success==1){ that.jindu = res.data }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, showDialog(type){ if(!type) return if(type==1){ this.getgzzshzt() this.$refs.XDgongzuozuShangbaoDialog.show() } //学生 if(type==2){ this.$refs.XDxsxiSahngbaoDialog.show() } //教师 if(type==3){ this.$refs.XDjsxxShangbaoDialog.show() } //进度督查 if(type==5){ this.$refs.XDjinduduchaDialog.show() } //学校信息 if(type==6){ //this.$refs.XDxuexiaoxxDialog.show() if(!this.jindu.gzzcnt){ this.$alert('请先上报工作组信息', '提示', { confirmButtonText: '确定', }); return } /* if(this.gzzzt==0){ this.$alert('工作组信息未审核,不能进行后续操作!', '提示', { confirmButtonText: '确定', }); return } if(this.gzzzt==2){ this.$alert('工作组信息审核不通过,不能进行后续操作!', '提示', { confirmButtonText: '确定', }); return }*/ this.$router.push({ path:'/XDxuexiaoxxDialog', query:{ done:this.jindu.xxcnt, shzt:this.isCheckedsdx.cyzt } }) } if(type==4){ window.open('https://xinlijc.bnu.edu.cn/www/dd/vue/spa/zxbm#/') } }, chakan(type){ if(!type) return if(type==1){ this.getgzzshzt() this.$refs.XDgongzuozuShangbaoDialog.show() } //学生 if(type==2){ this.$refs.XDxsxiSahngbaoDialog.show() } //教师 if(type==3){ this.$refs.XDjsxxShangbaoDialog.show() } //访谈员 if(type==4){ this.$router.push('/XDftList') } //进度督查 if(type==5){ this.$refs.XDjinduduchaDialog.show() } //学校信息 if(type==6){ if(!this.jindu.gzzcnt){ this.$alert('请先上报工作组信息', '提示', { confirmButtonText: '确定', }); return } /* if(this.gzzzt==0){ this.$alert('工作组信息未审核,不能进行后续操作!', '提示', { confirmButtonText: '确定', }); return } if(this.gzzzt==2){ this.$alert('工作组信息审核不通过,不能进行后续操作!', '提示', { confirmButtonText: '确定', }); return }*/ this.$router.push({ path:'/XDxuexiaoxxDialog', query:{ done:this.jindu.xxcnt, shzt:this.isCheckedsdx.cyzt } }) //this.$refs.XDxuexiaoxxDialog.show() } //市、区县教育局账号下发 if(type==7){ this.$refs.XDxiafaDialog.show() } //直辖校账号下发 if(type==8){ this.$refs.XDzxxxiafaDialog.show() } //直辖校账号下发 if(type==9){ this.$refs.XDzxxxiafaDialog.show() } }, }, computed:{ shangbaoData(){ let list = [] //let user = this.$store.state.user var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} //type 1工作组信息上报 2学生信息 3教师信息 4访谈员上报 6学校信息上报 7市、区县教育局信息下发 8直辖校账号信息下发 9辖区内学校下发 if(user.Roles.includes('220')){ list = [ { title:'工作组人员信息上报', img:"/content/image/xljkImg/共享API接口备份.png", children:[ { img:"/content/image/xljkImg/共享API接口.png", title:"工作组人员信息上报", description:"请上传工作组人员相关信息", type:1, jindu:this.jindu.gzzstujyt, gzzcnt:this.jindu.gzzcnt, } ] }, { title:'样本校信息核对及修正', img:"/content/image/xljkImg/shangbao5.png", children:[ /*{ img:"/content/image/xljkImg/shangbao2.png", title:"市、区管理员账号下载并通知下发", description:"请导出账号信息发送给对应单位", type:7, xiafajindu:this.xiafajindu.sfxfsj }, { img:"/content/image/xljkImg/shangbao1.png", title:"直辖校信息下发", description:"请导出数据后发送给对应学校", type:8, xiafajindu:this.xiafajindu.sfxfzgx },*/ { img:"/content/image/xljkImg/shangbao1.png", title:"样本校信息核对及修正", description:"样本校名称、学段信息审核修正,是否存在上报", type:9, //xiafajindu:this.xiafajindu.isxqxx, ybxshzt:this.ybxshzt } ] }, ] } else if(user.Roles.includes('310')){ list = [ { title:'工作组人员信息上报', img:"/content/image/xljkImg/共享API接口备份.png", children:[ { img:"/content/image/xljkImg/共享API接口.png", title:"工作组人员信息上报", description:"请上传工作组人员相关信息", type:1, jindu:this.jindu.gzzstujyt, gzzcnt:this.jindu.gzzcnt, xiafajindu:this.xiafajindu.sfxfzgx } ] }, /*{ title:'教育局账号信息下发', img:"/content/image/xljkImg/shangbao5.png", children:[ { img:"/content/image/xljkImg/shangbao2.png", title:"区县教育局信息", description:"请下发区县教育局信息", type:7, jindu:this.jindu.lscnt, xiafajindu:this.xiafajindu.sfxfxj }, ] }, { title:'直辖校账号信息下发', img:"/content/image/xljkImg/shangbao4.png", children:[ { img:"/content/image/xljkImg/shangbao1.png", title:"直辖校信息", description:"请导出数据后发送给对应学校", type:8, jindu:this.jindu.ftcnt, xiafajindu:this.xiafajindu.sfxfzgx } ] },*/ ] } else if(user.Roles.includes('410')){ list = [ { title:'工作组人员信息上报', img:"/content/image/xljkImg/共享API接口备份.png", children:[ { img:"/content/image/xljkImg/共享API接口.png", title:"工作组人员信息上报", description:"请上传工作组人员相关信息", type:1, jindu:this.jindu.gzzstujyt, gzzcnt:this.jindu.gzzcnt, } ] }, /*{ title:'直辖校账号信息下发', img:"/content/image/xljkImg/shangbao4.png", children:[ { img:"/content/image/xljkImg/shangbao1.png", title:"直辖校信息", description:"请导出数据后发送给对应学校", type:8, jindu:this.jindu.ftcnt, xiafajindu:this.xiafajindu.sfxfzgx } ] },*/ ] } else if(user.Roles.includes('450')){ list = [ { title:'工作组人员信息上报', img:"/content/image/xljkImg/共享API接口备份.png", children:[ { img:"/content/image/xljkImg/共享API接口.png", title:"工作组人员信息上报", description:"请上传工作组人员相关信息", type:1, jindu:this.jindu.gzzstuxx, gzzcnt:this.jindu.gzzcnt, } ] }, { title:'学校信息上报', img:"/content/image/xljkImg/共享API接口备份.png", children:[ { img:"/content/image/xljkImg/共享API接口.png", title:"学校信息上报", description:"请上传学校相关信息", type:6, jindu:this.jindu.xxzt, xxcnt:this.jindu.xxcnt } ] }, ] /* if(this.isCheckedsdx.issmcy==1&&this.isCheckedsdx.shzt=='2'&&this.isCheckedsdx.cyzt=='2'){ list.push({ title:'学生信息上报', img:"/content/image/xljkImg/shangbao5.png", children:[ { img:"/content/image/xljkImg/shangbao3.png", title:"学生信息", description:"请上传学生信息", type:2, jindu:this.jindu.xscnt } ] }) } if(this.isCheckedsdx.issmcy==1&&this.isCheckedsdx.shzt=='2'&&this.isCheckedsdx.cyzt=='2'){ list.push({ title:'访谈员上报', img:"/content/image/xljkImg/shangbao4.png", children:[ { img:"/content/image/xljkImg/shangbao1.png", title:"访谈员信息", description:"请复制访谈员报名链接进行分享", type:4, jindu:this.jindu.ftcnt } ] }) }*/ } return list } }, created: function(){ var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} this.type = this.$route.query.type this.getjindu() //this.getxiafajindu() this.getIsCheckedsdx() this.getgzzshzt() if(user.Roles.includes('220')){ this.getybxshzt() } }, mounted: function(){ this.showDialog(this.type) }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDshangbaoItems", function(resolve, reject){ var template = "
\n \n
\n
\n \"\"/\n\n

\n {{item.title}}\n

\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \"\"/\n

\n 0\">\n 已上报\n \n \n 未上报\n \n

\n

=0\" style=\"margin-top:0.5vh;\" class=\"zhuangtai\">\n 未上报\n 已通过\n 未通过\n 待审核\n

\n
\n
\n

\n {{it.title}}\n

\n

\n {{it.description}}\n 已上报\n {{it.gzzcnt}}\n 人信息\n

\n
\n\n
\n
\t\n
\n
\n
\n
\n \"\"/\n

去上传

\n
\n 0\">查看\n
\n
\n\n
\n\n\n\n\n
\n
\n
\n \"\"/\n

=0\" style=\"margin-top:0.5vh;\" class=\"zhuangtai\">\n {{it.jindu>0?'已上报':'未上报'}}\n

\n
\n
\n

\n {{it.title}}\n

\n

\n {{it.description}}\n 已上报\n\n {{it.jindu}}\n 条数据\n

\n
\n\n
\n
\t\n
\n
\n
\n
\n \"\"/\n

去上传

\n
\n 0\">查看\n
\n
\n\n
\n \n
\n
\n
\n \"\"/\n

=0\" style=\"margin-top:0.5vh;\" class=\"zhuangtai\">\n {{it.jindu>0?'已上报':'未上报'}}\n

\n
\n
\n

\n {{it.title}}\n

\n

\n {{it.description}}\n 已上报\n {{it.jindu}}条数据\n

\n
\n
\n
\t\n
\n 复制报名链接\n
\n 查看\n
\n
\n
\n
\n \n
\n
\n
\n \"\"/\n

\n {{it.jindu}}\n

\n
\n
\n

\n {{it.title}}\n

\n

\n {{it.description}}\n 已完成\n {{it.xxcnt}} \n\n 步,共{{xxx}}步\n

\n
\n
\n\n
\t\n
\n
\n

上报准备资料下载

\n
\n
\n
\n\n
\n \"\"/\n

去完善

\n
\n 0\">查看\n
\n
\n
\n
\n
\n
\n \n
\n
\n

\n {{it.title}}\n

\n

\n {{it.description}}\n

\n
\n
\n
\t\n\n
\n 查看\n
\n
\n
\n
\n
\n
\n \"\"/\n

未完成\n

\n

已完成\n

\n
\n
\n

\n {{it.title}}\n

\n

\n {{it.description}}\n 已审核\n {{it.ybxshzt.y_shzt_total}} \n 未审核\n {{it.ybxshzt.d_shzt_total}} \n\n \n

\n
\n
\n
\t\n
\n
\n 下载样本校名单\n
\n
\n 去审核\n
\n \n
\n
\n
\n
\n
\n
\n \n
\n

\n 已复制链接,请分享给访谈员报名\n

\n 确定\n
\n
\n \n
\n
\n
\n

\n {{item.name}}\n

\n
\n

\n {{it.fileName}}\n

\n 下载\n
\n\n
\n 全部资料下载\n
\n \n
\n
\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), xxx:0, listData:[] }; }, methods: { downloadALL(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var name = '全部资料.zip' const params = { } axios({ method: 'get', url: '/www/public/shangbao/filedownloadListZip', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', name); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('下载成功') }else{ this.$message.error('下载失败') } }) }, showDownload(){ this.$refs.shangbaozhunbeiziliao.show() this.getDownloadList() }, getDownloadList(){ var that = this const params = { } $.get("/www/public/shangbao/findfiledownloadList", params, function(res){ if(res.success==1){ that.listData = res.data }else{ that.$message.error('文件列表获取失败') } }).fail((xhr,status,error)=>{ that.$message.error('未知错误') }) }, exportFn(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID var type var name = user.Nickname if(name&&name.length){ name = name.substring(0,name.length-3) } //type 1省 2市 3区县 if(user.Roles.includes('220')){ type='1' }else if(user.Roles.includes('310')){ type='2' }else if(user.Roles.includes('410')){ type='3' } const params = { username:user.Username, } /*const params = { //zgdwbm:user.ID, shzt:that.activeName=='first'?'0':this.activeName=='second'?'1':'-1', type, username:user.Username }*/ axios({ method: 'get', url:'/www/public/shangbao/dcdqrxx', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', name+'样本校.xls'); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, download(item){ var that = this const params = { type:item.type } axios({ method: 'get', url:item.jk, params: { ...params }, responseType: 'blob' }).then(res=>{ console.log(res.data) if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', item.fileName); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败1') } }).catch(err=>{ this.$message.error('导出失败1') }) }, goshenhe(){ this.$emit("goshenhe") }, getImg(it){ var url = '/content/image/xljkImg/weikaishi.png' if(it.jindu){ var jindu = it.jindu if(jindu>0){ url = '/content/image/xljkImg/yikaishi.png' }else if(jindu<0){ url = '/content/image/xljkImg/共享API接口.png' } } return url }, getImg1(it){ var url = '' if(it.xiafajindu){ var jindu = it.xiafajindu if(jindu==1){ url = '/content/image/xljkImg/yikaishi.png' }else if(jindu==2){ url = '/content/image/xljkImg/weikaishi.png' } } if(it.type==9){ if(it.ybxshzt.zt==0){ url = '/content/image/xljkImg/weikaishi.png' }else{ url = '/content/image/xljkImg/yikaishi.png' } } return url }, goupload(type){ this.$emit("showUploadDialog",type) }, chakan(type){ this.$emit("chakan",type) }, fuzhi(){ var copyText = document.getElementById("textToCopy"); copyText.select(); document.execCommand("Copy"); this.$refs.tishifuzhichenggong.show() }, closetishi(){ this.$refs.tishifuzhichenggong.close() }, }, computed:{ }, created: function(){ this.user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var xxjd = localStorage.getItem('xxjd') if(['1','2','3','4'].includes(xxjd)){ this.xxx = 3 }else{ this.xxx = 3 } }, mounted: function(){ }, props: ['title', 'data', 'config',"Ddata","gzzzt"] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDxsxiSahngbaoDialog", function(resolve, reject){ var template = "
\n \n \n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), loading:false, dialogVisible: false, tableData: [], multipleSelection: [], currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4, innerVisible:false, classList:[], total:0, pages:{ pageNo:1, pageSize:5 }, reruleForm: { xm:'',xb:'',xjh:'',yx:'',rxnf:'',bj:'',zy:'',xxjd:'',xh:'',dh:'' }, ruleForm: { xm:'',xb:'',xjh:'',yx:'',rxnf:'',bj:'',zy:'',xxjd:'',xh:'',dh:'' }, rules: { xm: [ { required: true, message: '请输入学生姓名', trigger: 'blur' } ], xb: [ { required: true, message: '请选择学生性别', trigger: 'blur' } ], xjh: [ { required: true, message: '请输入学籍号', trigger: 'blur' } ], dh: [ { validator: publicUtilsOfCheck.isValidPhoneNumber, trigger: 'blur' } ], yx: [ { required: true, message: '请输入邮箱', trigger: 'blur' }, { validator: publicUtilsOfCheck.validateEmail, trigger: 'blur' } ], rxnf: [ { required: true, message: '请选择学生入学年份', trigger: 'blur' } ], bj: [ { required: true, message: '请输入班级', trigger: 'blur' } ], zy: [ { required: true, message: '请输入学生专业', trigger: 'blur' } ], xxjd: [ { required: true, message: '请选择学校阶段', trigger: 'blur' } ], xh: [ { required: true, message: '请输入学号', trigger: 'blur' } ], }, isEdit:false } }, methods:{ handlebeforeClose(){ this.$emit('closeDialog') }, exportFn(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { schoolid, } axios({ method: 'get', url: '/www/public/shangbao/exportStudent', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ console.log(res,'res') let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', '学生数据.xls'); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, customUpload(params) { var that = this that.loading = true var xxjd = localStorage.getItem('xxjd') //1小学 2初中 3高中 4中职 5高职 7本科 8硕士 9博士 var importType if(['1','2','3'].indexOf(xxjd)!=-1){ importType = '1' }else if(xxjd=='4'){ importType = '2' }else{ importType = '3' } // params是一个对象,包含了file和fileList, // 但是这个params参数可能每个版本不一样值就不一样,到时候自己打印看看, // 反正file的值就是原始的File对象 const formData = new FormData() console.log(params.file,'params.file') formData.append('file', params.file) // 这是file入参,文件信息 // 如果extraParams是个对象,循环加入formData for (const key in this.extraParams) { formData.append(key, this.extraParams[key]) } // 如果extraParams是个单独的值,直接加入 var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID var roles=user.UserFilter.urole // 调接口 axios.post(`/www/public/shangbao/studentImport?importType=${importType}&roles=${roles}&uuuid=${schoolid}`, formData, { headers: { 'Content-Type': 'multipart/form-data' } }) .then(({data}) => { if(data&&data.success==1){ that.$message.success(data.message) that.loading = false that.getStu() }else{ that.loading = false that.$message.error(data.message) } }) .catch(error => { that.loading = false console.error(error); }); }, handleImportExcel(val){ console.log(val,'val') }, onError(){}, download(){ var that = this var xxjd = localStorage.getItem('xxjd') //4小初高,5中高职本硕博 var type switch (xxjd) { case '1': type='01' break; case '2': type='02' break; case '3': type='03' break; case '4': type='04' break; case '5': type='05' break; case '6': type='06' break; default: // 如果 expression 不匹配任何 case 值,则执行 default 子句中的代码块 break; } const params = { type, } axios({ method: 'get', url: '/www/public/shangbao/dclsxsmb', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ console.log(res,'res') let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', '学生导入模版.xlsx'); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('下载成功') }else{ this.$message.error('下载失败') } }) }, del(row){ var that = this const params = { stuId:row.id, } $.get("/www/public/shangbao/deleteStudent", params, function(res){ if(res.success==1){ that.$message.success('删除成功') that.getStu() }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{ that.$message.success('请求错误') }) }, handleEdit(row){ this.$refs.baseDialog1.show() this.$nextTick(()=>{ this.$refs.ruleForm.resetFields() this.ruleForm = {} this.ruleForm = {...row} this.isEdit = true }) }, submit(){ var that = this this.$refs['ruleForm'].validate((valid) => { if (valid) { var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID var xxmc = user.Nickname const params = { schoolid,xxmc,...this.ruleForm } if(!this.ruleForm.id){ $.post("/www/public/shangbao/addStudent", params, function(res){ if(res.success==1){ that.$message.success(res.message) that.$refs.baseDialog1.close() that.getStu() }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{ console.log(error,'error') this.$message.error('请求错误') }) }else{ $.post("/www/public/shangbao/editStudent", params, function(res){ if(res.success==1){ that.$message.success(res.message) that.$refs.baseDialog1.close() that.getStu() }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{ console.log(error,'error') this.$message.error('请求错误') }) } } else { console.log('error submit!!'); return false; } }); }, handleAdd(){ this.$refs.baseDialog1.show() this.$nextTick(()=>{ this.$refs.ruleForm.resetFields() this.ruleForm = {...this.reruleForm} this.isEdit = false }) }, show(){ this.getClass() this.getStu() this.$refs.baseDialog.show() }, getStu(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { schoolid, ...this.pages } $.get("/www/public/shangbao/findStudent", params, function(res){ if(res.success==1){ that.tableData = res.data that.total = res.total }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{ this.$message.error('请求错误') }) }, handleConfirm(){ this.$refs.baseDialog.close() }, handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pageSize = val this.getStu() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pageNo = val this.getStu() }, handleClick(){}, handleClose(){ console.log(1) this.dialogVisible = false }, toggleSelection(rows) { if (rows) { rows.forEach(row => { this.$refs.multipleTable.toggleRowSelection(row); }); } else { this.$refs.multipleTable.clearSelection(); } }, handleSelectionChange(val) { this.multipleSelection = val; }, getClass(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { schoolid } $.get("/www/public/shangbao/findschoolbj", params, function(res){ if(res.success==1){ that.classList = res.data }else{ this.$message.error(res.message) } }).fail((xhr,status,error)=>{ this.$message.error('请求错误') }) }, }, computed:{ isXCG(){ if(['1','2','3'].indexOf(this.ruleForm.xxjd)!=-1){ return true } return false } }, watch:{ "ruleForm.xxjd"(val){ if(['1','2','3'].indexOf(val)!=-1){ this.ruleForm.xh = '' this.ruleForm.zy = '' }else{ this.ruleForm.xjh = '' } } }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDjsxxShangbaoDialog", function(resolve, reject){ var template = "
\n \n \n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), loading:false, dialogVisible: false, tableData: [], multipleSelection: [], currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4, innerVisible:false, classList:[], total:0, pages:{ pageNo:1, pageSize:5 }, reruleForm: { xm:'',xb:'',lxfs:'',sfbzr:'',sfxlls:'',sfxxfzr:'',sfxxfzr:'',yx:'',xd:'', }, ruleForm: { xm:'',xb:'',lxfs:'',sfbzr:'',sfxlls:'',sfrkjs:'',sfxxfzr:'',yx:'',xd:'', }, user:null, rules: { xm: [ { required: true, message: '请输入学生姓名', trigger: 'blur' } ], xb: [ { required: true, message: '请选择学生性别', trigger: 'change' } ], lxfs: [ { required: true, message: '请输入联系方式', trigger: 'blur' }, { validator: publicUtilsOfCheck.isValidPhoneNumber, trigger: 'blur' } ], sfbzr: [ { required: true, message: '请选择是否班主任', trigger: 'change' } ], sfxlls: [ { required: true, message: '请选择是否心理老师', trigger: 'change' } ], sfrkjs: [ { required: true, message: '请选择是否任课老师', trigger: 'blur' } ], sfxxfzr: [ { required: true, message: '请选择是否学校负责人', trigger: 'change' } ], yx: [ { required: true, message: '请输入邮箱', trigger: 'blur' }, { validator: publicUtilsOfCheck.validateEmail, trigger: 'blur' } ], xd: [ { required: true, message: '请选择授课阶段', trigger: 'change' } ], glbj: [ { required: true, message: '请输入管理班级', trigger: 'blur' } ], }, isEdit:false } }, methods:{ handlebeforeClose(){ this.$emit('closeDialog') }, exportFn(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { schoolid, } axios({ method: 'get', url: '/www/public/shangbao/exportteather', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', '学生数据.xls'); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, customUpload(params) { var that = this that.loading = true var xxjd = localStorage.getItem('xxjd') //1小学 2初中 3高中 4中职 5高职 7本科 8硕士 9博士 var importType if(['1','2','3'].indexOf(xxjd)!=-1){ importType = '1' }else{ importType = '2' } // params是一个对象,包含了file和fileList, // 但是这个params参数可能每个版本不一样值就不一样,到时候自己打印看看, // 反正file的值就是原始的File对象 const formData = new FormData() console.log(params.file,'params.file') formData.append('file', params.file) // 这是file入参,文件信息 // 如果extraParams是个对象,循环加入formData for (const key in this.extraParams) { formData.append(key, this.extraParams[key]) } // 如果extraParams是个单独的值,直接加入 var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID var roles=user.UserFilter.urole // 调接口 axios.post(`/www/public/shangbao/teacherImport?importType=${importType}&roles=${roles}&uuuid=${schoolid}`, formData, { headers: { 'Content-Type': 'multipart/form-data' } }) .then(({data}) => { if(data&&data.success==1){ that.$message.success(data.message) that.loading = false that.getList() }else{ that.loading = false that.$message.error(data.message) } }) .catch(error => { that.loading = false console.error(error); }); }, onError(){}, download(){ var that = this var xxjd = localStorage.getItem('xxjd') var importType //4小初高,5中高职本硕博 if(['1','2','3'].indexOf(xxjd)!=-1){ downloadtype = '4' }else{ downloadtype = '5' } const params = { type:downloadtype, } axios({ method: 'get', url: '/www/public/shangbao/dclsxsmb', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', '老师导入模版.xls'); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('下载成功') }else{ this.$message.error('下载失败') } }) }, del(row){ var that = this const params = { teaId:row.id, } $.post("/www/public/shangbao/deleteteather", params, function(res){ if(res.success==1){ that.$message.success('删除成功') that.getList() }else{ that.$message.error(res.message) } }).fail((xhr,status,error)=>{}) }, handleEdit(row){ this.$refs.baseDialog1js.show() this.$nextTick(()=>{ this.$refs.ruleForm.resetFields() this.ruleForm = {...row} this.isEdit = true }) }, submit(){ var that = this this.$refs['ruleForm'].validate((valid) => { if (valid) { var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID var xxmc = user.Nickname const params = { xxid:schoolid,xxmc,...this.ruleForm } if(!this.ruleForm.id){ $.post("/www/public/shangbao/addteather", params, function(res){ if(res.success==1){ that.$message.success(res.message) that.$refs.baseDialog1js.close() that.getList() }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{ that.$message.error('请求错误') }) }else{ $.post("/www/public/shangbao/editteather", params, function(res){ if(res.success==1){ that.$message.success(res.message) that.$refs.baseDialog1js.close() that.getList() }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{ that.$message.error('请求错误') }) } } else { console.log('error submit!!'); return false; } }); }, handleAdd(){ this.$refs.baseDialog1js.show() this.$nextTick(()=>{ this.$refs.ruleForm.resetFields() console.log(this.reruleForm) this.ruleForm = {...this.reruleForm} this.isEdit = false }) }, show(){ this.getList() this.$refs.baseDialogjs.show() }, getList(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { schoolid, ...this.pages } $.get("/www/public/shangbao/findteather", params, function(res){ if(res.success==1){ that.tableData = res.data that.total = res.total }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, handleConfirm(){ this.$refs.baseDialogjs.close() }, handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pageSize = val this.getList() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pageNo = val this.getList() }, handleClick(){}, handleClose(){ console.log(1) this.dialogVisible = false }, toggleSelection(rows) { if (rows) { rows.forEach(row => { this.$refs.multipleTable.toggleRowSelection(row); }); } else { this.$refs.multipleTable.clearSelection(); } }, handleSelectionChange(val) { this.multipleSelection = val; } }, computed:{ isXCG(){ if(['1','2','3'].indexOf(this.ruleForm.xxjd)!=-1){ return true } return false } }, watch:{ "ruleForm.xxjd"(val){ if(['1','2','3'].indexOf(val)!=-1){ this.ruleForm.xh = '' }else{ this.ruleForm.xjh = '' } } }, created: function(){ this.user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftschedule-view", function(resolve, reject){ var template = "
\n
\n | 返回首页\n
\n
\n

\n 安全防范实训指导培训课程进度表\n

\n\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), reverse: true, dataList:[], }; }, methods: { getList(){ const that =this let data = { } $.post("/www/public/shouye/px_fty_cx_xxjd", data, function(res){ if(res.error==0){ that.dataList = res.data }else{ that.$message({ type: "error", message: res.message }) } }) }, goBack(){ this.$router.push('ftInterviewHomepage') }, }, created: function(){ }, mounted: function(){ const that =this that.getList() }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDHomePage-view", function(resolve, reject){ var template = "
\n \n
\n \n

\n 请务必在机房测试答题!\n

\n
\n \n \n \n \n \n \n \n \n \n \n
\n 确 定\n
\n
\n
\n
\n
\n

\n 准备阶段\n

\n

\n 测试阶段\n

\n

\n 测后阶段\n

\n \n \n \n \n \n \n
\n
\n
\n
\n

\n {{index+1}}\n

\n

\n {{item.rwsjms}}\n

\n
\n
\n\n \n\n
\n
\n
\n
\n
\n
\n
\n {{item.name}}\n
\t\n
\n
\n
\n
\n
\n
\n
\n

\n 欢迎您! \n

\n

\n {{Nickname}}! \n

\n
\n \n
\n
\n
\n\n\n
\n 未 开 始\n
\n
\n 进 行 中\n
\n
\n 已 完 成\n
\n
\n 未 上 报\n
\n
\n 已 通 过\n
\n
\n 已 完 成\n
\n
\n 未 通 过\n
\n
\n 待 审 核\n
\n
\n 进 行 中 \n
\n
\n 未 读\n
\n
\n 已 读\n
\n
\n 未 读\n
\n
\n 已 读\n
\n
\n 未 上 传\n
\n
\n 已 上 传\n
\n
\n 未 上 传\n
\n
\n 已 上 传\n
\n
\n 未 生 成\n
\n
\n 可 下 载\n
\n
\n 已 下 载\n
\n
\n 未 测 试\n
\n
\n 已 测 试\n
\n \n

\n {{item.title}}\n

\n

\n {{item.description}}\n

\n
\n
\n
\n
\n
\n 未 开 始\n
\n
\n 进 行 中\n
\n
\n 已 完 成\n
\n
\n 未 上 报\n
\n
\n 已 通 过\n
\n
\n 已 完 成\n
\n
\n 未 通 过\n
\n
\n 待 审 核\n
\n
\n 进 行 中 \n
\n
\n 未 读\n
\n
\n 已 读\n
\n
\n 未 读\n
\n
\n 已 读\n
\n
\n 未 上 传\n
\n
\n 已 上 传\n
\n
\n 未 上 传\n
\n
\n 已 上 传\n
\n
\n 未 生 成\n
\n
\n 可 下 载\n
\n
\n 已 下 载\n
\n
\n 未 测 试\n
\n
\n 已 测 试\n
\n
\n \n
\n\n
\n
\n {{item.title}}\n
\n
\n {{item.description}}\n
\n
\n
\n
\n\n\n \n
\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { jihuabiao:[], butList:[], active:0, tzggList:[], acitveName:1, value:'', reverse: false, crq:'', rqList:[], currentList:[], dialogVisible:false, formLabelWidth: '120px', xxsbjg:'0', sjrwjg:'0', skewedShow:'0', zlscjg:'0', zhxzjg:'0', zdcsjg:'0', glyxm:'', xxjd:'', yhjs:[], loading:false, form: { sjhm:'', }, rules: { sjhm: [ { required: true, message: '请输入手机号', trigger: 'blur' }, { validator: publicUtilsOfCheck.isValidPhoneNumber, trigger: 'blur' } ], } }; }, methods: { tijiao(formName){ var that = this this.$refs[formName].validate((valid) => { if (valid) { let that = this; const params = { sjhm:that.form.sjhm } $.post('/www/public/shouye/mima_update_mobile',params, function(msg){ if(msg.success == 1){ that.$message.success('联络人手机号已更新') that.$refs.lianluorenshoujihao.close() window.isfirstLogin = false } else { that.$message({ type: 'error', message: msg.message }); } }); } }) }, getjihuabiao(leibie){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var type if(user.Roles.includes('220')){ type = '1' }else if(user.Roles.includes('310')){ type = '2' }else if(user.Roles.includes('410')){ type = '3' }else if(user.Roles.includes('450')){ if(that.xxjd<5){ console.log(that.xxjd) type = '4' }else{ type = '5' } } const params = { type, jd:leibie } console.log(params,'params') $.get("/www/public/shangbao/findsysxlist", params, function(res){ if(res.success==1){ if(res.data){ that.jihuabiao = res.data }else{ that.$message.error('待办事项列表获取失败') } }else{ that.$message.error(res.message) } }).fail((xhr,status,error)=>{}) }, changeactiveName(val = 1){ this.acitveName = val var leibie if(val==1){ leibie = '测前准备' } if(val==2){ leibie = '测试期间' } if(val==3){ leibie = '测试结束' } this.getjihuabiao(leibie) }, getStuListDft(){ var that = this const params = { bj:'', zy:'', schoolid:this.schoolid, userid:this.schoolid, yhjs:JSON.stringify([this.yhjs]), ftzt:'0' } console.log(params,'params') $.post("/www/public/shouye/ft_ftyystu", params, function(res){ if(res.success==1){ if(res.data.length){ that.$alert('无访谈老师,无法预约!', '提示', { confirmButtonText: '确定', center: true }).then(() => { that.loading=false }).catch(() => { that.loading=false }); }else{ that.$alert('无访谈老师和访谈学生,无法预约!', '提示', { confirmButtonText: '确定', center: true }).then(() => { that.loading=false }).catch(() => { that.loading=false }); } }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, getList(){ var that = this const params = { schoolid:this.schoolid } console.log(params,'params') $.post("/www/public/shouye/ft_ftlslist", params, function(res){ if(res.success==1){ if(res.data.length){ that.$router.push({ path:'/XDyuyue' }) }else{ that.getStuListDft() } }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, getStuList(){ var that = this if(that.loading) return that.loading = true const params = { schoolid:this.schoolid, userid:this.schoolid, yhjs:JSON.stringify(this.yhjs), ftzt:'1', ...this.pages } console.log(params,'params') $.post("/www/public/shouye/ft_ftyystu", params, function(res){ if(res.success==1){ if(res.data.length){ that.$router.push({ path:'/XDyyft' }) } else{ that.getList() } }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, handleConfirm(){ this.$router.push('/beforeEvaluations?gaugeId=45ca7c69-37db-4e35-bd89-442577c07e48') }, logout(){ localStorage.removeItem('user') this.$store.commit('user',undefined) this.$router.replace('/login') }, save() { const that = this that.$refs.formRef.validate((valid) => { if (valid) { const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data = { xxyid:that.dataStatus?id:'', ...that.form } $.post("/www/public/shangbao/addjfxx", data, function(res){ if(res.error==0){ that.$message.success('提交成功') that.dialogVisible =false }else{ that.$message.error(res.message) } }) } else { console.error('表单验证失败'); return false; } })}, goPage(url){ var that = this if(url){ if(url.indexOf('beforeEvaluations')!=-1){ that.$alert( '请务必在机房测试答题!','作答测试注意事项', { confirmButtonText: '确定', center: true }).then(() => { that.handleConfirm() }).catch(() => { });; //this.$refs.zuodaceshitishi.show() }else if(url.indexOf('XDyyft')!=-1){ this.getStuList() } else{ this.$router.push(url) } }else{ this.dialogVisible =true } }, getImgsrc:function(val) { return "/content/image/xljkImg/"+val }, getIndex(index){ this.active = index }, onPanelChange(value, mode) { console.log(value, mode); }, getDay(val){ if(this.rqList.length>0){ if(val.type=='current-month'){ //this.currentList.push(val.day) } if(val.type=='current-month'&&this.rqList.indexOf(val.day)>=0){ return true }else{ return false } } }, getDate(val){ //console.log(this.currentList) this.crq = val this.getdb() }, //获取待办 getdb:function(){ let that = this //$.post("/www/py/fwpt/test", {crq:this.crq}, function(res){ $.post("/www/py/fwpt/user_event", {crq:this.crq}, function(res){ if(res.success==1){ if(res.data.data){ that.tzggList = res.data.data that.rqList = res.data.rq } } }) }, //获取学段 getxxjd(){ const that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params1 = { schoolid } $.get("/www/public/shangbao/findschoolxd", params1, function(res){ if(res.success==1){ that.xxjd=res.data.xd localStorage.setItem('xxjd',res.data.xd) that.getjihuabiao("测前准备") }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, glyxmget(){ var glyInfo = localStorage.getItem('glyInfo')?JSON.parse(localStorage.getItem('glyInfo')):{} this.glyxm = glyInfo.glyxm }, }, computed:{ user(){ return this.$store.state.user }, buttomList(){ let list = [] console.log(this.$store.state,'state') var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} console.log(this.user,'user') //220省310市410区县 //if(this.user&&this.user.Roles){ if(user.Roles.includes('220')){ list = [ { img:'/content/image/xljkImg/人员上报.png', title:"信息上报", description:"工作组信息上报及样本校名单确认", background:"radial-gradient( 0% 100% at 0% 0%, #2C79F9 0%, #56ADFF 100%)", url:"/XDxxsb" }, { img:'/content/image/xljkImg/资料下载.png', title:"信息审核", description:"工作组信息审核,直属校信息审核", background:"linear-gradient( 180deg, #8564FF 0%, #918DFF 100%)", url:"/XDzigeshenhehome" }, { img:'/content/image/xljkImg/进度督查.png', title:"进度查看", description:"下级单位上报、测评查看", background:"radial-gradient( 0% 100% at 0% 0%, #00B8CD 0%, #24D4B9 100%)", url:"/jinduchakan" }, /*{ img:'/content/image/xljkImg/shangjirenwu.png', title:"任务收发", description:"给本级或下级单位发布任务,查看任务完成情况", background:"radial-gradient( 0% 95% at 0% 0%, #FF7E27 0%, #FFAA41 100%)", url:"/taskList" },*/ { img:'/content/image/xljkImg/baogaoshangchuan.png', title:"上传下载", description:"各类资料上传、下载", background:"radial-gradient( 0% 100% at 0% 0%, #2C79F9 0%, #56ADFF 100%)", url:"/XDzlxz1" }, /*{ img:'/content/image/xljkImg/通知公告.png', title:"通知公告", description:"查看本级通知,给本级及下级发送通知", background:"radial-gradient( 0% 95% at 0% 0%, #3067FF 0%, #6095FF 100%)", url:"/XDnotice" },*/ ] }else if(user.Roles.includes('310')||user.Roles.includes('410')){ list = [ { img:'/content/image/xljkImg/人员上报.png', title:"信息上报", description:"工作组信息上报", background:"radial-gradient( 0% 100% at 0% 0%, #2C79F9 0%, #56ADFF 100%)", url:"/XDxxsb" }, { img:'/content/image/xljkImg/资料下载.png', title:"信息审核", description:"学校上报信息、试点校资质等审核", background:"linear-gradient( 180deg, #8564FF 0%, #918DFF 100%)", url:"/XDzigeshenhehome" }, { img:'/content/image/xljkImg/进度督查.png', title:"进度查看", description:"下级单位上报、测评查看", background:"radial-gradient( 0% 100% at 0% 0%, #00B8CD 0%, #24D4B9 100%)", url:"/jinduchakan" }, /*{ img:'/content/image/xljkImg/shangjirenwu.png', title:"任务收发", description:"给本级或下级单位发布任务,查看任务完成情况", background:"radial-gradient( 0% 95% at 0% 0%, #FF7E27 0%, #FFAA41 100%)", url:"/taskList" },*/ { img:'/content/image/xljkImg/baogaoshangchuan.png', title:"上传下载", description:"各类资料上传、下载", background:"radial-gradient( 0% 100% at 0% 0%, #2C79F9 0%, #56ADFF 100%)", url:"/XDzlxz1" }, /*{ img:'/content/image/xljkImg/通知公告.png', title:"通知公告", description:"查看上级通知,给本级及下级发送通知", background:"radial-gradient( 0% 95% at 0% 0%, #3067FF 0%, #6095FF 100%)", url:"/XDnotice" }*/ ] } else if(user.Roles.includes('450')){ list = [ { img:'/content/image/xljkImg/人员上报.png', title:"信息上报", description:"学校、学生信息上报", background:"radial-gradient( 0% 100% at 0% 0%, #2C79F9 0%, #56ADFF 100%)", url:"/XDxxsb" }, /*{ img:'/content/image/xljkImg/zhanghaoxiazai.png', title:"账号下载", description:"学生、老师账号下载", background:"radial-gradient( 0% 95% at 0% 0%, #FF7E27 0%, #FFAA41 100%)", url:"/stuIssued" }, { img:'/content/image/xljkImg/yuyuefangtan.png', title:"预约访谈", description:"帮助学生预约访谈老师", background:"radial-gradient( 0% 100% at 0% 0%, #00B8CD 0%, #24D4B9 100%)", url:"/XDyyft" },*/ { img:'/content/image/xljkImg/jinduchakan.png', title:"进度查看", description:"学校测评进度查看", background:"linear-gradient( 180deg, #8564FF 0%, #918DFF 100%)", url:"/jinduchakan" }, /*{ img:'/content/image/xljkImg/通知公告.png', title:"通知公告", description:"查看上级通知,给本级及下级发送通知", background:"linear-gradient( 180deg, #8564FF 0%, #918DFF 100%)", url:"/XDnotice" }, { img:'/content/image/xljkImg/shangjirenwu.png', title:"上级任务", description:"上级下发的任务查看、反馈", background:"radial-gradient( 0% 95% at 0% 0%, #FF7E27 0%, #FFAA41 100%)", url:"/taskList" },*/ { img:'/content/image/xljkImg/jscp.png', title:"作答测试", description:"作答环境测试", background:"radial-gradient( 0% 100% at 0% 0%, #00B8CD 0%, #24D4B9 100%)", url:"/beforeEvaluations?gaugeId=45ca7c69-37db-4e35-bd89-442577c07e48" }, { img:'/content/image/xljkImg/baogaoshangchuan.png', title:"上传下载", description:"各类资料上传、下载", background:"radial-gradient( 0% 100% at 0% 0%, #2C79F9 0%, #56ADFF 100%)", url:"/XDzlxz1" }, ] } //} return list } }, created: function(){ const that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} if(user.Roles.includes('450')){ this.getxxjd() } this.getdb() this.Nickname = user.Nickname this.user = user this.schoolid = this.user.ID this.yhjs = this.user.Roles $.post("/www/public/shangbao/findtaskbyrolesl", {}, function(res){ if(res.success==1){ that.sjrwjg =res.data.sjrwjg that.xxsbjg=res.data.xxsbjg that.skewedShow=res.data.zgscjg that.zlscjg =res.data.zlscjg that.zhxzjg=res.data.zhxzjg that.zdcsjg = res.data.zdcsjg }else{ } }) }, mounted: function(){ this.changeactiveName(this.acitveName) setTimeout(()=>{ this.changeactiveName(this.acitveName) },1000) setTimeout(()=>{ this.changeactiveName(this.acitveName) },2000) }, props: ['title', 'data', 'config','isHeight'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDyyft111-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n \n

\n 预约访谈\n

\n
\n \n \n\n\n
\n
\n
\n
\n 全部\n
\n
\n 未预约\n
\n
\n 已约满\n
\n
\n
\n
\n \n
\n
\n
\n
\n

\n {{item.name}}\n

\n 初级访谈\n
\n

\n {{item.gzms}}\n

\n
\n 立即预约\n
\n
\n
\n
\n \n

\n 电话:{{item.phone}}\n

\n
\n \n
\n \n

\n 专业:{{item.zy}}\n

\n
\n
\n
\n\n \n
\n \n

\n 职务:哲学院副院长\n

\n
\n
\n \n

\n 擅长:心理访谈\n

\n
\n
\n
\n\n
\n
-->\n \n
\n \n \n\n\n
\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), ftsj:new Date(), yyzt:'', pages:{ pagesize:10, pagenum:1, }, listData:[], user:null, currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4 }; }, methods: { formatDate(date) { const year = date.getFullYear(); const month = (date.getMonth() + 1).toString().padStart(2, '0'); const day = date.getDate().toString().padStart(2, '0'); return `${year}-${month}-${day}`; }, handleDateChange(val){ console.log(val,'va;') this.getList() }, changeYyzt(val){ this.yyzt = val this.getList() }, getList(){ var that = this const params = { ftsj:this.formatDate(this.ftsj), yyzt:this.yyzt, ...this.pages, schoolid:this.schoolid } console.log(params,'params') $.post("/www/public/shouye/ft_ftyyls", params, function(res){ if(res.success==1){ that.listData = res.data }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, goyuyue(item){ this.$router.push({ path:"/XDyuyue", query:{ item:JSON.stringify(item) } }) }, handleSizeChange(val) { console.log(`每页 ${val} 条`); }, handleCurrentChange(val) { console.log(`当前页: ${val}`); } }, created: function(){ this.user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} this.schoolid = this.user.ID this.getList() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftlist-view", function(resolve, reject){ var template = "
\n \n \n
\n
\n
\n
\n \n
\n
\n 暂无内容\n
\n
\n
\n
\n\n\n
\n
\n
\n
\n \n
\n
\n
\n {{item.ksmc}}\n
\n
\n 考试时间:{{item.kssj}}---{{item.jssj}}\n
\n \n {{ item.iswc ? '已考试' : '开始考试' }}\n
\n\n
\n\n
\n\n\n\n
\n
\n\n
\n\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dataList:[] }; }, methods: { goftkszb(item) { this.$router.push({ path: '/ftkszb', query: { item: JSON.stringify(item) } }); }, goBack(){ this.$router.go(-1) }, getList(){ const that =this let data = { } $.post("/www/public/shouye/px_ftlssy_ks_list", data, function(res){ if(res.error==0){ that.dataList = res.data console.log(that.dataList) }else{ that.$message.error(res.message) } }) }, getImgsrc(val) { return "/content/image/xljkImg/"+val }, }, created: function(){ const that =this that.getList() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDyuyue-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n \n

\n 点击选择访谈老师\n

\n
\n
\n \n
\n

\n {{item.name}}\n

\n

\n 常见的轻中度抑郁症、焦虑症、疑病症、恐惧症、强迫症心理疏导\n

\n
\n\n
\n
\n
\n
\n \n
\n
\n
\n
\n

\n {{cur.name}}\n

\n 已选择访谈老师\n
\n

\n 常见的轻中度抑郁症、焦虑症、疑病症、\n 恐惧症、强迫症心理疏导\n

\n
\n
\n
\n
\n
\n \n

\n 电话:{{cur.phone}}\n

\n
\n
\n \n

\n 职务:{{cur.zw}}\n

\n
\n\n\n
\n
\n
\n \n

\n 专业:{{cur.zy}}\n

\n
\n
\n \n

\n 擅长:心理访谈\n

\n
\n
\n\n
\n\n
\n
\n \n

\n 访谈时间\n

\n \n \n \n \n

\n 待访谈学生\n

\n
\n \n
\n

\n 班级\n

\n \n \n \n \n
\n\n
\n \n \n \n
\n \n {{item.xsmc}}\n
\n
\n
\n

5\" class=\"chakangengduo\" @click=\"showmore\">\n {{!showallstu?'查看更多':'收起'}}\n

\n
\n
\n \n

\n 暂无学生!\n

\n
\n

\n 访谈地点\n

\n \n \n \n\n \n 短信提醒\n \n
\n 一键预约\n
\n
\n\n\n
\t\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), cur:{}, listData:[], value2:'', form:{name:'',stulist:[],ftdz:'',date:'',sfdx:''}, checkList:[], stuList:[], curIndex1:0, optionData:{bj:[],zy:[]}, selectData:{ bj:'',zy:'' }, xxjd:'', showallstu:false, rules: { stulist: [ { required: true, message: '请选择学生', trigger: 'blur' }, ], ftdz: [ { required: true, message: '请输入访谈地址', trigger: 'blur' }, ], date: [ { required: true, message: '请选择日期', trigger: 'blur' }, ], }, pickerOptions: { }, }; }, methods: { handlechange(val){ console.log(this.selectData,'selectData') this.selectData.bj='' this.getslectOption() this.getStuList() }, handleclasschange(){ this.getStuList() }, onSubmit(){ var that = this this.$refs.form.validate((valid) => { if (valid) { const params = { ftyid:this.cur.userid, kssj:this.form.date[0], jssj:this.form.date[1], stulist:JSON.stringify(this.form.stulist), ftdz:this.form.ftdz, isfs:this.form.sfdx?'1':'2',// 是否短信提醒, userid:this.user.ID } $.post("/www/public/shouye/ft_stufpls", params, function(res){ if(res.success==1){ that.$message.success('预约成功') that.getList() that.getStuList() }else{ that.$message.error(res.message) } }).fail((xhr,status,error)=>{ that.$message.error('预约失败') }) } else { console.log('error submit!!'); return false; } }); }, showmore(){ this.showallstu = !this.showallstu }, changeCur(item,index){ this.curIndex1 = index this.cur = item }, formatDate(date) { const year = date.getFullYear(); const month = (date.getMonth() + 1).toString().padStart(2, '0'); const day = date.getDate().toString().padStart(2, '0'); return `${year}-${month}-${day}`; }, getList(){ var that = this const params = { schoolid:this.schoolid } console.log(params,'params') $.post("/www/public/shouye/ft_ftlslist", params, function(res){ if(res.success==1){ that.listData = res.data if(that.listData.length){ that.cur = that.listData[0]||{} } }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, getslectOption(){ var that = this const params = { schoolid:this.schoolid, userid:this.schoolid, yhjs:JSON.stringify([this.yhjs]), zymc:that.selectData.zy } if(['4','5','6'].includes(that.xxjd)){ params.isgj='1' }else{ params.isgj='2' } console.log(params,'params') $.post("/www/public/shouye/ft_ftyystupublic", params, function(res){ if(res.success==1){ that.optionData.bj = res.data.bj that.optionData.zy = res.data.zy }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, getStuList(){ var that = this const params = { bj:that.selectData.bj, zy:that.selectData.zy, schoolid:this.schoolid, userid:this.schoolid, yhjs:JSON.stringify([this.yhjs]), ftzt:'0' } console.log(params,'params') $.post("/www/public/shouye/ft_ftyystu", params, function(res){ if(res.success==1){ that.stuList = res.data }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) } }, created: function(){ this.user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} this.xxjd = localStorage.getItem('xxjd') this.schoolid = this.user.ID this.Nickname = this.user.Nickname this.yhjs = this.user.UserFilter.urole this.getList() this.getStuList() this.getslectOption() }, computed:{ showStulist(){ if(!this.showallstu){ return this.stuList.slice(0,5) }else{ return this.stuList.slice(0) } } }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-zrl", function(resolve, reject){ var template = "
\n
\n
\n 上周\n 本周\n 下周\n
\n {{ todayDate }}\n
\n
\n \n {{ sta.title }}\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
    \n \n \n
    暂无数据
    \n
\n
\n
\n
\n \n\n \n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, props: { planList: { type: Array, default: [] }, //卡片状态 cardStatus: { type: Object, default: () => { return { 1: { title: '已过期', color: '#9CADADB7' }, 2: { title: '进行中', color: '#FF6200' }, 3: { title: '未开始', color: '#3291F8' }, } } }, //第一列是星期几 isFirstDayOfMondayOrSunday: { type: Number, default: 1, }, hasNumExpend:{ type:Number, default:2 } }, data () { return { weeks: [ '时段', '周一', '周二', '周三', '周四', '周五', '周六', '周日', ], todayDate: '', months: [], curDate: '', nowDate: new Date(), } }, watch: { isFirstDayOfMondayOrSunday: { handler (val) { if (val > 1) { let arr = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] const arr1 = arr.slice(val - 1) const arr2 = arr.slice(0, val - 1) this.weeks = ['时段', ...arr1, ...arr2] } }, immediate: true } }, mounted () { this.getCurWeek() }, methods: { //展开与缩放操作 handleExpand (row) { row.isExpend = !row.isExpend }, /** * 获取 时间 * @param time */ getWeek (time) { this.curDate = new Date(time) //当前是周几 const whichDay = time.getDay() let num = 0 if (this.isFirstDayOfMondayOrSunday <= whichDay) { num = this.isFirstDayOfMondayOrSunday } else { num = this.isFirstDayOfMondayOrSunday - 7 } const weekDay = time.getDay() - num time = this.addDate(time, weekDay * -1) for (let i = 0; i < 7; i++) { const { year, month, day } = formatDate(i === 0 ? time : this.addDate(time, 1)) this.months.push({ date: `${year}-${month}-${day}`, showDate: `${month}-${day}`, timestamp: new Date(`${year}-${month}-${day}`).getTime() }) } this.months.sort((a, b) => a.timestamp - b.timestamp) delete this.months[0] this.todayDate = `${this.months[1].date} ~ ${this.months[this.months.length - 1].date}` }, /** * 处理日期 * @param date * @param n * @returns {*} */ addDate (date, n) { date.setDate(date.getDate() + n) return date }, /** * 上周 */ getLastWeek () { const date = this.addDate(this.curDate, -7), { year, month, day } = formatDate(date), dateObj = { date: `${year}-${month}-${day}`, timestamp: new Date(`${year}-${month}-${day}`).getTime() } this.dealDate(date) this.$emit('changeWeek', dateObj) }, /** * 本周 */ getCurWeek () { const { year, month, day } = formatDate(new Date()), dateObj = { date: `${year}-${month}-${day}`, timestamp: new Date(`${year}-${month}-${day}`).getTime() } this.dealDate(new Date()) this.$emit('changeWeek', dateObj) }, /** * 下周 */ getNextWeek () { const date = this.addDate(this.curDate, 7), { year, month, day } = formatDate(date), dateObj = { date: `${year}-${month}-${day}`, timestamp: new Date(`${year}-${month}-${day}`).getTime() } this.dealDate(date) this.$emit('changeWeek', dateObj) }, /** * 显示当天日期状态 * @param date */ dealDate (date) { this.months = [''] this.getWeek(date) const curDate = getCurDay() this.months.forEach(item => { item.isCurDate = item.date === curDate }) }, /** * 点击卡片子内容查看详情 * @param row */ handleDetail (row) { this.$emit('handleDetail', row) }, /** * 点击卡片查看全部内容 * @param month * @param period */ handleCardDetail (month, period) { this.$emit('handleCardDetail', { ...month, ...period }) } } }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDshijianyuyue-view", function(resolve, reject){ var template = "
\n \n \n \n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, name: 'App', data() { /** * 获取当天时间 * @returns {string} */ function getCurDay(num = 0) { var datetime = new Date(); var year = datetime.getFullYear(); var month = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1; let day = datetime.getDate() if ((day + num) > 0) { day = (day + num) < 10 ? "0" + (datetime.getDate() + num) : datetime.getDate() + num; } else { day = (day - num) < 10 ? "0" + (datetime.getDate() - num) : datetime.getDate() - num; } return `${year}-${month}-${day}` } return { timePeriodList: [ { timePeriod: '8:00~10:00', schedule: [ { isExpend: false, [getCurDay()]: [ { timePeriod: '8:00~10:00', date: getCurDay(), course: '大学英语', watchman: '井底的蜗牛', place: '测试地点', status: 1, }, { timePeriod: '8:00~10:00', date: getCurDay(), course: '大学英语', watchman: '井底的蜗牛', place: '测试地点', status: 2, }, { timePeriod: '8:00~10:00', date: getCurDay(), course: '大学英语', watchman: '井底的蜗牛', place: '测试地点', status: 3, }, ], }, { isExpend: false, [getCurDay(-1)]: [ { id: 1, timePeriod: '8:00~10:00', date: getCurDay(-1), course: '大学英语', watchman: '井底的蜗牛', place: '测试地点', status: 1, }, ] } ] }, { timePeriod: '12:00~14:00', schedule: [ { isExpend: false, [getCurDay()]: [ { timePeriod: '12:00~14:00', date: getCurDay(), course: '大学英语', watchman: '井底的蜗牛', place: '测试地点', status: 2, }, { timePeriod: '12:00~14:00', date: getCurDay(), course: '大学英语', watchman: '井底的蜗牛', place: '测试地点', status: 3, }, ], }, { isExpend: false, [getCurDay(-1)]: [ { timePeriod: '12:00~14:00', date: getCurDay(-1), course: '大学英语', watchman: '井底的蜗牛', place: '测试地点', status: 1, }, { timePeriod: '实验室1', date: getCurDay(-1), course: '大学英语', watchman: '井底的蜗牛', place: '测试地点', status: 1, }, { timePeriod: '实验室1', date: getCurDay(-1), course: '大学英语', watchman: '井底的蜗牛', place: '测试地点', status: 1, }, ] } ] }, { timePeriod: '14:00~16:00', schedule: [] }, ], } }, methods: { /** * 点击详情 * @param row */ handleDetail(row){ console.log(row) }, /** * 点击卡片查看全部内容 */ handleCardDetail(row) { console.log(row) }, /** * 切换周 * @param date */ changeWeek(date){ console.log(date) } }, }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftzsls-view", function(resolve, reject){ var template = "
\n
\n
\n\n\n
\n
\n
\n
\n
\n \n
\n
\n
\n 安全防范实训指导证书\n
\n
\n 来源:普通考试 | 签发日期:2023-来源:普通考试 | 签发日期:2023-\n
\n\n\n
\n
\n
\n
\n 打印\n
\n
\n 下载\n
\n
\n 查看\n
\n
\n
\n\n\n\n
\n
\n\n
\n\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid() }; }, methods: { getImgsrc(val) { return "/content/image/xljkImg/"+val }, }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftyysz-view", function(resolve, reject){ var template = "
\n
\n \n \n \n \n \n\n \n \n 星期一\n 星期二\n 星期三\n 星期四\n 星期五\n 星期六\n 星期日\n \n \n\n \n \n 00:00 - 02:00\n 02:00 - 04:00\n 04:00 - 06:00\n 06:00 - 08:00\n 08:00 - 10:00\n 10:00 - 12:00\n 12:00 - 14:00\n 14:00 - 16:00\n 16:00 - 18:00\n 18:00 - 20:00\n 20:00 - 22:00\n 22:00 - 00:00\n \n \n\n \n \n \n \n 确定\n 取消\n \n \n\n
\n\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dateRange: [], // 存储开始时间和结束时间的数组 selectedDay: [], // 存储选择的星期的数组 selectedTimeSlot: 1, // 存储选择的时间段 richText: '' // 存储富文本内容 }; }, methods: { onSubmit() { console.log('submit!'); }, getImgsrc(val) { return "/content/image/xljkImg/"+val }, toggleDay(day) { if (this.isSelectedDay(day)) { // 如果已经选中,则移除 const index = this.selectedDay.indexOf(day); if (index !== -1) { this.selectedDay.splice(index, 1); } } else { // 如果未选中,则添加 this.selectedDay.push(day); } }, isSelectedDay(day) { return this.selectedDay.includes(day); }, pickerOptions() { return { shortcuts: [{ text: '今天', onClick(picker) { const start = new Date(); const end = new Date(); end.setTime(start.getTime()); picker.$emit('pick', [start, end]); } }, { text: '昨天至今天', onClick(picker) { const end = new Date(); const start = new Date(); start.setTime(end.getTime() - 3600 * 1000 * 24); picker.$emit('pick', [start, end]); } }, { text: '最近一周', onClick(picker) { const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); picker.$emit('pick', [start, end]); } }] }; } }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDjinduduchaDialog", function(resolve, reject){ var template = "
\n \n
\n
\n 菜单\n 查看学生\n 查看教师\n 刷新数据\n 测评同意书\n 测评同意书二维码\n\n\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dialogVisible: false, tableData: [{ date: '2016-05-03', name: '王小虎', address: '上海市普陀区金沙江路 1518 弄', done: 50, total:150 }, { date: '2016-05-02', name: '王小虎', address: '上海市普陀区金沙江路 1518 弄', done: 150, total:150 }, { date: '2016-05-04', name: '王小虎', address: '上海市普陀区金沙江路 1518 弄', done: 50, total:150 }, { date: '2016-05-01', name: '王小虎', address: '上海市普陀区金沙江路 1518 弄', done: 50, total:150 }, { date: '2016-05-08', name: '王小虎', address: '上海市普陀区金沙江路 1518 弄', done: 50, total:150 }, { date: '2016-05-06', name: '王小虎', address: '上海市普陀区金沙江路 1518 弄', done: 50, total:150 }, { date: '2016-05-07', name: '王小虎', address: '上海市普陀区金沙江路 1518 弄', done: 50, total:150 }], multipleSelection: [], currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4}; }, methods: { show(){ this.dialogVisible = true }, handleSizeChange(val) { console.log(`每页 ${val} 条`); }, handleCurrentChange(val) { console.log(`当前页: ${val}`); }, handleClick(){}, handleClose(){ this.dialogVisible = false }, toggleSelection(rows) { if (rows) { rows.forEach(row => { this.$refs.multipleTable.toggleRowSelection(row); }); } else { this.$refs.multipleTable.clearSelection(); } }, handleSelectionChange(val) { this.multipleSelection = val; } }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftyyxg-view", function(resolve, reject){ var template = "
\n
\n
\n
\n
\n 开始时间:\n
\n
\n 2024.09.03\n
\n
\n
\n
\n 结束时间:\n
\n
\n 2024.09.09\n
\n
\n
\n
\n 选择星期:\n
\n
\n 星期一、星期二、星期三\n
\n
\n
\n
\n 选择时段:\n
\n
\n 08:00-08:40\n
\n
\n
\n
\n 访谈地址:\n
\n
\n 教学楼902室\n
\n
\n\n
\n 修改\n
\n\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid() }; }, methods: { }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftgtt-view", function(resolve, reject){ var template = "
\n
\n
\n 我的\n
\n 查看更多 \n
\n
\n
\n \n \n \n
\n
\n 非危急\n 危急\n 高危\n
\n
\n
\n
\n
时间
\n
\n 星期{{ weekList[index + 1] }}\n \n

{{ item.date }}

\n
\n
\n \n
\n \n
\n
\n {{ item.time }}\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n
\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), weekList: '日一二三四五六日', day: '', // 选中日期 sunday: '', // 选中周的周日 scheduleList: [] }; }, methods: { getSchedule() { try { const _endDate = moment(this.day).endOf('week').format('YYYY-MM-DD') console.log('日期选中的日期范围,用于请求选中周日程' + this.day + ',' + _endDate) const _scheduleList = [] for (let i = 0; i < 7; i++) { const _targetDay = moment(this.day).add(i, 'days').format('YYYY-MM-DD') const _schedule = { date: _targetDay, list: [ { id: 1, name: '李豆豆', stuNo: '11073912128', collageName: '北京师范大学', address: '北师大心理学部1318A', headTeacher: '任伟军', interviewType: '线下访谈', interviewAddress: '教4-309教室', className: '307', grade: '3', time: '9:00-10:30', level: 1 }, { id: 2, name: '李豆', stuNo: '11073912128', collageName: '北京师范大学', address: '北师大心理学部1318A', headTeacher: '任伟军', interviewType: '线下访谈', interviewAddress: '教4-309教室', className: '307', grade: '3', time: '10:30-12:00', level: 2 }, { id: 3, name: '李豆', stuNo: '11073912128', collageName: '北京师范大学', address: '北师大心理学部1318A', headTeacher: '任伟军', interviewType: '线下访谈', interviewAddress: '教4-309教室', className: '307', grade: '3', time: '14:00-15:30', level: 3 }, { id: 4, name: '', stuNo: '', collageName: '', address: '', headTeacher: '', interviewType: '', interviewAddress: '', className: '', grade: '', time: '14:00-15:30' } ] } _scheduleList.push(_schedule) } this.scheduleList = _scheduleList } catch (e) { console.error(e) } }, getLevelClass(item) { switch (item.level) { case 1: return 'not-risk' case 2: return 'normal-risk' case 3: return 'high-risk' default: return '' } }, handleWeek(type) { switch (type) { case 'pre': this.day = moment(this.day).subtract(1, 'weeks').format('YYYY-MM-DD') break case 'next': this.day = moment(this.day).add(1, 'weeks').format('YYYY-MM-DD') break } // 获取选中周次的日程list this.getSchedule() } }, created: function(){ }, mounted: function(){ this.day = moment().startOf('week').format('YYYY-MM-DD') this.getSchedule() }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDxuexiaoxxDialog-view", function(resolve, reject){ var template = "
\n \n\n
\n
\n
\n 学校信息上报\n
\n
\n
\n
\n \n \n

\n 1\n

\n
\n

\n 学校基本信息\n

\n
\n
\n
\n \n \n

\n 2\n

\n
\n 班级信息\n
\n
\n
\n \n \n

\n 3\n

\n
\n 学校施测环境信息\n
\n \n \n
\n
\n
\n
\n \n \n

\n 1\n

\n
\n

\n 学校基本信息\n

\n
\n \n
\n
\n \n \n

\n 2\n

\n
\n 专业班级人数\n
\n
\n
\n \n \n

\n 3\n

\n
\t\n 心理教师信息\n
\n
\n
\n \n \n

\n 4\n

\n
\n 学校施测环境信息\n
\n
\n
\n \n \n \n

*学校阶段

\n \n \n \n \n \n \n \n \n \n \n
\n \n

*省份名称

\n \n \n \n
\n \n

*地级市名称

\n \n \n \n
\n \n \n

*区县名称

\n \n \n \n
\n \n

*学校名称

\n \n \n \n
\n\n\n \n\n \n

*主管单位

\n \n \n \n \n \n \n
\n\n \n

*学制

\n \n \n \n \n \n
\n \n

培养层次

\n \n\n \n \n \n \n \n \n
\n \n

*办学性质

\n \n \n \n \n \n \n
\n \n

*办学类型

\n \n \n \n \n \n \n \n \n
\n\n \n

*举办者类型

\n \n \n \n \n \n \n \n \n
\n \n

学校类型

\n \n \n \n
\n \n\n \n

*学校详细地址

\n \n \n \n
\n \n

*举办者类型

\n \n \n \n \n \n
\n
\n \n \n

*学校负责人(分管学生德育和心理健康工作的副校长或中层领导)

\n \n \n \n
\n \n

*学校地理位置

\n \n \n \n \n \n
\n \n

*全校心理健康教师数量

\n \n \n \n
\n \n

*学制

\n \n \n \n \n \n
\n \n
\n \n
\n
\n \n 下 一 步\n 下 一 步\n
\n
\n
\n \n \n \n \n \n \n \n
\n
\n \n
\n \n \n \n

*院系名称

\n \n \n \n
\n \n

*专业名称

\n \n \n \n
\n \n\n\n\n
\n
\n
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), totalstep:4, done:0, Roles:[], xxwzList:['城市','县城','农村'], xzList:['五四制','六三制'], jbzlxList:['中央教育部门','省级教育部门','民办'], disableStatus:'', xxjd:'', options: [], value: [], list: [], loading: false, idEdit:false, states: [], isFirst:true, dialogVisible: false, tableData: [], multipleSelection: [], currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4, innerVisible:false, classList:[], total:0, pages:{ pageno:1, pagesize:5 }, step:1, gjstep:1, zyForm:{ zybm:'', zymc:'', yxmc:'', zzone:0, zztwo:0, zzthree:0, gzone:0, gztwo:0, gzthree:0, bkone:0, bktwo:0, bkthree:0, bkfour:0, bkfive:0, ssone:0, sstwo:0, ssthree:0, bsone:0, bstwo:0, bsthree:0, bsfour:0, }, reruleForm: { sfmc:'', qxmc:'', djsmc:'', xxmc:'', xxbm:'', zgdwbm:'', xxjd:'', xz:'', bxxz:'', // sckssj:'', // scjssj:'', xxwz:'', bxlx:'', jbzlx:'', pycc:[], jbzlx:'', xxlx:'', qybm:'', xxxljkfzrxm:'', //issdf:undefined,issmcyyy:undefined, wxzh:'', zzxlcnt:0, zxzzcnt:0, jygzinfo:'', wjgyinfo:'', xlpxinfo:'', xxForm:{ xfour:0, xfive:0, xsix:0 }, czForm:{ cone:0, ctwo:0, cthree:0, cfour:0 }, gForm:{ gone:0, gtwo:0, gthree:0 }, /*zzForm :{ zzone:0, zztwo:0, zzthree:0, }, gzForm :{ gzone:0, gztwo:0, gzthree:0, }, bkForm : { bkone:0, bktwo:0, bkthree:0, bkfour:0, bkfive:0, }, ssForm : { ssone:0, sstwo:0, ssthree:0, }, bsForm :{ bsone:0, bstwo:0, bsthree:0, bsfour:0, }*/ }, ruleForm: { jzxlcnt:'', xxwz:'', zzxlcnt:'', xz:'', jbzlx:'', sfmc:'', qxmc:'', djsmc:'', xxmc:'', xxbm:'', zgdwbm:'', xd:'', xz:'', bxxz:'', //sckssj:'', //scjssj:'', xxwz:'', bxlx:'', jbzlx:'', pycc:[], jbzlx:'', xxlx:'', //issdf:undefined,issmcy:undefined, wxzh:'', zzxlcnt:0, zxzzcnt:0, jygzinfo:'', wjgyinfo:'', xlpxinfo:'', qybm:'', xxForm:{ xfour:0, xfive:0, xsix:0 }, czForm:{ cone:0, ctwo:0, cthree:0, cfour:0 }, gForm:{ gone:0, gtwo:0, gthree:0 }, /*zzForm :{ zzone:0, zztwo:0, zzthree:0, }, gzForm :{ gzone:0, gztwo:0, gzthree:0, }, bkForm : { bkone:0, bktwo:0, bkthree:0, bkfour:0, bkfive:0, }, ssForm : { ssone:0, sstwo:0, ssthree:0, }, bsForm :{ bsone:0, bstwo:0, bsthree:0, bsfour:0, }*/ }, xxxzOption:[ { value:'1', label:'三年制', usefor:['2','3','4','5'] }, { value:'2', label:'四年制', usefor:['2'] }, { value:'3', label:'五年制', usefor:['1','5'] }, { value:'4', label:'六年制', usefor:['1'] }, { value:'5', label:'九年一贯制', usefor:['2'] }, { value:'6', label:'十二年一贯制', usefor:['3'] }, { value:'7', label:'初高中一贯制', usefor:['3'] }, ], zyrules: { sfmc: [ { required: true, message: '请输入省份姓名', trigger: 'blur' } ], }, rules: { sfmc: [ { required: true, message: '请输入省份姓名', trigger: 'blur' } ], qxmc: [ { required: true, message: '请输入区县名称', trigger: 'blur' } ], djsmc: [ { required: true, message: '请输入地级市名称', trigger: 'blur' } ], xxmc: [ { required: true, message: '请输入学校名称', trigger: 'blur' } ], xxbm: [ { required: true, message: '请输入学校编号', trigger: 'blur' } ], zgdw: [ { required: true, message: '请选择主管单位', trigger: 'blur' } ], xd: [ { required: true, message: '请选择学校阶段', trigger: 'blur' } ], dlwz: [ { required: true, message: '请选择地理位置', trigger: 'blur' } ], jzxlcnt: [ { required: true, message: '请输入全校心理健康教师数量', trigger: 'blur' } ], jzxlcnt: [ { required: true, message: '请输入全校心理健康教师数量', trigger: 'blur' } ], xxxz: [ { required: true, message: '请选择学校性质', trigger: 'blur' } ], xxxljkfzrxm: [ { required: true, message: '请选择学校负责人', trigger: 'blur' } ], xz: [ { required: true, message: '请选择学制', trigger: 'blur' } ], bxxz: [ { required: true, message: '请选择办学性质', trigger: 'blur' } ], /* sckssj: [ { required: true, message: '选择施测开始时间', trigger: 'blur' } ], scjssj: [ { required: true, message: '选择施测结束时间', trigger: 'blur' } ],*/ xxwz: [ { required: true, message: '请输入学校地理位置', trigger: 'blur' } ], /* issmcyyy:[ { required: true, message: '请选择是否实名制参与试点校工作', trigger: 'blur' } ], issdf:[ { required: true, message: '请选择是否申请参与试点访谈', trigger: 'blur' } ],*/ }, isEdit:false } }, methods:{ getjindu(val){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID //xxid,pageno,pagesize const params = { xxid:schoolid, } $.get("/www/public/shangbao/cnt_sb_jd", params, function(res){ if(res.success==1){ var num = res.data.xxcnt+1 if(num>=val){ if(['1','2','3','4'].includes(that.xxjd)){ that.gjstep=0 that.step = val }else{ that.step=0 that.gjstep = val } }else{ that.$message.warning('请先完成前面步骤信息上报') } }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, clicktab(val){ this.getjindu(val) }, preStep(){ if(['1','2','3','4'].includes(this.xxjd)){ this.gjstep=0 this.step-- }else{ this.step=0 this.gjstep-- } }, nextStep(){ if(['1','2','3','4'].includes(this.xxjd)){ this.gjstep=0 this.step++ }else{ this.step=0 this.gjstep++ } }, beforeClose(){ this.$refs.baseDialog2.close() }, getList(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID //xxid,pageno,pagesize const params = { xxid:schoolid, ...this.pages } $.get("/www/public/shangbao/get_zy_info", params, function(res){ if(res.success==1){ that.tableData = res.data that.total = res.total }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, handlexdChange(val){ this.ruleForm.sfmc = '' this.ruleForm.djsmc = '' this.ruleForm.xxwz = '' this.ruleForm.xxlx = '' this.ruleForm.bxxz = '' this.ruleForm.jbzlx = '' this.ruleForm.xz = '' }, getDetail(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { xxid:schoolid, } $.get("/www/public/shangbao/get_school_info", params, function(res){ if(res.success==1){ that.ruleForm = res.data that.disableStatus=res.data.shzt that.ruleForm.xxForm = {...that.reruleForm.xxForm} that.ruleForm.czForm = {...that.reruleForm.czForm} that.ruleForm.gForm = {...that.reruleForm.gForm} that.ruleForm.zzForm = {...that.reruleForm.zzForm} that.ruleForm.gzForm = {...that.reruleForm.gzForm} that.ruleForm.bkForm = {...that.reruleForm.bkForm} that.ruleForm.ssForm = {...that.reruleForm.ssForm} that.ruleForm.bsForm = {...that.reruleForm.bsForm} /*that.options = [{ mc:that.ruleForm.zgdwmc, id:that.ruleForm.zgdwbm }]*/ if(res.data.xd){ that.isFirst = false if(res.data.xd=='1'){ that.ruleForm.xxForm = { xfour:res.data.xfour, xfive:res.data.xfive, xsix:res.data.xsix, } }else if(res.data.xd=='2'){ that.ruleForm.czForm = { cone:res.data.cone, ctwo:res.data.ctwo, cthree:res.data.cthree, } }else if(res.data.xd=='3'){ that.ruleForm.gForm = { gone:res.data.gone, gtwo:res.data.gtwo, gthree:res.data.gthree, } }else if(res.data.xd=='4'){ that.ruleForm.zzForm = { zzone:res.data.zzone, zztwo:res.data.zztwo, zzthree:res.data.zzthree, } }else if(res.data.xd=='5'){ that.ruleForm.gzForm = { gzone:res.data.gzone, gztwo:res.data.gztwo, gzthree:res.data.gzthree, } }else if(res.data.xd=='6'){ if(res.data.pycc){ that.ruleForm.pycc = res.data.pycc.split(',') } that.ruleForm.bkForm = { bkone:res.data.bkone, bktwo:res.data.bktwo, bkthree:res.data.bkthree, bkfour:res.data.bkfour, bkfive:res.data.bkfive, } that.ruleForm.ssForm = { ssone:res.data.ssone, sstwo:res.data.sstwo, ssthree:res.data.ssthree, } that.ruleForm.bsForm = { bsone:res.data.bsone, bstwo:res.data.bstwo, bsthree:res.data.bsthree, bsfour:res.data.bsfour, } } } }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{ console.log(xhr,status,error) this.$message.error('请求错误') }) }, download(){ var that = this var xxjd = localStorage.getItem('xxjd') //1zz 2gz 3gx var type if(xxjd=='4'){ type = '1' }else if(xxjd=='5'){ type = '2' }else if(xxjd=='6'){ type = '3' } const params = { type, } axios({ method: 'get', url: '/www/public/shangbao/download_zy_mb', params, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ console.log(res,'res') let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', '专业导入模版.xls'); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('下载成功') }else{ this.$message.error('下载失败') } }) }, del(row){ var that = this let params = {} if(row.id){ params = { ids:JSON.stringify([row.id]), } }else if(that.multipleSelection.length){ params.ids = [] console.log( that.multipleSelection,' that.multipleSelection') that.multipleSelection.forEach(item=>{ params.ids.push(item.id) }) params.ids = JSON.stringify(params.ids) console.log( params,' params') }else{ that.$message.warning('请先选择数据') } $.get("/www/public/shangbao/del_zy_info", params, function(res){ if(res.success==1){ that.$message.success('删除成功') that.getList() }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{ that.$message.success('请求错误') }) }, handleEdit(row){ this.zyForm = {} this.zyForm = {...row} this.isEdit = true this.$refs.baseDialog2xx.show() }, customUpload(params) { var that = this var xxjd = localStorage.getItem('xxjd') var importType if(xxjd=='4'){ importType = '1' }else if(xxjd=='5'){ importType = '2' }else if(xxjd=='6'){ importType = '3' } that.loading = true // params是一个对象,包含了file和fileList, // 但是这个params参数可能每个版本不一样值就不一样,到时候自己打印看看, // 反正file的值就是原始的File对象 // 如果extraParams是个单独的值,直接加入 var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const formData = new FormData() console.log(params.file,'params.file') formData.append('file', params.file) // 这是file入参,文件信息 formData.append('xxid', schoolid) formData.append('type', importType) // 如果extraParams是个对象,循环加入formData /*for (const key in this.extraParams) { formData.append(key, this.extraParams[key]) } */ // 调接口 axios.post('/www/public/shangbao/import_zy_info', formData, { headers: { 'Content-Type': 'multipart/form-data' } }) .then(({data}) => { if(data&&data.success==1){ that.$message.success('导入成功') that.loading = false that.getList() }else{ that.loading = false that.$message.error(data.message) } }) .catch(error => { that.loading = false console.error(error); }); }, closeDialog(){ // if(this.tableData.length==0){ this.$message.warning('上报未完成') return } this.$refs.baseDialog2.close() this.$emit('closeDialog') }, closeDialog1(){ this.$refs.baseDialog2xx.close() }, confirm(){ this.$refs.baseDialog2xx.close() }, remoteMethod(val) { var that = this const params = { } $.get("/www/public/shangbao/findsjbmlist", params, function(res){ if(res.success==1){ that.options = res.data }else{ that.$message.error(res.message) } }).fail((xhr,status,error)=>{ that.$message.error('请求错误') }) }, submit(val){ // var that = this this.$refs.ruleForm.validate((valid) => { if (valid) { var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID var result = that.options.find(item=>item.id==that.ruleForm.zgdwbm) let params = { xxbm:that.ruleForm.xxbm, zgdwbm:that.ruleForm.zgdwbm, zgdwmc:result.mc, // sckssj:that.ruleForm.sckssj, // scjssj:that.ruleForm.scjssj, bxlx:that.ruleForm.bxlx, jbzlx:that.ruleForm.jbzlx, xd:that.ruleForm.xd, //issmcyyy:that.ruleForm.issmcyyy, qybm:that.ruleForm.qybm, sfmc:that.ruleForm.sfmc, djsmc:that.ruleForm.djsmc, jzxlcnt:that.ruleForm.jzxlcnt, dlwz:that.ruleForm.dlwz } /* if(that.ruleForm.issdf){ params.issdf = that.ruleForm.issdf }*/ if(val&&val==1){ params.wxzh = that.ruleForm.wxzh params.zzxlcnt = that.ruleForm.zzxlcnt params.zxzzcnt = that.ruleForm.zxzzcnt params.jygzinfo = that.ruleForm.jygzinfo params.wjgyinfo = that.ruleForm.wjgyinfo params.xlpxinfo = that.ruleForm.xlpxinfo } if(that.ruleForm.xd=='1'){ params = {...params, id:schoolid,...that.ruleForm.xxForm,qxmc:that.ruleForm.qxmc,xxwz:that.ruleForm.xxwz,bxxz:that.ruleForm.bxxz,xz:that.ruleForm.xz,} }else if(that.ruleForm.xd=='2'){ params = {...params, id:schoolid,...that.ruleForm.czForm,qxmc:that.ruleForm.qxmc,xxwz:that.ruleForm.xxwz,bxxz:that.ruleForm.bxxz,xz:that.ruleForm.xz,} }else if(that.ruleForm.xd=='3'){ params = {...params, id:schoolid,...that.ruleForm.gForm,qxmc:that.ruleForm.qxmc,xxwz:that.ruleForm.xxwz,bxxz:that.ruleForm.bxxz,xz:that.ruleForm.xz,} }else if(that.ruleForm.xd=='4'){ params = {...params, id:schoolid, qxmc:that.ruleForm.qxmc,xxwz:that.ruleForm.xxwz,jbzlx:that.ruleForm.jbzlx,xz:that.ruleForm.xz,xxlx:that.ruleForm.xxlx, } }else if(that.ruleForm.xd=='5'){ params = {...params, id:schoolid, xxlx:that.ruleForm.xxlx,bxxz:that.ruleForm.bxxz, } }else if(that.ruleForm.xd=='6'){ params = {...params, id:schoolid, pycc:that.ruleForm.pycc.toString(), } } console.log(params,'params') $.get("/www/public/shangbao/edit_school_info", params, function(res){ if(res.success==1){ //val&&val==1 是从第二步过来的 //val!=1 是从第一步过来的 that.nextStep() }else{ that.$message.error(res.message) } }).fail((xhr,status,error)=>{ that.$message.error('请求错误') }) } else { that.$message.warning('信息校验未正确填写或填写内容不全') console.log('error submit!!'); return false; } const dataxlj={ xm:that.ruleForm.xxxljkfzrxm, lsid:that.ruleForm.xxxljkfzrid, xxid:schoolid, } if(that.ruleForm.xd=='1'||that.ruleForm.xd=='2'||that.ruleForm.xd=='3'||that.ruleForm.xd=='4'){ $.post("/www/public/shangbao/addxljkfzr", dataxlj, function(res){ if(res.success==1){ }else{ that.$message.error(res.message) } }) } }); }, zysubmit(){ var that = this this.$refs['zyForm'].validate((valid) => { if (valid) { const params = { zybm:that.zyForm.zybm, zymc:that.zyForm.zymc, yxmc:that.zyForm.yxmc, zzone:that.zyForm.zzone||undefined, zztwo:that.zyForm.zztwo||undefined, zzthree:that.zyForm.zzthree||undefined, gzone:that.zyForm.gzone||undefined, gztwo:that.zyForm.gztwo||undefined, gzthree:that.zyForm.gzthree||undefined, bkone:that.zyForm.bkone||undefined, bktwo:that.zyForm.bktwo||undefined, bkthree:that.zyForm.bkthree||undefined, bkfour:that.zyForm.bkfour||undefined, bkfive:that.zyForm.bkfive||undefined, ssone:that.zyForm.ssone||undefined, sstwo:that.zyForm.sstwo||undefined, ssthree:that.zyForm.ssthree||undefined, bsone:that.zyForm.bsone||undefined, bstwo:that.zyForm.bstwo||undefined, bsthree:that.zyForm.bsthree||undefined, bsfour:that.zyForm.bsfour||undefined, id:that.zyForm.id } $.post("/www/public/shangbao/edit_zy_info", params, function(res){ if(res.success==1){ that.$message.success(res.message) that.$refs.baseDialog2xx.close() that.getList() }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{ that.$message.error('请求错误') }) } else { console.log('error submit!!'); return false; } }); }, onError(){}, show(){ var that = this this.$refs.baseDialog2.show() this.$nextTick(()=>{ that.getDetail() that.$refs.ruleForm.resetFields() }) }, handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pagesize = val this.getList() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pageno = val this.getList() }, handleClick(){}, handleClose(){ console.log(1) this.dialogVisible = false }, handleSelectionChange(val) { console.log(val,'val') this.multipleSelection = val; }, getClass(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { schoolid } $.get("/www/public/shangbao/findschoolbj", params, function(res){ if(res.success==1){ that.classList = res.data }else{ this.$message.error(res.message) } }).fail((xhr,status,error)=>{ this.$message.error('请求错误') }) }, }, computed:{ isXCG(){ if(['1','2','3'].indexOf(this.ruleForm.xd)!=-1){ return true } return false }, noshowClose(){ var noshow if(this.step==1){ noshow = true }else if(this.step==2){ noshow = false }else{ noshow = false } } }, watch:{ "ruleForm.xd"(val){ /*this.ruleForm.sfmc = '' this.ruleForm.djsmc = '' this.ruleForm.xxwz = '' this.ruleForm.xxlx = '' this.ruleForm.bxxz = '' this.ruleForm.jbzlx = '' this.ruleForm.xz = ''*/ if(val=='1'){ }else{ } } }, created: function(){ this.xxjd = localStorage.getItem('xxjd') this.getDetail() this.remoteMethod() var done = Number(this.$route.query.done) this.shzt = this.$route.query.shzt if(['1','2','3','4'].includes(this.xxjd)){ this.totalstep = 3 if(done<3){ this.gjstep=0 this.step = done+1 } }else{ this.totalstep = 3 if(done<3){ this.step=0 this.gjstep = done+1 } } }, mounted: function(){ /*this.list = this.states.map(item => { return { value: `value:${item}`, label: `label:${item}` }; });*/ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDyuyue1-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n \n
\n
\n
\n
\n

\n 任伟军\n

\n 初级访谈\n
\n

\n 常见的轻中度抑郁症、焦虑症、疑病症、\n 恐惧症、强迫症心理疏导\n

\n
\n 立即预约\n
\n
\n
\n
\n \n

\n 电话:010-6660336\n

\n
\n
\n \n

\n 邮箱:9429233238@163.net\n

\n
\n
\n \n

\n 地址:北京师范大学哲学院\n

\n
\n
\n
\n\n
\n \n

\n 学校:哲学学院\n

\n
\n
\n \n

\n 区域:哲学院副院长\n

\n
\n
\n \n

\n 擅长:心理访谈\n

\n
\n
\n
\n\n
\n
\n\n\n
\n
\n
\n \n

\n 预约访谈\n

\n
\n\n\n\n\n
\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid() }; }, methods: { }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftkszb-view", function(resolve, reject){ var template = "
\n \n
\n
\n {{item.ksmc}}\n
\n
\n
\n 考试时间:{{item.kssj}}---{{item.jssj}}\n
\n
\n
\n
\n {{item.sjzts}}\n
\n
\n 总题数\n
\n\n
\n
\n
\n {{item.sjzfs}}\n
\n
\n 总分值(分)\n
\n\n
\n
\n
\n {{item.sjjgx}}\n
\n
\n 及格线(分)\n
\n\n
\n
\n
\n {{item.kssc}}\n
\n
\n 考试时长(分钟)\n
\n\n
\n
\n
\n 在开始答题前,请考生关注下列事项:\n
\n
\n
\n
\n 考试形式\n
\n
\n 本次考试包括单选题、多选题和判断题,所有题目均为客观题。\n
\n
\n
\n
\n
\n
\n 作答要求:\n
\n
\n

\n 单选题:选择一个最符合题意的选项。\n

\n

\n 多选题:选择所有符合题意的选项,注意可能有多个正确答案。\n

\n

\n 判断题:判断陈述是否正确,选择\"正确\"或“错误”\n

\n
\n
\n
\n
\n
\n
\n 时间管理:\n
\n
\n 合理分配答题时间,确保每一题都有足够的时间思考和作答。\n
\n
\n
\n
\n
\n
\n 审题仔细:\n
\n
\n 仔细阅读每道题目的要求,确保理解问题后再作答。\n
\n
\n
\n
\n
\n
\n 标记和修改:\n
\n
\n 如不确定某题的答案,可以先标记为“待确认\",完成其他题目后再回头修改。\n
\n
\n
\n
\n
\n
\n 检查答察:\n
\n
\n 考试结束前,务必检查所有题目和答案,确保没有遗漏或错误。\n
\n
\n
\n
\n
\n
\n 诚信考试:\n
\n
\n 严禁作弊,保持诚信,尊重考试规则。\n
\n
\n
\n
\n 下一步\n
\n
\n\n
\n\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), item:'' }; }, methods: { getImgsrc(val) { return "/content/image/xljkImg/"+val }, next(){ this.$router.push({ path: '/ftexamination', query: { item: JSON.stringify(this.item) } }); }, }, created: function(){ const that =this that.item = JSON.parse(this.$route.query.item || '{}'); }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-zrl1", function(resolve, reject){ var template = "
\n
\n\n
\n \n
\n
\n \n \n \n
\n
\n 非危急\n 危急\n 高危\n
\n
\n
\n \n
\n
时间
\n
\n 星期{{ weekList[index + 1] }}\n \n

{{ item.ftsj }}

\n
\n
\n \n \n
\n \n
\n
\n {{ item.kssj}}-{{item.jssj}}\n
\n
\n \n \n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), weekList: '日一二三四五六日', day: '', // 选中日期 sunday: '', // 选中周的周日 //scheduleList: [] }; }, methods: { getSchedule(val) { console.log(val,'val') /*try { const _endDate = moment(this.day).endOf('week').format('YYYY-MM-DD') console.log('日期选中的日期范围,用于请求选中周日程' + this.day + ',' + _endDate) const _scheduleList = [] for (let i = 0; i < 7; i++) { const _targetDay = moment(this.day).add(i, 'days').format('YYYY-MM-DD') const _schedule = { date: _targetDay, list: [ { id: 1, name: '李豆豆', stuNo: '11073912128', collageName: '北京师范大学', address: '北师大心理学部1318A', headTeacher: '任伟军', interviewType: '线下访谈', interviewAddress: '教4-309教室', className: '307', grade: '3', time: '9:00-10:30', level: 1 }, { id: 2, name: '李豆', stuNo: '11073912128', collageName: '北京师范大学', address: '北师大心理学部1318A', headTeacher: '任伟军', interviewType: '线下访谈', interviewAddress: '教4-309教室', className: '307', grade: '3', time: '10:30-12:00', level: 2 }, { id: 3, name: '李豆', stuNo: '11073912128', collageName: '北京师范大学', address: '北师大心理学部1318A', headTeacher: '任伟军', interviewType: '线下访谈', interviewAddress: '教4-309教室', className: '307', grade: '3', time: '14:00-15:30', level: 3 }, { id: 4, name: 'fdsafd', stuNo: 'fd', collageName: 'fd', address: 'dfas', headTeacher: 'dfsa', interviewType: 'dsf', interviewAddress: 'dfa', className: 'dsf', grade: 'dsaf', time: '14:00-15:30' } ] } _scheduleList.push(_schedule) } this.scheduleList = _scheduleList } catch (e) { console.error(e) }*/ this.$emit('getSchedule',this.day) }, getLevelClass(item) { switch (item.level) { case 1: return 'not-risk' case 2: return 'normal-risk' case 3: return 'high-risk' default: return '' } }, handleWeek(type) { switch (type) { case 'pre': this.day = moment(this.day).subtract(1, 'weeks').format('YYYY-MM-DD') break case 'next': this.day = moment(this.day).add(1, 'weeks').format('YYYY-MM-DD') break } // 获取选中周次的日程list this.getSchedule() } }, created: function(){ }, mounted: function(){ this.day = moment().startOf('week').format('YYYY-MM-DD') //this.getSchedule() }, props: ['title', 'data', 'config','Sjd','scheduleList','otherInfo'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-baseDialog", function(resolve, reject){ var template = "
\n \n
\n \n
\n \n 关闭\n 确 定\n \n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dialogVisible: false } }, methods: { show(){ this.dialogVisible = true }, close(){ this.dialogVisible = false }, handleClose(){ this.$emit('beforeClose') //this.dialogVisible = false }, confirm(){ this.$emit('confirm') } }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config','title','inner','reff','hidden','width','noshowClose','top','destroyonclose'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDjddc1-view", function(resolve, reject){ var template = "
\n \n
\n \n
\n
\n \n

\n 上报进度\n

\n

\n 上报进度,一目了然\n

\n
\n
\n \n

\n 测评进度\n

\n

\n 测评进度,一目了然\n

\n
\n \n\n
\n\n \n \n \n\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid() }; }, methods: { showJindu(type){ if(type==1){ this.$refs.XDStujingduDialog.show(type) }else if(type==2){ this.$refs.ftjinduDialog.show(type) }else{ this.$refs.sbjinduDialog.show(type) } } }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDStujingduDialog", function(resolve, reject){ var template = "
\n \n \n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dialogVisible: false, tableData: [], multipleSelection: [], currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4, innerVisible:false, activeName: 'first', paramspath:[], Roles:[], pages:{ pageNo:1, pageSize:5 }, total:0, ruleForm: { }, type:'',//1测评,2访谈 isEdit:false } }, methods:{ handleback(){ var len = this.paramspath.length if(len>1){ this.paramspath.pop() this.getList(this.paramspath[len-1]) }else{ return } }, handleRowClick(row){ console.log(row,'row') var len = this.paramspath.length this.getList({typec:Number(this.paramspath[len-1].typec)+1+'',username:row.username}) }, handleClick(tab, event) { console.log(tab, event); }, onError(){}, show(type){ this.type = type this.getList() this.$refs.baseDialog.show() }, getList(param){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var typec let params if(param){ params = { ...param } }else{ if(user.Roles.includes('220')){ typec='1' }else if(user.Roles.includes('310')){ typec='2' }else if(user.Roles.includes('410')){ typec='3' }else if(user.Roles.includes('450')){ typec='4' } params = { username:user.Username, typec } } var url if(that.activeName == 'first'){ url = "/www/public/selectschool/cpjd" }else{ url = "/www/public/selectschool/cpjd-xx" } if(this.type==1){ $.get(url, params, function(res){ if(res.success==1){ if(res&&res.data){ if(that.activeName == 'first'){ that.tableData = res.data.zsxx that.total = res.total }else{ that.tableData = res.data.zsxx that.total = res.total } var len = that.paramspath.length if(len!=0){ if(that.paramspath[len-1].typec!=params.typec){ that.paramspath.push(params) } }else{ that.paramspath.push(params) } } }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) } else if(this.type==3){ $.get("/www/public/selectschool/sbjd", params, function(res){ if(res.success==1){ if(that.activeName == 'first'){ that.tableData = res.data.xj that.total = res.total }else{ that.tableData = res.data.zsxx that.total = res.total } }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }else{ $.get("/www/public/selectschool/ftjd", params, function(res){ if(res.success==1){ that.tableData = res.data.xj }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) } }, handleConfirm(){ this.$refs.baseDialog.close() }, handleSizeChange(val) { console.log(`每页 ${val} 条`); }, handleCurrentChange(val) { console.log(`当前页: ${val}`); }, handleClick(){}, handleClose(){ console.log(1) this.dialogVisible = false }, toggleSelection(rows) { if (rows) { rows.forEach(row => { this.$refs.multipleTable.toggleRowSelection(row); }); } else { this.$refs.multipleTable.clearSelection(); } }, handleSelectionChange(val) { this.multipleSelection = val; } }, computed:{ }, watch:{ activeName(val){ this.paramspath = [] this.getList() } }, created: function(){ var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} this.Roles = user.Roles if(user.Roles.includes('450')){ this.activeName = 'second' } }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftxxkc-view", function(resolve, reject){ var template = "
\n \n \n
\n

\n 手机扫码跳转地址\n

\n
\n
\n
\n
\n \n
关闭
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n
\n
\n {{item.kcmc}}\n
\n
\n \n\n
\n
\n
\n {{item.pxzj}}\n
\n
\n {{item.kcjs}}\n
\n
\n 开始学习\n
\n
\n
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dataList:[], dialogVisible:false, qrcode:'' }; }, methods: { getQRcode(){ document.getElementById("qrcode").innerHTML = ''; let that = this new QRCode(document.getElementById("qrcode"), { width: '200',//宽 height: '200',//高 text: that.qrcode,//二维码内容 colorDark : "#000000", colorLight : "#ffffff", correctLevel : QRCode.CorrectLevel.H, }); }, goBack(){ this.$router.go(-1) }, dialog(item){ this.dialogVisible=true this.qrcode = item.kcdz console.log(this.qrcode) this.$nextTick(()=>{ this.getQRcode() }) let data = { kcid:item.id } $.post("/www/public/shouye/px_fty_tj_xxjd", data, function(res){ if(res.error==0){ }else{ that.$message({ type: "error", message: res.message }) } }) }, getList(){ const that =this let data = { } $.post("/www/public/shouye/px_ftlssy_xxkc_list", data, function(res){ if(res.error==0){ that.dataList = res.data.xslist }else{ that.$message({ type: "error", message: res.message }) } }) }, goStudy(item){ let data = { kcid:item.id } $.post("/www/public/shouye/px_fty_tj_xxjd", data, function(res){ if(res.error==0){ }else{ that.$message({ type: "error", message: res.message }) } }) window.open(item.kcdz) } }, created: function(){ }, mounted: function(){ const that =this that.getList() }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDyyft-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n
\n

\n \n 预约列表\n

\n 一键预约\n
\n\n
\n
\n
\n
\n \n
\n
\n {{item.xsmc}} \n
\n
\n
\n
\n 年级:{{item.nj}}\n
\n
\n 班级:{{item.bj}}\n
\n
\n 联系方式: {{item.xssjh}} \n
\n
\n 访谈老师: {{item.ftls}} \n
\n
\n 访谈时间: {{item.yysj}} \n
\n
\n 访谈地址: {{item.ftdz}} \n
\n
\n
\n
\n
\n \n

\n 暂无数据!\n

\n
\n
\n \n \n\n\n
\n
\n\n
\n\n\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), ftsj:new Date(), yyzt:'', pages:{ pagesize:9, pagenum:1, }, total:0, stuList:[], listData:[], user:null, currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4 }; }, methods: { getStuList(){ var that = this const params = { schoolid:this.schoolid, userid:this.schoolid, yhjs:JSON.stringify([this.yhjs]), ftzt:'1', ...this.pages } console.log(params,'params') $.post("/www/public/shouye/ft_ftyystu", params, function(res){ if(res.success==1){ that.stuList = res.data that.total = res.total }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, formatDate(date) { const year = date.getFullYear(); const month = (date.getMonth() + 1).toString().padStart(2, '0'); const day = date.getDate().toString().padStart(2, '0'); return `${year}-${month}-${day}`; }, handleDateChange(val){ console.log(val,'va;') this.getList() }, changeYyzt(val){ this.yyzt = val this.getList() }, getList(){ var that = this const params = { ftsj:this.formatDate(this.ftsj), yyzt:this.yyzt, ...this.pages, schoolid:this.schoolid } console.log(params,'params') $.post("/www/public/shouye/ft_ftyyls", params, function(res){ if(res.success==1){ that.listData = res.data }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, goyuyue(item){ this.$router.push({ path:"/XDyuyue", query:{ item:JSON.stringify(item) } }) }, handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pagesize = val this.getStuList() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pagenum = val this.getStuList() } }, created: function(){ this.user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} this.schoolid = this.user.ID this.Nickname = this.user.Nickname this.yhjs = this.user.UserFilter.urole this.getStuList() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDyuyue2-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n \n
\n
\n
\n
\n

\n {{item.name}}\n

\n 初级访谈\n
\n

\n 常见的轻中度抑郁症、焦虑症、疑病症、\n 恐惧症、强迫症心理疏导\n

\n
\n
\n
\n
\n
\n \n

\n 电话:{{item.phone}}\n

\n
\n
\n \n

\n 职务:{{item.zw}}\n

\n
\n \n\n
\n
\n\n
\n \n

\n 专业:{{item.zy}}\n

\n
\n
\n \n

\n 擅长:心理访谈\n

\n
\n
\n\n
\n\n
\n
\n\n\n
\n
\n
\n \n

\n 预约\n

\n
\n \n
\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), item:null, Sjd:[], paibanInfo:[], otherInfo:{} }; }, methods: { getWeekDays1(date) { const daysOfWeek = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']; let result = []; let startDate = new Date(date); let currentDayCode = startDate.getDay(); let i = 0; for (i = 0; i < 7; i++) { let dayCode = (currentDayCode + i) % 7; let newDate = new Date(startDate); newDate.setDate(startDate.getDate() - startDate.getDay() + dayCode); let year = newDate.getFullYear(); let month = String(newDate.getMonth() + 1).padStart(2, '0'); let day = String(newDate.getDate()).padStart(2, '0'); result.push({ date: `${year}-${month}-${day}`, mon: daysOfWeek[dayCode] }); } return result; }, getWeekDays() { const today = new Date(); const weekStart = today.getDate() - today.getDay(); // 获取本周开始的日期 const weekDates = []; for (let i = 0; i < 7; i++) { const day = new Date(today.getFullYear(), today.getMonth(), weekStart + i); const dateFormatted = day.toISOString().slice(0, 10); // 格式化为 YYYY-MM-DD const dayOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'][day.getDay()]; weekDates.push({ date: dateFormatted, dayOfWeek: dayOfWeek }); } return weekDates; } , formatDate(date) { const year = date.getFullYear(); const month = (date.getMonth() + 1).toString().padStart(2, '0'); const day = date.getDate().toString().padStart(2, '0'); return `${year}-${month}-${day}`; }, //排班信息 getpaiban(day){ var that = this const params = { userid:that.item.ftyid, time:day, status:'0' } console.log(params,'params') $.post("/www/public/shouye/ft_ftyyinfo", params, function(res){ if(res.success==1){ let date = new Date(day); var result = that.getWeekDays(date) console.log(result,'result') let data = res.data[0].ftsj that.paibanInfo = data.slice(4,11) that.otherInfo = res.data[0] }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, //访谈时间段 getsjd(){ var that = this const params = { userid:that.item.ftyid } console.log(params,'params') $.post("/www/public/shouye/ft_ftyysjd", params, function(res){ if(res.success==1){ that.Sjd = res.data }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) } }, created: function(){ if(this.$route.query.item){ this.item = JSON.parse(this.$route.query.item) console.log(this.item,'item') this.getsjd() this.getpaiban(this.formatDate(new Date())) } }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDftList-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n
\n 已通过\n
\n
\n 未通过\n
\n
\n 未审核\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n

\n {{item.name}}\n

\n 未审核\n 已通过\n 未通过\n
\n

\n\n

\n
\n 查看\n
\n
\n
\n
\n \n

\n 性别:{{item.sex}}\n

\n
\n \n
\n \n

\n 电话:{{item.phone}}\n

\n
\n
\n
\n\n
\n \n

\n 民族:{{item.mz}}\n

\n
\n
\n \n

\n 职务:{{item.zw}}\n

\n
\n
\n
\n\n
\n
\n\n
\n
\n \n

\n 暂无数据!\n

\n
\n \n \n
\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), ftsj:new Date(), yyzt:'', pages:{ pageSize:9, pageNum:1, }, listzt:'1', active:0, total:0, listData:[], user:null, currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4 }; }, methods: { changeYyzt(val,index){ this.listzt = val this.active = index this.getList() }, chakan(item){ if(item.ddztm=='0'||item.ddztm=='4'){ window.open(`https://xinlijc.bnu.edu.cn/www/dd/vue/spa/zxbm#/chakan?id=${item.id}&ddztm=${true}`) }else{ window.open(`https://xinlijc.bnu.edu.cn/www/dd/vue/spa/zxbm#/chakan?id=${item.id}`) } }, getList(val){ var that = this const params = { ztm:this.listzt, ...this.pages, } console.log(params,'params') $.post("/www/public/shouye/px_webftybm_listbygzdw", params, function(res){ if(res.success==1){ that.listData = res.data that.total = res.total }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pageSize = val this.getList() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pageNum = val this.getList() } }, created: function(){ this.getList() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftxslc-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n {{ item }}\n
\n
\n
\n
\n
\n\n
\n
\n 访谈须知\n
\n
\n
\n 使用腾讯会议进行线上心理访谈是一种便捷且高效的方式,它能够帮助心理咨询师与受访者跨越地理限制,进行面对面的交流和咨询。以下是使用腾讯会议进行线上心理访谈的详细说明:\n
\n\n\n
\n
\n\n
\n
\n 前期准备\n
\n
\n
\n
\n 1.软件安装与注册: \n
\n
\n
\n · 确保双方都已下载并安装腾讯会议软件,支持电脑端、手机端和小程序等多种方式。\n
\n
\n · 注册并登录账号,以便后续操作和会议记录。\n
\n
\n
\n \n
\n
\n
\n
\n 2.预约与安排:\n
\n
\n
\n · 与受访者协商确定访谈时间,并提前在腾讯会议中预约会议。\n
\n
\n · 设定会议密码,以确保会议的安全性。\n
\n
\n · 可以提前通过邮件、短信或社交软件等方式将会议ID和密码发送给受访者。\n
\n
\n
\n \n
\n
\n
\n
\n 3.环境准备:\n
\n
\n
\n · 心理咨询师需要选择一个安静、私密且网络信号良好的环境进行访谈。\n
\n
\n · 建议关闭不必要的通知和应用程序,以避免干扰。\n
\n
\n · 可以提前测试摄像头、麦克风和扬声器等设备,确保功能正常。\n
\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n 会议开始\n
\n
\n
\n
\n 1.登录与进入会议:\n
\n
\n
\n · 在约定的时间,心理咨询师和受访者分别登录腾讯会议,并输入会议ID和密码进入会议。\n
\n
\n · 可以选择开启摄像头和麦克风,以便进行视频和语音交流。\n
\n\n
\n
\n \n
\n
\n
\n
\n 2.设置与调整\n
\n
\n
\n · 可以根据需要调整摄像头角度和焦距,确保画面清晰。\n
\n
\n · 调整麦克风音量,确保声音清晰可辨。\n
\n
\n · 如果需要,可以开启屏幕共享功能,以便展示相关材料或进行演示。\n
\n\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n\n
\n
\n 访谈过程\n
\n
\n
\n
\n 1.建立信任关系:\n
\n
\n
\n · 在访谈开始时,心理咨询师可以通过简短的问候和自我介绍来建立与受访者的信任关系。\n
\n
\n · 可以询问受访者是否对访谈环境有任何不适或需要调整的地方。\n
\n\n
\n\n
\n
\n
\n 2.遵循访谈流程:\n
\n
\n
\n · 按照预定的访谈大纲或流程进行提问和讨论。\n
\n
\n · 注意倾听受访者的回答,并给予适当的反馈和回应。\n
\n
\n · 保持耐心和同理心,尊重受访者的感受和观点。\n
\n\n
\n\n
\n
\n
\n 3.记录与整理:\n
\n
\n
\n · 可以使用腾讯会议的录制功能来记录访谈过程(需确保符合相关法律法规和伦理要求)。\n
\n
\n · 访谈结束后,可以整理访谈记录,包括文字、图片和音频等资料。\n
\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n 结束与后续\n
\n
\n
\n
\n 1.结束访谈:\n
\n
\n
\n · 在访谈结束时,心理咨询师可以向受访者表达感谢,并简要总结访谈内容和发现。\n
\n
\n · 可以询问受访者对访谈过程的感受和建议。\n
\n\n
\n\n
\n
\n
\n 2.后续跟进:\n
\n
\n
\n · 根据需要,心理咨询师可以与受访者进行后续的跟进和反馈。\n
\n
\n · 可以将访谈结果和分析报告发送给受访者或相关方。\n
\n
\n\n
\n
\n
\n\n
\n
\n 注意事项\n
\n
\n
\n
\n 1.保护隐私:\n
\n
\n
\n · 在整个访谈过程中,应严格遵守相关法律法规和伦理要求,保护受访者的隐私和权益。\n
\n
\n · 未经受访者同意,不得将访谈内容泄露给第三方。\n
\n\n
\n\n
\n
\n
\n 2.技术保障:\n
\n
\n
\n · 在访谈前应进行充分的技术准备和测试,确保会议顺利进行。\n
\n
\n · 如遇技术问题或故障,应及时解决或调整会议安排。\n
\n
\n\n
\n
\n
\n 3.沟通与反馈:\n
\n
\n
\n · 在访谈过程中,应保持与受访者的良好沟通和互动。\n
\n
\n · 及时给予反馈和回应,以建立更加积极和有效的咨询关系。\n
\n
\n\n
\n\n
\n 下一步\n
\n\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), items: [ '访谈须知', '前期准备', '会议开始', '访谈过程', '结束与后续', '注意事项' ], selectedIndex: 0 }; }, methods: { selectItem(sectionId) { this.selectedIndex = this.items.indexOf(sectionId); const element = document.getElementById(sectionId); if (element) { element.scrollIntoView({ behavior: 'smooth' }); } }, next(){ this.$router.push('ftxslc2') } }, created: function(){ window.scrollTo(0, 0); }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftxslc2-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n {{ item }}\n
\n
\n
\n
\n
\n\n
\n
\n 腾讯会议云录制操作说明\n
\n
\n
\n
\n 1.进入会议: \n
\n
\n
\n · 首先,确保您已经登录腾讯会议并成功进入需要录制的会议。\n
\n\n
\n\n
\n
\n
\n 2.开启云录制:\n
\n
\n
\n · 在会议中,主持人或联席主持人可以点击底部的“录制”按钮。\n
\n
\n · 在弹出的选项中,选择“云录制”即可开始会议录制。开启后,底部的“录制”按钮会变为“结束录制”。\n
\n
\n
\n \n
\n
\n\n
\n
\n 3.录制控制:\n
\n
\n
\n · 当云录制开始后,主持人或联席主持人可以进行暂停、恢复或结束录制的操作。\n
\n
\n · 如果联席主持人开启录制,主持人撤销该联席主持人身份,录制状态不会受到影响,可继续录制。\n
\n
\n · 但如果主持人和联席主持人均退出会议,云录制会立即停止。\n
\n
\n
\n
\n
\n 4.暂停/结束云录制:\n
\n
\n
\n · ·开启录制后,工具栏【录制】变为【结束录制】。\n
\n
\n · 会中画面左上角展示录制状态,并附有“暂停录制”和“结束录制”的控制图标。\n
\n\n
\n
\n \n
\n
\n · 底部工具栏【结束录制】按钮右侧的三角图标,点击展开的菜单栏中增加【暂停录制】和【结束录制】功能。\n
\n
\n · 暂停录制:点击即可暂停当前录制,且按钮变为“恢复录制”。\n
\n
\n · 恢复录制:恢复录制状态。\n
\n
\n · 结束录制:结束并退出录制状态,并弹出提示框“录制文件将会在会议结束后通过消息中心发送给您”,选择“结束录制”即可。\n
\n
\n \n
\n
\n · 云录制结束后,会在云录制空间中生成以会议主题命名的文件,每场会议对应一个录制文件夹。\n
\n
\n · 若在一场会议中进行多次云录制,在该会议的云录制文件夹中生成对应的云录制文件。\n
\n
\n
\n
\n\n
\n
\n 云录制视频的存放地址\n
\n
\n
\n 腾讯会议云录制的视频存放在腾讯云服务器中,用户可以通过以下步骤查看和访问\n
\n
\n
\n 1.进入个人中心:\n
\n
\n\n
\n 在腾讯会议的主界面,找到并点击自己的头像或用户名,然后选择“个人中心”或类似选项。如果是通过网页版,可能需要点击顶部的“头像”或“用户名”,然后选择“我的录制”或“会议录制”。\n
\n
\n \n
\n
\n
\n
\n
\n 2.查看会议录制:\n
\n
\n\n
\n 在个人中心页面中,找到“会议录制”或“我的录制”等相关选项。点击进入后,您将看到所有已进行云录制的会议列表。\n
\n\n
\n
\n
\n
\n 3.访问云录制视频:\n
\n
\n\n
\n 在会议录制列表中,您可以浏览到所有云录制的视频。点击您想要查看的视频,系统将加载并播放该视频,或者提供下载选项(具体取决于腾讯会议的版本和设置)。\n
\n
\n \n
\n
\n
\n
\n
\n 4.下载或分享:\n
\n
\n\n
\n · 如果需要下载云录制视频,通常可以在视频播放页面找到下载按钮或链接。点击后,视频将被下载到您的本地设备。\n
\n
\n · 如果需要分享云录制视频,腾讯会议通常也提供了分享链接或二维码的选项,您可以将其发送给需要查看视频的人员。\n
\n \n
\n \n
\n
\n
\n
\n
\n\n
\n
\n 注意事项\n
\n
\n
\n
\n
\n · 权限问题:只有会议的主持人或联席主持人才有权限进行云录制,并且只有他们或经过授权的人员才能查看、下载和分享云录制视频。\n
\n
\n · 版本要求:确保您的腾讯会议客户端或网页版是最新版本,以便能够使用最新的功能和界面。\n
\n
\n · 存储空间:云录制视频会占用腾讯云服务器的存储空间,不同版本的腾讯会议可能对存储空间有不同的限制。请留意您的存储空间使用情况,并及时删除不再需要的录制文件。\n
\n
\n
\n
\n 下一步\n
\n\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), items: [ '腾讯会议云录制操作说明', '云录制视频的存放地址', '注意事项', ], selectedIndex: 0 }; }, methods: { selectItem(sectionId) { this.selectedIndex = this.items.indexOf(sectionId); const element = document.getElementById(sectionId); if (element) { element.scrollIntoView({ behavior: 'smooth' }); } }, next(){ this.$router.push('ftrsc') } }, created: function(){ window.scrollTo(0, 0); }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftrsc-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n \n
\n
\n
\n {{ item.xsmc }} \n
\n
\n
\n 学校:{{ item.xxmc }}\n
\n
\n 年级:{{item.xd==1?'小学':item.xd==2?'初中':item.xd==3?'高中':\n item.xd==4?'中职':\n item.xd==5?'高职':\n item.xd==7?'本科':\n item.xd==8?'硕士':\n item.xd==9?'博士':''}}{{ item.nj }}年级\n
\n
\n 学号:{{ item.xsxh }}\n
\n
\n 班级:{{ item.bj }}\n
\n
\n 联系方式:{{ item.xssjh }}\n
\n
\n\n
\n \n
\n 打开
腾讯会议\n
\n\n
\n\n\n
\n
\n\n
\n
\n 指导语 1\n
\n
\n 指导语 2\n
\n
\n 指导语 3\n
\n
\n
\n
\n 引导语:\n
\n
\n 这次让你过来,是想了解你最近过得怎么样,在生活和学习上有没有遇到什么困难,是否有什么是我们可以帮助到你的。老师和你聊聊天,聊的时候,你就根据你自己的实际情况和想法谈谈,不用担心说的好不好、对不对,我们这次聊天的内容也不会被其他同学知道。如果聊天过程中,你不想聊了,可以直接告诉我,我们可以随时停止。\n
\n
\n 询问学生日常情况,参考问题:\n
\n
\n 最近天气变冷了,有没有增加衣物?在教室里感觉冷吗?\n
\n \n
\n 马上周末了,你有什么计划吗?\n
\n \n
\n 最近一个月过得怎么样?心情如何?\n
\n \n
\n 你觉得最近最让你开心的事情是什么?\n
\n \n
\n 你觉得最近最烦恼的事情是什么?\n
\n
\n
\n
\n 下一步\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), content: '', // 保存文本域内容 isEditable: false, // 控制文本域是否可编辑 status:'', datahtml1:'', datahtml2:'', datahtml3:'', activeStatus:'1' }; }, methods: { active(v){ console.log(v) this.activeStatus=v }, openTX(){ window.open('https://meeting.tencent.com/user-center/start','_blank') }, getImgsrc(val) { return "/content/image/xljkls/"+val }, // 切换编辑状态 toggleEdit() { if (this.isEditable) { // 点击保存时,处理保存逻辑,例如将内容发送到服务器 this.saveContent(); } // 切换编辑状态 this.isEditable = !this.isEditable; }, // 更新内容 updateContent(value) { this.content = value; }, // 模拟保存内容的方法 saveContent() { // 这里可以调用 API 保存内容 console.log('保存内容:', this.content); }, // 初始化内容 fetchContent() { // 从接口获取内容,并设置到 content 中 this.content = '从接口获得的内容'; }, next(){ if(this.status==1){ if(this.item.xd<5){ this.$router.push({ path: '/interviewInfoLS', }); }else{ this.$router.push({ path: '/interviewInfoLSGj', }); } } if(this.status==2){ if(this.item.xd<5){ this.$router.push({ path: '/interviewInfoOnline', }); }else{ this.$router.push({ path: '/interviewInfoOnlineGj', }); } } } }, created: function(){ this.status = JSON.parse(localStorage.getItem('stuStatus')); let that = this that.item = JSON.parse(localStorage.getItem('stuItem')); this.fetchContent() }, mounted: function(){ const that =this let data = { } $.post("/www/public/shouye/ft_getftzdy", data, function(res){ if(res.error==0){ that.datahtml1 = res.data[0].tyhnr that.datahtml2 = res.data[0].tyhnr that.datahtml3 = res.data[0].tyhnr }else{ that.$message.error(res.message) } }) }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDgongzuozuShangbaoDialog", function(resolve, reject){ var template = "
\n \n \n \n \n \n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), tishi:'', roleOption:[], loading:false, dialogVisible: false, tableData: [], multipleSelection: [], currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4, innerVisible:false, selectList:[], selectListV:'', fetchUnitListStatus:false, classList:[], fetchUnitListDialog:false, user:{}, total:0, pages:{ pageNo:1, pageSize:5 }, reForm: { reason:'' }, Form: { reason:'' }, reruleForm: { xm:'',sjh:'',yx:'',roleid:'',odesc:'' }, ruleForm: { xm:'',sjh:'',yx:'',roleid:'',odesc:'' }, rules: { reason: [ { required: true, message: '请输入申请原因', trigger: 'blur' } ], xm: [ { required: true, message: '请输入姓名', trigger: 'blur' } ], roleid: [ { required: true, message: '请选择角色', trigger: 'change' } ], sjh: [ { required: true, message: '请输入联系方式', trigger: 'blur' }, { validator: publicUtilsOfCheck.isValidPhoneNumber, trigger: 'blur' } ], yx: [ { required: true, message: '请输入邮箱', trigger: 'blur' }, { validator: publicUtilsOfCheck.validateEmail, trigger: 'blur' } ], }, isEdit:false } }, methods:{ changegetList(v){ let [zgdwbm, zgdwmc] = v.split('|') const that = this let data = { zgdwbm, zgdwmc } $.post("/www/public/shouye/jd_com_gzzbm_gzdwxg", data, function(res){ if(res.error==0){ }else{ that.$message.error(res.message) } }) }, showshenqingxiugai(){ this.$refs.gzzshenqingxiugai.show() }, shenqingxiugai(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var gzzid = user.ID const params = { gzzid, xgzt:'1', msg:that.Form.reason } $.post("/www/public/shangbao/gzz-cxsqxggzz", params, function(res){ if(res.success==1){ that.$message.success('已申请') that.$refs.gzzshenqingxiugai.close() }else{ that.$message.error(res.message) } }).fail((xhr,status,error)=>{ that.$message.error(error||'未知错误') }) }, tijiao(){ var that = this that.$confirm('是否确认提交审核', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { var jscnt = {} var otype that.tableData.forEach(item=>{ if(!jscnt[item.gzzroleid]){ jscnt[item.gzzroleid] = 1 }else{ jscnt[item.gzzroleid]++ } otype = item.otype }) const params = { jscnt:JSON.stringify(jscnt), otype } $.post("/www/public/shouye/jd_gzzbm_com", params, function(res){ if(res.success==1){ that.$message.success('提交成功') that.$refs.baseDialoggzz0.close() that.$emit('closeDialog') }else if(res.success==0&&res.message=='没有上级单位'){ that.$message.error('没有上级单位,请选择一个单位'); that.fetchUnitList() that.fetchUnitListStatus=true }else{ that.$message.error(res.message) } }).fail((xhr,status,error)=>{ that.$message.error(error||'未知错误') }) }).catch(() => { }); }, fetchUnitList() { const that = this let data = { } $.post("/www/public/shangbao/findsjbmlist", data, function(res){ if(res.error==0){ that.selectList=res.data }else{ that.$message.error(res.message) } }) }, download(){ var that = this var type //1省,2区县,3学校 下载工作组导入模版 var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} // var user = this.$store.state.user //220省310市410区县 var name if(user.Roles.includes('220')){ type = 1 name = '省工作组信息上报模版.xlsx' }else if(user.Roles.includes('310')){ type = 2 name = '市工作组信息上报模版.xlsx' }else if(user.Roles.includes('410')){ type = 3 name = '区工作组信息上报模版.xlsx' }else if(user.Roles.includes('450')){ //基教4高教5 var xxjd = localStorage.getItem('xxjd') if(['1','2','3','4'].includes(xxjd)){ type = 4 }else{ type = 5 } name = '校工作组信息上报模版.xlsx' } const params = { type, } axios({ method: 'get', url: '/www/public/shangbao/downloadgzztemp', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', name); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('下载成功') }else{ this.$message.error('下载失败') } }) }, handlebeforeClose(){ this.$emit('closeDialog') }, handleRoleChange(val){ console.log(val,'val') var zz = this.roleOption.find(item=>{ return item.id==val }) console.log(zz,'zz') this.ruleForm.odesc = zz.odesc }, exportFn(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { schoolid, } axios({ method: 'get', url: '/www/public/shangbao/exportteather', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', '学生数据.xls'); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, customUpload(params) { var that = this that.loading = true var type //1省,2区县,3学校 下载工作组导入模版 var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} //var user = this.$store.state.user //220省310市410区县 if(user.Roles.includes('220')){ type = 1 }else if(user.Roles.includes('310')){ type = 2 }else if(user.Roles.includes('410')){ type = 3 }else if(user.Roles.includes('450')){ //基教4高教5 var xxjd = localStorage.getItem('xxjd') if(['1','2','3','4'].includes(xxjd)){ type = 4 }else{ type = 5 } } const formData = new FormData() console.log(params.file,'params.file') formData.append('file', params.file) // 这是file入参,文件信息 // 如果extraParams是个单独的值,直接加入 var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID var roles=user.UserFilter.urole // 调接口 axios.post(`/www/public/shangbao/uploadgzztemp?type=${type}`, formData, { headers: { 'Content-Type': 'multipart/form-data' } }) .then(({data}) => { if(data&&data.success==1){ that.$message.success('导入成功') that.loading = false that.getList() }else{ that.loading = false that.$message.error(data.message) } }) .catch(error => { that.loading = false console.error(error); }); }, onError(){}, del(row){ var that = this const params = { ids:JSON.stringify([row.id]), } $.post("/www/public/shangbao/del_school_gzry", params, function(res){ if(res.success==1){ that.$message.success('删除成功') that.getList() }else{ that.$message.error(res.message) } }).fail((xhr,status,error)=>{}) }, handleEdit(row){ this.$refs.baseDialoggzz1.show() this.$nextTick(()=>{ this.$refs.ruleFormgzz.resetFields() // xm:'',sjh:'',yx:'',roleid:'',odesc:'' this.ruleForm.roleid = row.gzzroleid this.ruleForm.id = row.id this.ruleForm.xm = row.xm this.ruleForm.sjh = row.sjh this.ruleForm.yx = row.yx this.ruleForm.odesc = row.odesc console.log(this.ruleForm,'ruleForm') this.isEdit = true }) }, validatePhoneNumber(phoneNumber) { const regex = /^(0\d{2,3}[- ]?\d{7,8})|(1[3-9]\d{9})$/; return regex.test(phoneNumber); }, validateEmail(email) { const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; return emailRegex.test(email); }, submit(){ var that = this this.$refs['ruleFormgzz'].validate((valid) => { if (valid) { let that = this; const {xm,zw,roleid,sjh,yx} = that.ruleForm let newArr = {...this.ruleForm} newArr.id = this.ruleForm.id console.log(newArr,'newArr') $.post('/www/public/shouye/jd_gzzbm',{params:JSON.stringify(newArr)}, function(msg){ if(msg.success == 1){ if(newArr.id){ that.$message.success('修改成功') }else{ that.$message.success('添加成功') } that.$refs.baseDialoggzz1.close() that.getList() }else{ that.$message({ type: 'error', message: msg.message }); } }).fail(function(jqXHR, textStatus, errorThrown){ that.$message({ type: 'error', message: errorThrown }); }) /*}else{ alert(2) $.post('/www/public/shangbao/edit_school_gzry',newArr, function(msg){ if(msg.success == 1){ that.$message.success('修改成功') that.$refs.baseDialoggzz1.close() that.getList() }else{ that.$message({ type: 'error', message: msg.message }); } }).fail(function(jqXHR, textStatus, errorThrown){ that.$message({ type: 'error', message: errorThrown }); }) }*/ } else { return false; } }); }, handleAdd(){ this.ruleForm = {xm:'',xb:'',sjh:'',yx:'',zw:'',roleid:''} this.isEdit = false this.$refs.baseDialoggzz1.show() this.$nextTick(()=>{ this.$refs.ruleFormgzz.resetFields() }) }, show(){ this.getRole() this.getList() console.log(this.$refs.baseDialoggzz0,'baseDialoggzz0') this.$refs.baseDialoggzz0.show() }, getRole(){ var that = this var otype var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var roles = user.Roles if(roles.indexOf('450')!=-1){ //基教4高教5 var xxjd = localStorage.getItem('xxjd') if(['1','2','3','4'].includes(xxjd)){ otype = '4' }else{ otype = '5' } } if(roles.indexOf('410')!=-1){ otype = '3' } if(roles.indexOf('310')!=-1){ otype = '2' } if(roles.indexOf('220')!=-1){ otype = '1' } const params = { otype } $.post("/www/public/shouye/jd_gzzbm_cxrole",params,res=>{ if(res.code==200&&res.data){ that.roleOption = res.data that.tishi = '' res.data.forEach(item=>{ that.tishi+= '

' that.tishi+=item.ovalue that.tishi+='('+item.rsc+'),' that.tishi+=item.odesc+'。' that.tishi+= '

' }) } }).fail((jqXHR, textStatus, errorThrown)=>{ that.$message({ type: 'error', message: errorThrown }); }) }, getList(){ var that = this //otype 1 省级 2 区县 3 学校 var otype var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var roles = user.Roles if(roles.indexOf('450')!=-1){ //基教4高教5 var xxjd = localStorage.getItem('xxjd') if(['1','2','3','4'].includes(xxjd)){ otype = '4' }else{ otype = '5' } } if(roles.indexOf('410')!=-1){ otype = '3' } if(roles.indexOf('310')!=-1){ otype = '2' } if(roles.indexOf('220')!=-1){ otype = '1' } const params = { otype } $.post("/www/public/shouye/jd_gzzbm_fxList", params, function(res){ if(res.success==1){ that.tableData = res.data }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, getClass(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID const params = { schoolid } $.get("/www/public/shangbao/findschoolbj", params, function(res){ if(res.success==1){ that.classList = res.data }else{ this.$message.error(res.message) } }).fail((xhr,status,error)=>{ this.$message.error('请求错误') }) }, handleConfirm(){ this.$refs.baseDialogjs.close() }, handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pageSize = val this.getList() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pageNo = val this.getList() }, handleClick(){}, handleClose(){ console.log(1) this.dialogVisible = false }, toggleSelection(rows) { if (rows) { rows.forEach(row => { this.$refs.multipleTable.toggleRowSelection(row); }); } else { this.$refs.multipleTable.clearSelection(); } }, handleSelectionChange(val) { this.multipleSelection = val; } }, computed:{ }, watch:{ }, created: function(){ this.user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} }, mounted: function(){ }, props: ['title', 'data', 'config','gzzzt','xgzt'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-BZRHomePage-view", function(resolve, reject){ var template = "
\n
\n
\n
\n 您好,{{userInfo.Nickname}}班主任~\n
\n\n
\n
\n
\n \n
\n
\n
\n\n
\n
\n
\n
\n \n
\n
\n
\n 学习要求\n
\n
\n 勤奋、专注、思考、实践\n
\n
\n
\n
\n
\n \n
\n
\n
\n 学习课程\n
\n
\n 应知应会,方能胜任\n
\n
\n
\n
\n
\n \n\n
\n
\n
\n 在线考试\n
\n
\n 冷静分析,沉着应对\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n 考试记录\n
\n
\n 即时记录,准确回顾\n
\n
\n
\n
\n
\n \n
\n
\n
\n 教师测评\n
\n
\n 精准评估,科学考量\n
\n
\n
\n\n \n
\n
\n \n
\n
\n
\n 预约访谈\n
\n
\n 精准对接,高效沟通\n
\n
\n
\n
\n
\n \n
\n
\n
\n 进度督查\n
\n
\n 监督进度,确保高效\n
\n
\n
\n
\n
\n \n
\n
\n
\n 通知公告\n
\n
\n 重要通知,及时关注\n
\n
\n
\n
\n
\n \n
\n
\n
\n 资料下载\n
\n
\n 各类资料,应有尽有\n
\n
\n
\n
\n
\n\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { butList:[], active:0, tzggList:[], value:'', reverse: false, crq:'', rqList:[], butList:[], active:0, tzggList:[], value:'', reverse: false, crq:'', rqList:[], currentList:[], userInfo:{}, type:'', gzdwmc:'', ifqs:'', currentList:[], glyxm:'', buttomList:[ { img:'/content/image/xljkImg/jscp.png', title:"教师测评", description:"学生自测,快速监测更安心", background:"radial-gradient( 0% 100% at 0% 0%, #2C79F9 0%, #56ADFF 100%)", url:"/BZRevaluationList" }, { img:'/content/image/xljkImg/预约访谈.png', title:"预约访谈", description:"快速预约,解决学生心理问题", background:"radial-gradient( 0% 95% at 0% 0%, #FF7E27 0%, #FFAA41 100%)", url:"/BZRyyft" }, { img:'/content/image/xljkImg/进度督查.png', title:"进度督查", description:"学生测试进度,一目了然", background:"radial-gradient( 0% 100% at 0% 0%, #00B8CD 0%, #24D4B9 100%)", url:"/BZRjddc" }, { img:'/content/image/xljkImg/资料下载.png', title:"资料下载", description:"各类资料,应有尽有", background:"linear-gradient( 180deg, #8564FF 0%, #918DFF 100%)", url:"/BZRzlxz1" }, ] }; }, methods: { goPage(url){ this.$router.push(url) }, getImgsrc:function(val) { return "/content/image/xljkImg/"+val }, getIndex(index){ this.active = index }, onPanelChange(value, mode) { console.log(value, mode); }, getDay(val){ if(this.rqList.length>0){ if(val.type=='current-month'){ //this.currentList.push(val.day) } if(val.type=='current-month'&&this.rqList.indexOf(val.day)>=0){ return true }else{ return false } } }, getDate(val){ //console.log(this.currentList) this.crq = val this.getdb() }, //获取待办 getdb:function(){ let that = this //$.post("/www/py/fwpt/test", {crq:this.crq}, function(res){ $.post("/www/py/fwpt/user_event", {crq:this.crq}, function(res){ if(res.success==1){ if(res.data.data){ that.tzggList = res.data.data that.rqList = res.data.rq } } }) }, //获取学段 getxxjd(){ var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID this.Nickname = user.Nickname const params1 = { schoolid } $.get("/www/public/shangbao/findschoolxd", params1, function(res){ if(res.success==1){ localStorage.setItem('xxjd',res.data.xd) }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, glyxmget(){ var glyInfo = localStorage.getItem('glyInfo')?JSON.parse(localStorage.getItem('glyInfo')):{} this.glyxm = glyInfo.glyxm }, gointerviewLS(status) { this.$router.push({ path: '/interviewLS', query: { status: status } }); }, gg(){ window.open('https://xinlijc.bnu.edu.cn/www/dd/vue/spa/xljk#/FTnotice','_blank') }, czsc(){ window.open('https://xinlijc.bnu.edu.cn/content/image/xljkImg/ftsc.pdf','_blank') }, kszs(){ const that =this let data = { } $.post("/www/public/shouye/px_ftlssy_zscx", data, function(res){ if(res.error==0){ window.open(res.data.url) }else{ that.$message.error(res.message) } }) }, ksft(){ const that = this console.log(that.type) if(that.type==1){ if(that.ifqs==1){ this.$router.push({ path: '/interviewLS', }); }else{ that.$router.push('aggerTeacher') } } if(this.type==2){ that.$alert('该访谈员未完成培训无法开始访谈', '提示', { confirmButtonText: '确定', type: 'warning', callback: action => { } }); } }, routerPush(path){ this.$router.push(path) }, getImgsrc:function(val) { return "/content/image/xljkImg/"+val }, getIndex(index){ this.active = index }, onPanelChange(value, mode) { console.log(value, mode); }, getDay(val){ if(this.rqList.length>0){ if(val.type=='current-month'){ //this.currentList.push(val.day) } if(val.type=='current-month'&&this.rqList.indexOf(val.day)>=0){ return true }else{ return false } } }, getDate(val){ //console.log(this.currentList) this.crq = val this.getdb() }, //获取待办 getdb:function(){ let that = this //$.post("/www/py/fwpt/test", {crq:this.crq}, function(res){ $.post("/www/py/fwpt/user_event", {crq:this.crq}, function(res){ if(res.success==1){ if(res.data.data){ that.tzggList = res.data.data that.rqList = res.data.rq } } }) }, }, computed:{ }, created: function(){ let that = this that.getdb() that.userInfo =localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} $.post("/www/public/shouye/px_fty_sfftls", {}, function(res){ that.gzdwmc = res.data.gzdwmc that.type=res.data.type that.ifqs=res.data.ifqs }) that.getdb() that.getxxjd() }, mounted: function(){ setTimeout(()=>{ this.glyxmget() },1000) }, props: ['title', 'data', 'config','isHeight'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-ftksjl-view", function(resolve, reject){ var template = "
\n \n \n
\n
\n
\n
\n \n
\n
\n 暂无内容\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n {{item.ksrwmc}}\n
\n
\n 考试时间:{{item.insertedtime}}\n
\n
\n 试卷总分:{{item.sjzfs}}\n
\n
\n 考试得分:{{item.kszdf}}\n
\n
\n 是否及格:{{item.isjg==true?'是':'否'}}\n
\n
\n 是否批改:{{item.ispg==true?'已批改':'未批改'}}\n
\n
\n\n
\n\n\n\n
\n
\n\n
\n\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dataList:[] }; }, methods: { goftkszb(item) { this.$router.push({ path: '/ftkszb', query: { item: JSON.stringify(item) } }); }, goBack(){ this.$router.go(-1) }, getList(){ const that =this let data = { } $.post("/www/public/shouye/px_ftlssy_ks_log_select", data, function(res){ if(res.error==0){ that.dataList = res.data }else{ that.$message.error(res.message) } }) }, getImgsrc(val) { return "/content/image/xljkImg/"+val }, }, created: function(){ const that =this that.getList() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-BZRzlxz1-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n \n 资料下载\n
\n
\n
\n \n
\n \n
\n \n {{item.otitle}}\n \n
\n
\n
\n
\n \n \n 下载\n \n
\n
\n
\n
\n
\n \n \n
\n\n\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), pages:{ pageSize:5, pageNo:1 }, List:[], typeMap:["/jpglogo.png","/yasuologo.png","/mp4logo.png","/wordlogo.png","/excellogo.png","/pdflogo.png"], loopData0: [ ], total:0, constants: {},}; }, methods: { handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pageSize = val this.getList() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pageNo = val this.getList() }, download(item){ var that = this const params = { path:item.fileurl, fileName:item.otitle+'.'+item.fileurl.split('.')[1] } window.open(item.fileurl) /*axios({ method: 'get', url: '/www/public/shangbao/attachmentDownload', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ console.log(res,'res') let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', params.fileName); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('下载成功') }else{ this.$message.error('下载失败') } })*/ }, getFileTypeUrl(name){ var url = '' if(name){ var arr = name.split('.') if(arr&&arr.length){ var houzhui = arr[1] if(houzhui=='pdf'){ url = '/content/image/xljkImg/pdf.png' }else if(houzhui=='xls'||houzhui=='xlsx'){ url = '/content/image/xljkImg/exceltubiao.png' }else if(houzhui=='jpg'||houzhui=='jpeg'||houzhui=='png'){ url = '/content/image/xljkImg/jpg.png' }else if(houzhui=='doc'||houzhui=='docx'){ url = '/content/image/xljkImg/word.png' }else{ url = '/content/image/xljkImg/qtwjlx.png' } } } return url }, getList(){ var that = this const params = { type:'3', ...this.pages } $.get("/www/public/shangbao/findtzgg", params, function(res){ if(res.success==1){ that.loopData0 = res.data that.total = res.total }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, }, created: function(){ this.getList() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-BZRnav", function(resolve, reject){ var template = "
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n
\n 取 消\n 确 定\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n 取 消\n 确 定\n
\n
\n
\n
\n \"\"/\n

\n 全国学生心理健康监测与服务平台\n

\n
\n
\n \n \"\"/\n \n

\n {{Nickname}}\n \n

\n \n 个人信息\n 修改密码\n 退出登录\n \n
\n\n
\n
\n
\n

\n \n 返回/ {{currentPage}}\n

\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), searchValue:'', dialogVisible:false, dialogVisibles:false, formLabelWidth: '130px', form: { xm: '', xb: '', sr: '', sjhm: '', yx: '', nl: '', qq: '', wx: '', qtlxdh: '', grsm: '', }, forms: { oldpassword: '', newpassword: '', confirmNewpassword: '' }, rules: { }, ruless: { oldpassword: [ { required: true, message: '请输入当前密码', trigger: 'blur' } ], newpassword: [ { required: true, message: '请输入新密码', trigger: 'blur' }, { pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[@$!%*?&=])[A-Za-z\d@$!%*?&=]{8,14}$/, message: '密码格式不符合要求,需包含字母、数字和特殊字符,长度8-14位', trigger: 'blur' } ], confirmNewpassword: [ { required: true, message: '请再次输入新密码', trigger: 'blur' }, { validator: this.validatePasswordMatch, trigger: 'blur' } ] } }; }, methods: { validatePasswordMatch(rule, value, callback) { if (value !== this.forms.newpassword) { callback(new Error('两次输入的新密码不一致')); } else { callback(); } }, formatDate(date) { const d = new Date(date); const year = d.getFullYear(); const month = ('0' + (d.getMonth() + 1)).slice(-2); const day = ('0' + d.getDate()).slice(-2); return `${year}-${month}-${day}`; }, save() { const that = this if (that.form.sr) { that.form.sr = that.formatDate(that.form.sr); } that.$refs.formRef.validate((valid) => { if (valid) { const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data = { ...that.form, } $.post("/www/public/shangbao/edituserinfo ", data, function(res){ if(res.error==0){ that.$message.success('提交成功') that.dialogVisible =false }else{ that.$message.error(res.message) } }) } else { console.error('表单验证失败'); return false; } });}, saves() { const that = this that.$refs.formRefs.validate((valid) => { if (valid) { const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data = { ...that.forms } $.post("/www/public/shangbao/editPassword", data, function(res){ if(res.error==0){ that.$message.success('修改成功') that.dialogVisibles =false }else{ that.$message.error(res.message) } }) } else { console.error('表单验证失败'); return false; } });}, jfjc(){ this.dialogVisible =true }, jfjcs(){ this.dialogVisibles =true }, goHome(){ this.$router.go(-1) }, grxx(){}, xgmm(){}, logout(){ localStorage.removeItem('user') this.$router.replace('/login') } }, created: function(){ const that = this const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data ={ xxyid : id } $.get("/www/public/shangbao/finduserinfo", data, function(res){ if(res.error==0){ that.form = res.data }else{ that.$message.error(res.message) } }) }, mounted: function(){ }, computed:{ Nickname(){ var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} return user.Nickname } }, props: ['title', 'data', 'config','currentPage'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-BZRjddc-view", function(resolve, reject){ var template = "
\n \n
\n \n
\n
\n \n

\n 测评进度\n

\n

\n 测评进度,一目了然\n

\n
\n
\n \n

\n 访谈进度\n

\n

\n 访谈进度,一目了然\n

\n
\n \n
\n \n\t\t\n\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid() }; }, methods: { showJindu(type){ this.$refs.BZRdialog.show(type) }, }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-BZRyyft-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n
\n

\n \n 预约列表\n

\n 一键预约\n
\n\n
\n
\n
\n
\n \n
\n
\n {{item.xsmc}} \n
\n
\n
\n
\n 年级:{{item.nj}}\n
\n
\n 班级:{{item.bj}}\n
\n
\n 联系方式: {{item.xssjh}} \n
\n
\n 访谈老师: {{item.ftls}} \n
\n
\n 访谈时间: {{item.yysj}} \n
\n
\n 访谈地址: {{item.ftdz}} \n
\n \n
\n
\n
\n
\n \n
\n 暂无数据\n
\n
\n \n
\n \n \n\n\n
\n
\n\n
\n\n\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), ftsj:new Date(), yyzt:'', pages:{ pagesize:9, pagenum:1, }, total:0, stuList:[], listData:[], user:null, currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4 }; }, methods: { goyuyue(){ this.$router.push({ path:'/BZRyuyue' }) }, getStuList(){ var that = this const params = { //userid,yhjs,ftzt schoolid:this.schoolid, userid:this.schoolid, yhjs:JSON.stringify([this.yhjs]), ftzt:'1', ...this.pages } console.log(params,'params') $.post("/www/public/shouye/ft_ftyystu", params, function(res){ if(res.success==1){ that.stuList = res.data that.total = res.total }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, formatDate(date) { const year = date.getFullYear(); const month = (date.getMonth() + 1).toString().padStart(2, '0'); const day = date.getDate().toString().padStart(2, '0'); return `${year}-${month}-${day}`; }, handleDateChange(val){ console.log(val,'va;') this.getList() }, changeYyzt(val){ this.yyzt = val this.getList() }, getList(){ var that = this const params = { ftsj:this.formatDate(this.ftsj), yyzt:this.yyzt, ...this.pages, schoolid:this.schoolid } console.log(params,'params') $.post("/www/public/shouye/ft_ftyyls", params, function(res){ if(res.success==1){ that.listData = res.data }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, goyuyue(item){ this.$router.push({ path:"/BZRyuyue", query:{ item:JSON.stringify(item) } }) }, handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pagesize = val this.getStuList() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pagenum = val this.getStuList() } }, created: function(){ this.user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} this.schoolid = this.user.ID this.Nickname = this.user.Nickname this.yhjs = this.user.UserFilter.urole this.getStuList() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-BZRyuyue-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n \n

\n 点击选择访谈老师\n

\n
\n
\n \n
\n

\n {{item.name}}\n

\n

\n 常见的轻中度抑郁症、焦虑症、疑病症、恐惧症、强迫症心理疏导\n

\n
\n\n
\n
\n
\n
\n \n
\n
\n
\n
\n

\n {{cur.name}}\n

\n 已选择访谈老师\n
\n

\n 常见的轻中度抑郁症、焦虑症、疑病症、\n 恐惧症、强迫症心理疏导\n

\n
\n
\n
\n
\n
\n \n

\n 电话:{{cur.phone}}\n

\n
\n
\n \n

\n 职务:{{cur.zw}}\n

\n
\n\n\n
\n
\n
\n \n

\n 专业:{{cur.zy}}\n

\n
\n
\n \n

\n 擅长:心理访谈\n

\n
\n
\n\n
\n\n
\n
\n \n

\n 访谈时间\n

\n \n \n \n \n

\n 待访谈学生\n

\n
\n
\n

\n 专业\n

\n \n \n \n \n
\n
\n

\n 班级\n

\n \n \n \n \n
\n\n
\n \n \n \n
\n \n {{item.xsmc}}\n
\n
\n
\n

5\" class=\"chakangengduo\" @click=\"showmore\">\n {{!showallstu?'查看更多':'收起'}}\n

\n
\n
\n \n

\n 暂无学生!\n

\n
\n

\n 访谈地点\n

\n \n \n \n \n 短信提醒\n \n
\n 一键预约\n
\n\n\n
\n\n\n
\t\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), cur:{}, listData:[], value2:'', form:{name:'',stulist:[],ftdz:'',date:'',sfdx:''}, checkList:[], stuList:[], curIndex1:0, optionData:{bj:[],zy:[]}, selectData:{ bj:'',zy:'' }, showallstu:false, rules: { stulist: [ { required: true, message: '请选择学生', trigger: 'blur' }, ], ftdz: [ { required: true, message: '请输入访谈地址', trigger: 'blur' }, ], date: [ { required: true, message: '请选择日期', trigger: 'blur' }, ], sfdx: [ { required: true, message: '请选择是否短信提醒', trigger: 'blur' }, ], }, pickerOptions: { }, }; }, methods: { handlechange(val){ console.log(this.selectData,'selectData') this.getStuList() }, onSubmit(){ var that = this this.$refs.form.validate((valid) => { if (valid) { const params = { ftyid:this.cur.userid, kssj:this.form.date[0], jssj:this.form.date[1], stulist:JSON.stringify(this.form.stulist), ftdz:this.form.ftdz, isfs:this.form.sfdx?'1':'2',// 是否短信提醒, userid:this.schoolid } $.post("/www/public/shouye/ft_stufpls", params, function(res){ if(res.success==1){ that.$message.success('预约成功') that.getList() that.getStuList() }else{ that.$message.error(res.message) } }).fail((xhr,status,error)=>{ that.$message.error('预约失败') }) } else { console.log('error submit!!'); return false; } }); }, showmore(){ this.showallstu = !this.showallstu }, changeCur(item,index){ this.curIndex1 = index this.cur = item }, formatDate(date) { const year = date.getFullYear(); const month = (date.getMonth() + 1).toString().padStart(2, '0'); const day = date.getDate().toString().padStart(2, '0'); return `${year}-${month}-${day}`; }, getList(){ var that = this const params = { schoolid:this.schoolid } console.log(params,'params') $.post("/www/public/shouye/ft_ftlslist", params, function(res){ if(res.success==1){ that.listData = res.data if(that.listData.length){ that.cur = that.listData[0]||{} } }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, getslectOption(){ var that = this const params = { userid:this.schoolid, yhjs:JSON.stringify([this.yhjs]), } console.log(params,'params') $.post("/www/public/shouye/ft_ftyystupublic", params, function(res){ if(res.success==1){ res.data.bj? that.optionData.bj = res.data.bj:'' res.data.zy? that.optionData.zy = res.data.zy:'' }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, getStuList(){ var that = this const params = { bj:that.selectData.bj, zy:that.selectData.zy, schoolid:this.schoolid, userid:this.schoolid, yhjs:JSON.stringify([this.yhjs]), ftzt:'0' } console.log(params,'params') $.post("/www/public/shouye/ft_ftyystu", params, function(res){ if(res.success==1){ that.stuList = res.data }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) } }, created: function(){ this.user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} this.xxjd = localStorage.getItem('xxjd') this.schoolid = this.user.ID this.Nickname = this.user.Nickname this.yhjs = this.user.UserFilter.urole this.getList() this.getStuList() this.getslectOption() }, computed:{ showStulist(){ if(!this.showallstu){ return this.stuList.slice(0,5) }else{ return this.stuList.slice(0) } } }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-BZRevaluationList-view", function(resolve, reject){ var template = "
\n \n\n
\n
\n
\n
\n
\n \n
\n
\n 暂无内容\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n ● 进行中\n
\n
\n {{item.stmc}}\n
\n
\n
\n 答题角色 : {{jsMap[item.js]}}\n
\n \n
\n
\n \n
\n 请认真答题再提交。请仔细阅读每条测试项目,务必把意思弄明白理解清楚然后根据最近一周的实际感觉,选择最符合自己的选项。本测验共30道题预计用时5分钟左右。\n
\n
\n 是否签署参与测评同意书\n\n
\n
\n 进入测试系统\n
\n
\n
\n
\n 立即测评\n
\n
\n
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dataList:[], Loading: false, visibleIntroduceDialog: false, checked:false, item:'', jsMap:{ '500':'学生', '720':'班主任(辅导员)', '710':'心理老师', '730':'校长', '700':'学科老师', '750':'信息员', } }; }, methods: { goTest(item){ this.$router.push({ path: 'beforeEvaluations', query: { gaugeId:item.sjid } }); }, dialog(item){ this.visibleIntroduceDialog = true this.item = item }, getImgsrc(val) { return "/content/image/xljkImg/"+val }, checkbox(){ this.$router.push('agger') }, getGaugelist(){ let that = this let data = { } $.post("/www/public/st/getstlist", data, function(res){ if(res.code==200){ that.dataList = res.data } }) }, }, created: function(){ let that = this that.getGaugelist() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XXHomePage-view", function(resolve, reject){ var template = "
\n \n \n

访谈时间:{{data?data.yysj:''}}

\n

访谈地址:{{data?data.ftdz:''}}

\n

访谈老师:{{data?data.ftls:''}}

\n

\n 请认真答题再提交。请仔细阅读每条测试项目,务必把意思弄明白理解清楚,然后根据最近一周的实际感觉,选择最符合自己的选项。本测验共30道题,预计用时5分钟左右。\n

\n \n 确 定\n \n \n
\n
\n
\n 您好,{{Nickname}}同学~\n
\n\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n

\n 学生测评\n

\n

\n 进行全国心理测评\n

\n
\n
\n \n

\n 访谈任务\n

\n

\n 查看访谈任务\n

\n
\n \n
\n \n

\n 操作手册\n

\n

\n 下载查看操作手册\n

\n
\n
\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { butList:[], active:0, tzggList:[], value:'', reverse: false, crq:'', rqList:[], currentList:[], glyxm:'', dialogVisible:false, data:'', status:false }; }, methods: { ftrw(){ if(this.status){ this.dialogVisible=true }else{ this.$alert('暂无访谈任务', '提示', { confirmButtonText: '确定', callback: action => { } } ) } }, czsc(){ window.open('https://hhqjjrli3n.feishu.cn/wiki/space/7408092979324387331?ccm_open_type=lark_wiki_spaceLink&open_tab_from=wiki_home','_blank') }, goPage(url){ this.$router.push(url) }, getImgsrc:function(val) { return "/content/image/xljkImg/"+val }, getIndex(index){ this.active = index }, onPanelChange(value, mode) { console.log(value, mode); }, getDay(val){ if(this.rqList.length>0){ if(val.type=='current-month'){ //this.currentList.push(val.day) } if(val.type=='current-month'&&this.rqList.indexOf(val.day)>=0){ return true }else{ return false } } }, getDate(val){ //console.log(this.currentList) this.crq = val this.getdb() }, //获取待办 getdb:function(){ let that = this //$.post("/www/py/fwpt/test", {crq:this.crq}, function(res){ $.post("/www/py/fwpt/user_event", {crq:this.crq}, function(res){ if(res.success==1){ if(res.data.data){ that.tzggList = res.data.data that.rqList = res.data.rq } } }) }, glyxmget(){ var glyInfo = localStorage.getItem('glyInfo')?JSON.parse(localStorage.getItem('glyInfo')):{} this.glyxm = glyInfo.glyxm } }, computed:{ }, created: function(){ let that =this let id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:{} let data = { stuid:id } $.post("/www/public/shouye/ft_stuftrw", data, function(res){ if(res.error ==0&&res.data.length>=1){ that.data = res.data[0] that.status = true console.log(that.data) }else{ } }) var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID this.Nickname = user.Nickname that.getdb() }, mounted: function(){ setTimeout(()=>{ this.glyxmget() },1000) }, props: ['title', 'data', 'config','isHeight'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDxiafaDialog", function(resolve, reject){ var template = "
\n \n \n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), loading:false, dialogVisible: false, tableData: [], multipleSelection: [], currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4, total:0, pages:{ pageNo:1, pageSize:5 }, } }, methods:{ handlebeforeClose(){ this.$emit('closeDialog') }, exportFn(){ var that = this var name //var user = this.$store.state.user var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var username = user.Username var bm = username.substring(3) let type if(user.Roles.includes('220')){ type='1' name = '市级管理员账号信息.xls' if(['110000','120000','310000','500000'].includes(bm)){ type='1' name = '区县管理员账号信息.xls' } }else if(user.Roles.includes('310')){ type='2' name = '区县管理员账号信息.xls' } const params = { username:user.Username, type, state:'1' } axios({ method: 'get', url: '/www/public/shangbao/dcsqxzh', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; //let name = type=='1'?'市及管理员账号' aLink.setAttribute('download', name); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, show(){ this.getList() this.$refs.baseDialogjs.show() }, getList(){ var that = this //var user = this.$store.state.user var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} //type 1 市账号 2区县账号 let type if(user.Roles.includes('220')){ type='1' }else if(user.Roles.includes('310')){ type='2' } const params = { username:user.Username, type, ...this.pages } $.get("/www/public/shangbao/findsqxzh", params, function(res){ if(res.success==1){ that.tableData = res.data that.total = res.total }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pageSize = val this.getList() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pageNo = val this.getList() }, handleClick(){}, handleClose(){ console.log(1) this.dialogVisible = false }, toggleSelection(rows) { if (rows) { rows.forEach(row => { this.$refs.multipleTable.toggleRowSelection(row); }); } else { this.$refs.multipleTable.clearSelection(); } }, handleSelectionChange(val) { this.multipleSelection = val; } }, computed:{ }, watch:{ }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XXzlxz1-view", function(resolve, reject){ var template = "
\n \n
\n
\n
\n \n 资料下载\n
\n
\n
\n \n
\n \n
\n \n {{item.otitle}}\n \n
\n
\n
\n
\n \n \n 下载\n \n
\n
\n
\n
\n
\n \n \n
\n\n\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), pages:{ pageSize:5, pageNo:1 }, List:[], typeMap:["/jpglogo.png","/yasuologo.png","/mp4logo.png","/wordlogo.png","/excellogo.png","/pdflogo.png"], loopData0: [ ], total:0, constants: {},}; }, methods: { handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pageSize = val this.getList() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pageNo = val this.getList() }, download(item){ var that = this const params = { path:item.fileurl, fileName:item.otitle+'.'+item.fileurl.split('.')[1] } window.open(item.fileurl) /*axios({ method: 'get', url: '/www/public/shangbao/attachmentDownload', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ console.log(res,'res') let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', params.fileName); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('下载成功') }else{ this.$message.error('下载失败') } })*/ }, getFileTypeUrl(name){ var url = '' if(name){ var arr = name.split('.') if(arr&&arr.length){ var houzhui = arr[1] if(houzhui=='pdf'){ url = '/content/image/xljkImg/pdf.png' }else if(houzhui=='xls'||houzhui=='xlsx'){ url = '/content/image/xljkImg/exceltubiao.png' }else if(houzhui=='jpg'||houzhui=='jpeg'||houzhui=='png'){ url = '/content/image/xljkImg/jpg.png' }else if(houzhui=='doc'||houzhui=='docx'){ url = '/content/image/xljkImg/word.png' }else{ url = '/content/image/xljkImg/qtwjlx.png' } } } return url }, getList(){ var that = this const params = { type:'3', ...this.pages } $.get("/www/public/shangbao/findtzgg", params, function(res){ if(res.success==1){ that.loopData0 = res.data that.total = res.total }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, }, created: function(){ this.getList() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XXnav", function(resolve, reject){ var template = "
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n
\n 取 消\n 确 定\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n 取 消\n 确 定\n
\n
\n
\n
\n \"\"/\n

\n 全国学生心理健康监测与服务平台\n

\n
\n
\n \n \"\"/\n \n

\n {{Nickname}}\n \n

\n \n 个人信息\n 修改密码\n 退出登录\n \n
\n\n
\n
\n
\n

\n \n 首页/{{currentPage}}\n

\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), searchValue:'', dialogVisible:false, dialogVisibles:false, formLabelWidth: '130px', form: { xm: '', xb: '', sr: '', sjhm: '', yx: '', nl: '', qq: '', wx: '', qtlxdh: '', grsm: '', }, forms: { oldpassword: '', newpassword: '', confirmNewpassword: '' }, rules: { }, ruless: { oldpassword: [ { required: true, message: '请输入当前密码', trigger: 'blur' } ], newpassword: [ { required: true, message: '请输入新密码', trigger: 'blur' }, { pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,14}$/, message: '密码格式不符合要求,需包含字母、数字和特殊字符,长度8-14位', trigger: 'blur' } ], confirmNewpassword: [ { required: true, message: '请再次输入新密码', trigger: 'blur' }, { validator: this.validatePasswordMatch, trigger: 'blur' } ] } }; }, methods: { validatePasswordMatch(rule, value, callback) { if (value !== this.forms.newpassword) { callback(new Error('两次输入的新密码不一致')); } else { callback(); } }, formatDate(date) { const d = new Date(date); const year = d.getFullYear(); const month = ('0' + (d.getMonth() + 1)).slice(-2); const day = ('0' + d.getDate()).slice(-2); return `${year}-${month}-${day}`; }, save() { const that = this if (that.form.sr) { that.form.sr = that.formatDate(that.form.sr); } that.$refs.formRef.validate((valid) => { if (valid) { const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data = { ...that.form, } $.post("/www/public/shangbao/edituserinfo ", data, function(res){ if(res.error==0){ that.$message.success('提交成功') that.dialogVisible =false }else{ that.$message.error(res.message) } }) } else { console.error('表单验证失败'); return false; } });}, saves() { const that = this that.$refs.formRefs.validate((valid) => { if (valid) { const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data = { ...that.forms } $.post("/www/public/shangbao/editPassword", data, function(res){ if(res.error==0){ that.$message.success('修改成功') that.dialogVisible =false }else{ that.$message.error(res.message) } }) } else { console.error('表单验证失败'); return false; } });}, jfjc(){ this.dialogVisible =true }, jfjcs(){ this.dialogVisibles =true }, goHome(){ }, grxx(){}, xgmm(){}, logout(){ localStorage.removeItem('user') this.$router.replace('/login') } }, created: function(){ const that = this const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data ={ xxyid : id } $.get("/www/public/shangbao/finduserinfo", data, function(res){ if(res.error==0){ that.form = res.data }else{ that.$message.error(res.message) } }) }, mounted: function(){ }, computed:{ Nickname(){ var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} return user.Nickname } }, props: ['title', 'data', 'config','currentPage'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XXevaluationList-view", function(resolve, reject){ var template = "
\n \n\n
\n
\n
\n
\n
\n \n
\n
\n 暂无内容\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n ● 进行中\n
\n
\n {{item.stmc}}\n
\n
\n
\n 答题角色 : {{jsMap[item.js]}}\n
\n \n
\n
\n \n
\n 请认真答题再提交。请仔细阅读每条测试项目,务必把意思弄明白理解清楚然后根据最近一周的实际感觉,选择最符合自己的选项。本测验共30道题预计用时5分钟左右。\n
\n
\n 是否签署参与测评同意书\n\n
\n
\n 进入测试系统\n
\n
\n
\n
\n 立即测评\n
\n
\n
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dataList:[], Loading: false, visibleIntroduceDialog: false, checked:false, item:'', jsMap:{ '500':'学生', '720':'班主任(辅导员)', '710':'心理老师', '730':'校长', '700':'学科老师', '750':'信息员', } }; }, methods: { goTest(item){ this.$router.push({ path: 'beforeEvaluations', query: { gaugeId:item.sjid } }); }, dialog(item){ this.visibleIntroduceDialog = true this.item = item }, getImgsrc(val) { return "/content/image/xljkImg/"+val }, checkbox(){ this.$router.push('agger') }, getGaugelist(){ let that = this let data = { } $.post("/www/public/st/getstlist", data, function(res){ if(res.code==200){ that.dataList = res.data } }) }, }, created: function(){ let that = this that.getGaugelist() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDzxxxiafaDialog", function(resolve, reject){ var template = "
\n \n \n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), loading:false, dialogVisible: false, tableData: [], multipleSelection: [], currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4, pages:{ pageNo:1, pageSize:5 }, } }, methods:{ handlebeforeClose(){ this.$emit('closeDialog') }, exportFn(){ var that = this //var user = this.$store.state.user var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} let type if(user.Roles.includes('220')){ type='1' }else if(user.Roles.includes('310')){ type='2' } const params = { username:user.Username, type, state:'1', } axios({ method: 'get', url: '/www/public/shangbao/exportzgxxx', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; //let name = type=='1'?'市及管理员账号' aLink.setAttribute('download', '直管校管理员账号.xls'); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, show(){ this.getList() this.$refs.baseDialogjs.show() }, getList(){ var that = this const params = { ...that.pages } $.get("/www/public/shangbao/findzgxxx", params, function(res){ if(res.success==1){ that.tableData = res.data that.total = res.total }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pageSize = val this.getList() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pageNo = val this.getList() }, handleClick(){}, handleClose(){ console.log(1) this.dialogVisible = false }, toggleSelection(rows) { if (rows) { rows.forEach(row => { this.$refs.multipleTable.toggleRowSelection(row); }); } else { this.$refs.multipleTable.clearSelection(); } }, handleSelectionChange(val) { this.multipleSelection = val; } }, computed:{ }, watch:{ }, created: function(){ }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XXYHomePage-view", function(resolve, reject){ var template = "
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n 取 消\n 确 定\n
\n
\n \n

\n 消防宣传进高校 新生齐学防火课 兰州消防消防宣传进高校 新生齐学防火课 兰州消防\n

\n

\n 发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间\n

\n

\n 发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间发布单位:甘南藏族自治州教育局 发布时间\n

\n \n \n \n
\n
\n
\n {{Nickname}}\n
\n
\n 欢迎您,{{glyxm}}!\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n

\n 机房检查\n

\n

\n 机房信息,一目了然\n

\n
\n
\n \n

\n 作答测试\n

\n

\n 教师自测,快速监测更安心\n

\n
\n
\n \n

\n 要求须知\n

\n

\n 要求须知,注意事项\n

\n
\n
\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { butList:[], active:0, tzggList:[], value:'', reverse: false, crq:'', rqList:[], currentList:[], glyxm:'', dialogVisible:false, dialogVisibleText:false, data:'', status:false, formLabelWidth: '120px', dataStatus:true, form: { jfsl: '', dnsl: '', sflw: '', xxdk: '', czxt: '', llqmc: '', sfydn: '', }, rules: { jfsl: [{ required: true, message: '机房数量不能为空', trigger: 'blur' }], dnsl: [{ required: true, message: '电脑数量不能为空', trigger: 'blur' }], sflw: [{ required: true, message: '是否联网不能为空', trigger: 'change' }], xxdk: [{ required: true, message: '下行带宽不能为空', trigger: 'blur' }], czxt: [{ required: true, message: '操作系统不能为空', trigger: 'blur' }], llqmc: [{ required: true, message: '浏览器名称不能为空', trigger: 'blur' }], sfydn: [{ required: true, message: '是否云电脑不能为空', trigger: 'change' }] } }; }, methods: { save() { const that = this that.$refs.formRef.validate((valid) => { if (valid) { const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data = { xxyid:that.dataStatus?id:'', ...that.form } $.post("/www/public/shangbao/addjfxx", data, function(res){ if(res.error==0){ that.$message.success('提交成功') that.dialogVisible =false }else{ that.$message.error(res.message) } }) } else { console.error('表单验证失败'); return false; } });}, jfjc(){ this.dialogVisible =true }, yqxz(){ this.dialogVisibleText=true }, goPage(url){ this.$router.push(url) }, getImgsrc:function(val) { return "/content/image/xljkImg/"+val }, getIndex(index){ this.active = index }, onPanelChange(value, mode) { console.log(value, mode); }, getDay(val){ if(this.rqList.length>0){ if(val.type=='current-month'){ //this.currentList.push(val.day) } if(val.type=='current-month'&&this.rqList.indexOf(val.day)>=0){ return true }else{ return false } } }, getDate(val){ //console.log(this.currentList) this.crq = val this.getdb() }, //获取待办 getdb:function(){ let that = this //$.post("/www/py/fwpt/test", {crq:this.crq}, function(res){ $.post("/www/py/fwpt/user_event", {crq:this.crq}, function(res){ if(res.success==1){ if(res.data.data){ that.tzggList = res.data.data that.rqList = res.data.rq } } }) }, //获取学段 getxxjd(){ var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID this.Nickname = user.Nickname const params1 = { schoolid } $.get("/www/public/shangbao/findschoolxd", params1, function(res){ if(res.success==1){ localStorage.setItem('xxjd',res.data.xd) }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, glyxmget(){ var glyInfo = localStorage.getItem('glyInfo')?JSON.parse(localStorage.getItem('glyInfo')):{} this.glyxm = glyInfo.glyxm } }, computed:{ }, created: function(){ const that = this const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data ={ xxyid : id } $.get("/www/public/shangbao/findjfxx", data, function(res){ if(res.error==0){ if(res.data == null){ that.dataStatus = false }else{ that.form = res.data } }else{ that.$message.error(res.message) } }) that.getdb() that.getxxjd() }, mounted: function(){ setTimeout(()=>{ this.glyxmget() },1000) }, props: ['title', 'data', 'config','isHeight'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDjibenzigeshenhe-view", function(resolve, reject){ var template = "
\n \n
\n
\n \n \n \n \n\n \n \n \n\n 批量通过 \n 通过剩余待审核学校\n 重新搜索\n 导出数据\n
\n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n

\n 请确认学校名称是否正确,名称有误时请更正\n

\n
\n
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n

\n 请确认学段是否正确\n

\n
\n
\n \n \n \n \n \n \n \n

\n
\n
\n \n
\n
\t\n
\n
\n\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), loading:false, dialogVisible: false, tableData: [], multipleSelection: [], currentPage1: 5, currentPage2: 5, currentPage3: 5, currentPage4: 4, innerVisible:false, activeName:'first', xxjd:'', xdMap:['','小学','初中','高中','中职','高职','高校',], searchVal:'', sfjj:'', total:0, pages:{ pageNo:1, pageSize:50 }, reruleForm: { sfmc:'',djsmc:'',qxmc:'',xxmc:'',xd:'',sfcz:'',sfcjcp:'' }, ruleForm: { sfmc:'',djsmc:'',qxmc:'',xxmc:'',xd:'',sfcz:'',sfcjcp:'' }, shenheForm:{conment:'',}, user:null, rules: { xxmc: [ { required: true, message: '请输入学校名称', trigger: 'blur' } ], sfcz: [ { required: true, message: '请选择', trigger: 'blur' } ], sfcjcp: [ { required: true, message: '请选择', trigger: 'blur' } ], }, isEdit:false } }, methods:{ chehui(row){ if(row.gzzcnt!=0){ this.$alert('学校已填写基本信息,无法撤回', '提示', { confirmButtonText: '确定', callback: action => { } }); return } var that = this const params = { schoolid:row.id, } $.post("/www/public/shangbao/editschooldycshch", params, function(res){ if(res.success==1){ that.$message.success('已撤回') that.getList() }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{ that.$message.error('请求错误') }) }, tongguoshenyufn(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID var type //type 1省 2市 3区县 if(user.Roles.includes('220')){ type='1' }else if(user.Roles.includes('310')){ type='2' }else if(user.Roles.includes('410')){ type='3' } const params = { type, username:user.Username } $.get("/www/public/shangbao/findjytshxx_all", params, function(res){ if(res.success==1){ that.getList() }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, tongguoshenyu(){ var that = this that.$alert('确认通过剩余所有学校吗', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', center: true }).then(() => { that.tongguoshenyufn() }).catch(() => { }); }, gosearch(){ this.pages.pageNo = 1 this.getList() }, gopiliang(){ var that = this that.$alert('确认批量通过吗', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', center: true }).then(() => { that.piliangshenhe() }).catch(() => { }); }, sfjjchange(val){ this.getList() }, chongzhi(){ this.searchVal = '' this.pages = { pageNo:1, pageSize:50 } this.getList() }, exportFn(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID var type //type 1省 2市 3区县 if(user.Roles.includes('220')){ type='1' }else if(user.Roles.includes('310')){ type='2' }else if(user.Roles.includes('410')){ type='3' } const params = { xxmc:this.searchVal, shzt:this.activeName=='first'?'0':this.activeName=='third'?'-1':'1', schoolid, username:user.Username, type, sfjj:that.sfjj, ...this.pages } if(this.activeName=='second'){ params.jbxxshcgzt = '1' } /*const params = { //zgdwbm:user.ID, shzt:that.activeName=='first'?'0':this.activeName=='second'?'1':'-1', type, username:user.Username }*/ axios({ method: 'get', url:'/www/public/shangbao/dcxxjcdshlist', params: { ...params }, responseType: 'blob' }).then(res=>{ if(res.request.status==200){ let data = res.data let binaryData = []; binaryData.push(res.data); var url= window.URL.createObjectURL(new Blob(binaryData)); var aLink = document.createElement('a'); aLink.href = url; aLink.setAttribute('download', '学校基本信息.xls'); // 设置下载的文件名 // 将a标签添加到DOM中并模拟点击事件以开始下载 document.body.appendChild(aLink); aLink.click(); // 下载完成后移除a标签元素(‌可选)‌ document.body.removeChild(aLink); this.$message.success('导出成功') }else{ this.$message.error('导出失败') } }).catch(err=>{ this.$message.error('导出失败') }) }, tongguo(item){ this.curItem = item this.$refs.baseDialogshenhe.show() }, changeTab(tab, event) { console.log(tab, event); this.searchVal = '' this.pages = { pageNo:1, pageSize:50 } this.getList() }, handlebeforeClose(){ this.$emit('closeDialog') }, onError(){}, handleEdit(row){ this.$refs.baseDialog1js.show() this.$nextTick(()=>{ this.$refs.ruleForm.resetFields() this.ruleForm = {...row} console.log(this.ruleForm) this.isEdit = true }) }, piliangshenhe(){ var that = this // this.$refs['shenheForm'].validate((valid) => { // if (valid) { const params = { shzt:'1' } params.ids = '' if(!that.multipleSelection.length) return this.$message.warning('请选择要审核的数据') that.multipleSelection.forEach(item=>{ params.ids+=item.id+',' }) if(params.ids.endsWith(',')){ params.ids = params.ids.substring(0,params.ids.length-1) } console.log( params,' params') $.post("/www/public/shangbao/xxyjsh", params, function(res){ if(res.success==1){ that.$message.success('审核成功') that.getList() }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{ that.$message.error('请求错误') }) }, submit(){ var that = this this.$refs['ruleForm'].validate((valid) => { if (valid) { var type = '1' if(that.ruleForm.sfcz=='2'){ type ='-1' }else{ if(that.ruleForm.sfcjcp=='2'){ type=-1 } } const params = { xxmc:that.ruleForm.xxmc, xd:that.ruleForm.xd, schoolid:that.ruleForm.id, sfcz:that.ruleForm.sfcz, sfcjcp:that.ruleForm.sfcjcp, type } $.post("/www/public/shangbao/editschooldycsh", params, function(res){ if(res.success==1){ that.$message.success('审核成功') that.$refs.baseDialog1js.close() that.getList() }else{ that.$message.success(res.message) } }).fail((xhr,status,error)=>{ that.$message.error('请求错误') }) } else { console.log('error submit!!'); return false; } }); }, show(){ this.getList() this.$refs.baseDialogjs.show() }, getList(){ var that = this var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} var schoolid = user.ID var type //type 1省 2市 3区县 if(user.Roles.includes('220')){ type='1' }else if(user.Roles.includes('310')){ type='2' }else if(user.Roles.includes('410')){ type='3' } const params = { xxmc:this.searchVal, shzt:this.activeName=='first'?'0':this.activeName=='third'?'-1':'', schoolid, username:user.Username, type, sfjj:that.sfjj, ...this.pages } if(this.activeName=='second'){ params.jbxxshcgzt = '1' } $.get("/www/public/shangbao/findjytshxx", params, function(res){ if(res.success==1){ that.tableData = res.data that.total = res.total }else{ this.$message.success(res.message) } }).fail((xhr,status,error)=>{}) }, handleConfirm(){ this.$refs.baseDialogjs.close() }, handleSizeChange(val) { console.log(`每页 ${val} 条`); this.pages.pageSize = val this.getList() }, handleCurrentChange(val) { console.log(`当前页: ${val}`); this.pages.pageNo = val this.getList() }, handleClick(){}, handleClose(){ console.log(1) this.dialogVisible = false }, toggleSelection(rows) { if (rows) { rows.forEach(row => { this.$refs.multipleTable.toggleRowSelection(row); }); } else { this.$refs.multipleTable.clearSelection(); } }, handleSelectionChange(val) { this.multipleSelection = val; } }, computed:{ isXCG(){ if(['1','2','3'].indexOf(this.ruleForm.xxjd)!=-1){ return true } return false } }, watch:{ }, created: function(){ this.user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} this.xxjd = localStorage.getItem('xxjd') this.getList() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDzigeshenhehome-view", function(resolve, reject){ var template = "\n
\n
\n \n
\n
\n \n \n
\n \n

\n 工作组信息审核\n

\n
\n
\n \n

\n 直管校上报信息审核\n

\n
\n \n
\n\n
\n
\n \n \n \n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), user:{}, type:'', }; }, methods: { confirm(){ if(this.type==1){ this.$router.push('/XDjibenzigeshenhe') }else if(this.type==2){ this.$router.push('/XDfangtanxinxishenhe') }else if(this.type==4){ this.$router.push('/zhiguanxiaoshenhe') } }, goshenhe(type){ this.type = type if(type==1){ this.$refs.baseDialogXDjddc.show() //this.$router.push('/XDjibenzigeshenhe') }else if(type==2){ this.$refs.baseDialogXDjddc.show() //this.$router.push('/XDfangtanxinxishenhe') }else if(type==3){ this.$router.push('/allgzzshenhe') }else if(type==4){ this.$refs.baseDialogXDjddc.show() }else if(type==5){ this.$router.push('/allgzzshenhe') } }, }, created: function(){ this.user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XXYevaluationList-view", function(resolve, reject){ var template = "
\n \n\n
\n
\n
\n
\n
\n \n
\n
\n 暂无内容\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n ● 进行中\n
\n
\n {{item.stmc}}\n
\n
\n
\n 答题角色 : {{jsMap[item.js]}}\n
\n \n
\n
\n \n
\n 请认真答题再提交。请仔细阅读每条测试项目,务必把意思弄明白理解清楚然后根据最近一周的实际感觉,选择最符合自己的选项。本测验共30道题预计用时5分钟左右。\n
\n
\n 是否签署参与测评同意书\n\n
\n
\n 进入测试系统\n
\n
\n
\n
\n 立即测评\n
\n
\n
\n
\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), dataList:[], Loading: false, visibleIntroduceDialog: false, checked:false, item:'', jsMap:{ '500':'学生', '720':'班主任(辅导员)', '710':'心理老师', '730':'校长', '700':'学科老师', '750':'信息员', } }; }, methods: { goTest(item){ this.$router.push({ path: 'beforeEvaluations', query: { gaugeId:item.sjid } }); }, dialog(item){ this.visibleIntroduceDialog = true this.item = item }, getImgsrc(val) { return "/content/image/xljkImg/"+val }, checkbox(){ this.$router.push('agger') }, getGaugelist(){ let that = this let data = { } $.post("/www/public/st/getstlist", data, function(res){ if(res.code==200){ that.dataList = res.data } }) }, }, created: function(){ let that = this that.getGaugelist() }, mounted: function(){ }, props: ['title', 'data', 'config'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-FTnav", function(resolve, reject){ var template = "
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n
\n 取 消\n 确 定\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n
\n 取 消\n 确 定\n
\n
\n
\n
\n \"\"/\n

\n 全国学生心理健康监测与服务平台\n

\n
\n
\n \n \"\"/\n \n

\n {{Nickname}}\n \n

\n \n 个人信息\n 修改密码\n 退出登录\n \n
\n\n
\n
\n
\n

\n \n 首页/{{currentPage}}\n

\n
\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), searchValue:'', dialogVisible:false, dialogVisibles:false, formLabelWidth: '130px', form: { xm: '', xb: '', sr: '', sjhm: '', yx: '', nl: '', qq: '', wx: '', qtlxdh: '', grsm: '', }, forms: { oldpassword: '', newpassword: '', confirmNewpassword: '' }, rules: { }, ruless: { oldpassword: [ { required: true, message: '请输入当前密码', trigger: 'blur' } ], newpassword: [ { required: true, message: '请输入新密码', trigger: 'blur' }, { pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,14}$/, message: '密码格式不符合要求,需包含字母、数字和特殊字符,长度8-14位', trigger: 'blur' } ], confirmNewpassword: [ { required: true, message: '请再次输入新密码', trigger: 'blur' }, { validator: this.validatePasswordMatch, trigger: 'blur' } ] } }; }, methods: { validatePasswordMatch(rule, value, callback) { if (value !== this.forms.newpassword) { callback(new Error('两次输入的新密码不一致')); } else { callback(); } }, formatDate(date) { const d = new Date(date); const year = d.getFullYear(); const month = ('0' + (d.getMonth() + 1)).slice(-2); const day = ('0' + d.getDate()).slice(-2); return `${year}-${month}-${day}`; }, save() { const that = this if (that.form.sr) { that.form.sr = that.formatDate(that.form.sr); } that.$refs.formRef.validate((valid) => { if (valid) { const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data = { ...that.form, } $.post("/www/public/shangbao/edituserinfo ", data, function(res){ if(res.error==0){ that.$message.success('提交成功') that.dialogVisible =false }else{ that.$message.error(res.message) } }) } else { console.error('表单验证失败'); return false; } });}, saves() { const that = this that.$refs.formRefs.validate((valid) => { if (valid) { const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data = { ...that.forms } $.post("/www/public/shangbao/editPassword", data, function(res){ if(res.error==0){ that.$message.success('修改成功') that.dialogVisible =false }else{ that.$message.error(res.message) } }) } else { console.error('表单验证失败'); return false; } });}, jfjc(){ this.dialogVisible =true }, jfjcs(){ this.dialogVisibles =true }, goHome(){ this.$router.push('FTXZ3') }, grxx(){}, xgmm(){}, logout(){ localStorage.removeItem('user') this.$router.replace('/login') } }, created: function(){ const that = this const id = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')).ID:'' let data ={ xxyid : id } $.get("/www/public/shangbao/finduserinfo", data, function(res){ if(res.error==0){ that.form = res.data }else{ that.$message.error(res.message) } }) }, mounted: function(){ }, computed:{ Nickname(){ var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} return user.Nickname } }, props: ['title', 'data', 'config','currentPage'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-JSHomepage-view", function(resolve, reject){ var template = "
\n
\n
\n
\n 您好,{{userInfo.Nickname}}老师~\n
\n
\n
\n
\n \n
\n
\n
\n\n
\n
\n
\n
\n \n
\n
\n
\n 学习要求\n
\n
\n 勤奋、专注、思考、实践\n
\n
\n
\n
\n
\n \n
\n
\n
\n 学习课程\n
\n
\n 应知应会,方能胜任\n
\n
\n
\n
\n
\n \n\n
\n
\n
\n 在线考试\n
\n
\n 冷静分析,沉着应对\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n 考试记录\n
\n
\n 即时记录,准确回顾\n
\n
\n
\n
\n
\n \n
\n
\n
\n 操作手册\n
\n
\n 详尽指南,一目了然\n
\n
\n
\n\n \n
\n
\n \n
\n
\n
\n 教师测评\n
\n
\n 精准评估,科学考量\n
\n
\n
\n\n\n
\n
\n\n
\n"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { butList:[], active:0, tzggList:[], value:'', reverse: false, crq:'', rqList:[], currentList:[], userInfo:{}, type:'', gzdwmc:'' }; }, methods: { jscp(){ this.$router.push('BZRevaluationList') }, gointerviewLS(status) { this.$router.push({ path: '/interviewLS', query: { status: status } }); }, gg(){ window.open('https://xinlijc.bnu.edu.cn/www/dd/vue/spa/xljk#/XDnotice','_blank') }, czsc(){ window.open('https://xinlijc.bnu.edu.cn/content/image/xljkImg/ftsc.pdf','_blank') }, kszs(){ const that =this let data = { } $.post("/www/public/shouye/px_ftlssy_zscx", data, function(res){ if(res.error==0){ window.open(res.data.url) }else{ that.$message.error(res.message) } }) }, ksft(){ const that = this console.log(that.type) if(that.type==1){ that.$router.push('interviewLS') } if(this.type==2){ that.$alert('该访谈员未完成培训无法开始访谈', '提示', { confirmButtonText: '确定', type: 'warning', callback: action => { } }); } }, routerPush(path){ this.$router.push(path) }, getImgsrc:function(val) { return "/content/image/xljkImg/"+val }, getIndex(index){ this.active = index }, onPanelChange(value, mode) { console.log(value, mode); }, getDay(val){ if(this.rqList.length>0){ if(val.type=='current-month'){ //this.currentList.push(val.day) } if(val.type=='current-month'&&this.rqList.indexOf(val.day)>=0){ return true }else{ return false } } }, getDate(val){ //console.log(this.currentList) this.crq = val this.getdb() }, //获取待办 getdb:function(){ let that = this //$.post("/www/py/fwpt/test", {crq:this.crq}, function(res){ $.post("/www/py/fwpt/user_event", {crq:this.crq}, function(res){ if(res.success==1){ if(res.data.data){ that.tzggList = res.data.data that.rqList = res.data.rq } } }) }, }, created: function(){ let that = this that.getdb() that.userInfo =localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} $.post("/www/public/shouye/px_fty_sfftls", {}, function(res){ that.gzdwmc = res.data.gzdwmc that.type=res.data.type }) }, mounted: function(){ }, props: ['title', 'data', 'config','isHeight'] }) }) })(template, resolve, reject); }); RegVueCom("xljk-XDpublicNoticeDialog", function(resolve, reject){ var template = "
\n \n
\n
\n \"\"/\n

\n 通知公告\n

\n
\n
\n \n\n

*标题

\n \n \n \n \n \n

*发布范围

\n \n

\n \n 点击添加\n \n \n

\n {{item.xxmc}}\n
\n
\n\n
\n\n \n 短信提醒\n \n \n 附件上传\n \n\n\n
\n
\n
\n
\n
\n
\n 发布\n
\n
\n\n
\n
\n \n
\n \n \n
\n
\n 确定\n
\n\n
\n\n
"; return (function(template, resolve, reject){ seajs.use([], function(){ return resolve({ template: template, data: function(){ return { id: Math.uuid(), cur:null, listData:[], value2:'', form:{name:'',stulist:[],ftdz:'',date:''}, loading:false, checkList:[], stuList:[], curIndex1:0, editor:null, fileList:[], filesArr:[], html:'', checkedKeys:[], checkedNodes:[], ruleForm:{ otitle:'',// 标题, oabstract: '',//摘要, type:'',// 类型, ocontent:'',// 正文, roles:'',// 发布者, sfbj:'',// 是否本级, sfxjdw:'',// 是否下级单位, sfxqnxx:'',// 是否辖区内学校, sids:'',// 教育厅 xxids:'',// 学校 sfdx:'',// 是否短信提醒, files:'',// 附件对象 fanwei:'', checked:false }, data1: [ { id: '1', xxmc: '本级单位', firstlevel:true }, { id: '2', xxmc: '下级单位', firstlevel:true, children: [] }, { id: '3', xxmc: '辖区学校', firstlevel:true, children: [] }], defaultProps: { children: 'children', label: 'xxmc' }, showallstu:false, rules: { otitle: [ { required: true, message: '请输入标题', trigger: 'blur' } ], oabstract: [ { required: true, message: '请输入摘要', trigger: 'blur' } ], type: [ { required: true, message: '请选公告择类型', trigger: 'change' } ], }, }; }, methods: { beforeClose(){ this.ruleForm = { otitle:'',// 标题, oabstract: '',//摘要, type:'',// 类型, ocontent:'',// 正文, roles:'',// 发布者, sfbj:'',// 是否本级, sfxjdw:'',// 是否下级单位, sfxqnxx:'',// 是否辖区内学校, sids:'',// 教育厅 xxids:'',// 学校 sfdx:'',// 是否短信提醒, files:'',// 附件对象 fanwei:'', checked:false } this.fileList = [] this.filesArr = [] this.html = '' this.checkedKeys = [] this.checkedNodes = [] }, show(){ var user = localStorage.getItem('user')?JSON.parse(localStorage.getItem('user')):{} if(user.Roles.includes('450')){ this.data1 = [ { id: '1', xxmc: '本级单位', firstlevel:true }, { id: '4', xxmc: '全体老师', firstlevel:true, children:[ { id: '700', xxmc: '任课老师', }, { id: '710', xxmc: '心理老师', }, { id: '720', xxmc: '班主任(辅导员)', }, { id: '730', xxmc: '学校负责人', }, { id: '810', xxmc: '访谈老师', }, ] }, ] }else{ this.getXiajidanwei() } this.getSchoolList() this.$refs.baseDialogXDpublicNoticeDialog.show() this.$nextTick(()=>{ var that = this const { createEditor, createToolbar } = window.wangEditor const editorConfig = { placeholder: '正文...', onChange(editor) { var html = editor.getHtml() that.html = html console.log('editor content', html) // 也可以同步到