评估优化
This commit is contained in:
parent
ab9fab9465
commit
09462d74a5
@ -28,6 +28,7 @@ import 'video.js/dist/video-js.css';
|
|||||||
import 'vue-video-player/src/custom-theme.css';
|
import 'vue-video-player/src/custom-theme.css';
|
||||||
import Print from '@/utils/print'
|
import Print from '@/utils/print'
|
||||||
import PrintECharts from '@/utils/print_echarts'
|
import PrintECharts from '@/utils/print_echarts'
|
||||||
|
import { preventReClick } from '@/utils/plugins';
|
||||||
// 全局方法挂载
|
// 全局方法挂载
|
||||||
Vue.prototype.getDicts = getDicts
|
Vue.prototype.getDicts = getDicts
|
||||||
Vue.prototype.getConfigKey = getConfigKey
|
Vue.prototype.getConfigKey = getConfigKey
|
||||||
|
17
ruoyi-ui/src/utils/plugins.js
Normal file
17
ruoyi-ui/src/utils/plugins.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
|
||||||
|
// 防止重复提交指令
|
||||||
|
const preventReClick = Vue.directive('preventReClick', {
|
||||||
|
inserted (el, binding) {
|
||||||
|
el.addEventListener('click', () => {
|
||||||
|
if (!el.disabled) {
|
||||||
|
el.disabled = true
|
||||||
|
setTimeout(() => {
|
||||||
|
el.disabled = false
|
||||||
|
}, binding.value || 3000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
export { preventReClick }
|
@ -14,6 +14,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="submitForm"
|
@click="submitForm"
|
||||||
v-hasPermi="['benyi:assessmentchild:add']"
|
v-hasPermi="['benyi:assessmentchild:add']"
|
||||||
|
v-prevent-re-click
|
||||||
>生成图表</el-button
|
>生成图表</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@ -39,7 +40,7 @@
|
|||||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
v-for="itemLy in assessmentcontentList.filter(
|
v-for="itemLy in assessmentcontentList.filter(
|
||||||
p => p.parentId == this.assessmentscope
|
(p) => p.parentId == this.assessmentscope
|
||||||
)"
|
)"
|
||||||
:key="itemLy.id"
|
:key="itemLy.id"
|
||||||
:label="itemLy.name"
|
:label="itemLy.name"
|
||||||
@ -49,7 +50,7 @@
|
|||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
class="block"
|
class="block"
|
||||||
v-for="itemFzly in assessmentcontentList.filter(
|
v-for="itemFzly in assessmentcontentList.filter(
|
||||||
p => p.parentId == itemLy.id
|
(p) => p.parentId == itemLy.id
|
||||||
)"
|
)"
|
||||||
:key="itemFzly.id"
|
:key="itemFzly.id"
|
||||||
>
|
>
|
||||||
@ -59,7 +60,7 @@
|
|||||||
<ul class="block-content">
|
<ul class="block-content">
|
||||||
<li
|
<li
|
||||||
v-for="itemMb in assessmentcontentList.filter(
|
v-for="itemMb in assessmentcontentList.filter(
|
||||||
p => p.parentId == itemFzly.id
|
(p) => p.parentId == itemFzly.id
|
||||||
)"
|
)"
|
||||||
:key="itemMb.id"
|
:key="itemMb.id"
|
||||||
>
|
>
|
||||||
@ -69,15 +70,12 @@
|
|||||||
<div
|
<div
|
||||||
class="checkbox-content"
|
class="checkbox-content"
|
||||||
v-for="itemYs in assessmentcontentList.filter(
|
v-for="itemYs in assessmentcontentList.filter(
|
||||||
p => p.parentId == itemMb.id
|
(p) => p.parentId == itemMb.id
|
||||||
)"
|
)"
|
||||||
:key="itemYs.id"
|
:key="itemYs.id"
|
||||||
>
|
>
|
||||||
<p class="checkbox-item flex align-center">
|
<p class="checkbox-item flex align-center">
|
||||||
<el-checkbox-group
|
<el-checkbox-group v-model="checkList">
|
||||||
v-model="checkList"
|
|
||||||
@change="handlecheckedItemsChange"
|
|
||||||
>
|
|
||||||
<el-checkbox :label="itemYs.id" :key="itemYs.id">{{
|
<el-checkbox :label="itemYs.id" :key="itemYs.id">{{
|
||||||
itemYs.name
|
itemYs.name
|
||||||
}}</el-checkbox>
|
}}</el-checkbox>
|
||||||
@ -159,14 +157,11 @@ import {
|
|||||||
delAssessmentcontent,
|
delAssessmentcontent,
|
||||||
addAssessmentcontent,
|
addAssessmentcontent,
|
||||||
updateAssessmentcontent,
|
updateAssessmentcontent,
|
||||||
exportAssessmentcontent
|
exportAssessmentcontent,
|
||||||
} from "@/api/benyi/assessmentcontent";
|
} from "@/api/benyi/assessmentcontent";
|
||||||
|
|
||||||
import { getChildByAssessment } from "@/api/benyi/child";
|
import { getChildByAssessment } from "@/api/benyi/child";
|
||||||
import {
|
import { addAssessmentchild } from "@/api/benyi/assessmentchild";
|
||||||
addAssessmentchild,
|
|
||||||
updateAssessmentchild
|
|
||||||
} from "@/api/benyi/assessmentchild";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Assessmentstudent",
|
name: "Assessmentstudent",
|
||||||
@ -195,11 +190,11 @@ export default {
|
|||||||
name: undefined,
|
name: undefined,
|
||||||
iselement: undefined,
|
iselement: undefined,
|
||||||
scope: undefined,
|
scope: undefined,
|
||||||
sort: undefined
|
sort: undefined,
|
||||||
},
|
},
|
||||||
activeName: "健康",
|
activeName: "健康",
|
||||||
checked: false,
|
checked: false,
|
||||||
checkList: []
|
checkList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -211,7 +206,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getChild(childId) {
|
getChild(childId) {
|
||||||
getChildByAssessment(childId).then(response => {
|
getChildByAssessment(childId).then((response) => {
|
||||||
// console.log(response);
|
// console.log(response);
|
||||||
if (response.code == "200") {
|
if (response.code == "200") {
|
||||||
this.childName = response.data.name;
|
this.childName = response.data.name;
|
||||||
@ -220,7 +215,7 @@ export default {
|
|||||||
this.bjmc = response.data.bjmc;
|
this.bjmc = response.data.bjmc;
|
||||||
this.classid = response.data.classid;
|
this.classid = response.data.classid;
|
||||||
this.zbjsxm = response.data.zbjsmc;
|
this.zbjsxm = response.data.zbjsmc;
|
||||||
response.ByAssessmentchild.forEach(item =>
|
response.ByAssessmentchild.forEach((item) =>
|
||||||
this.checkList.push(item.contentid)
|
this.checkList.push(item.contentid)
|
||||||
);
|
);
|
||||||
if (response.isAssessment == "0") {
|
if (response.isAssessment == "0") {
|
||||||
@ -237,7 +232,7 @@ export default {
|
|||||||
/** 查询评估内容列表 */
|
/** 查询评估内容列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listAssessmentcontent(this.queryParams).then(response => {
|
listAssessmentcontent(this.queryParams).then((response) => {
|
||||||
// console.log("rows:" + response.rows);
|
// console.log("rows:" + response.rows);
|
||||||
this.assessmentcontentList = response.rows;
|
this.assessmentcontentList = response.rows;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -258,16 +253,16 @@ export default {
|
|||||||
// this.resetForm("form");
|
// this.resetForm("form");
|
||||||
// },
|
// },
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function () {
|
||||||
this.$confirm("确认生成图表数据?生成后数据不能取消", "警告", {
|
this.$confirm("确认生成图表数据?生成后数据不能取消", "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
callback: action => {
|
callback: (action) => {
|
||||||
if (action === "confirm") {
|
if (action === "confirm") {
|
||||||
// console.log('按下 确定')
|
// console.log('按下 确定')
|
||||||
var items = "";
|
var items = "";
|
||||||
this.checkList.forEach(item => {
|
this.checkList.forEach((item) => {
|
||||||
//当全选被选中的时候,循环遍历源数据,把数据的每一项加入到默认选中的数组去
|
//当全选被选中的时候,循环遍历源数据,把数据的每一项加入到默认选中的数组去
|
||||||
items = items + item + ",";
|
items = items + item + ",";
|
||||||
});
|
});
|
||||||
@ -282,29 +277,33 @@ export default {
|
|||||||
this.form.type = "Y";
|
this.form.type = "Y";
|
||||||
this.form.xn = this.trem;
|
this.form.xn = this.trem;
|
||||||
this.form.scope = this.assessmentscope;
|
this.form.scope = this.assessmentscope;
|
||||||
addAssessmentchild(this.form).then(response => {
|
addAssessmentchild(this.form).then((response) => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.msgSuccess("评估成功");
|
this.msgSuccess("评估成功");
|
||||||
|
this.$router.push({
|
||||||
|
path:
|
||||||
|
"/benyi/assessmentchildhistory/student/" + this.childId,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleClick(tab) {
|
handleClick(tab) {
|
||||||
// this.activeName = tab
|
// this.activeName = tab
|
||||||
},
|
},
|
||||||
handlecheckedItemsChange(value) {
|
// handlecheckedItemsChange(value) {
|
||||||
// var items = "";
|
// // var items = "";
|
||||||
// this.checkList.forEach((item) => {
|
// // this.checkList.forEach((item) => {
|
||||||
// //当全选被选中的时候,循环遍历源数据,把数据的每一项加入到默认选中的数组去
|
// // //当全选被选中的时候,循环遍历源数据,把数据的每一项加入到默认选中的数组去
|
||||||
// items = items + item + ",";
|
// // items = items + item + ",";
|
||||||
// });
|
// // });
|
||||||
// console.log(items);
|
// // console.log(items);
|
||||||
}
|
// },
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -111,8 +111,12 @@ public class ByAssessmentchildController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (iCount > 0) {
|
||||||
|
return toAjax(iCount);
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error("选择的评估数据无变化");
|
||||||
|
}
|
||||||
|
|
||||||
return toAjax(iCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<if test="classid != null and classid != ''">and classid = #{classid}</if>
|
<if test="classid != null and classid != ''">and classid = #{classid}</if>
|
||||||
<if test="contentid != null ">and contentid = #{contentid}</if>
|
<if test="contentid != null ">and contentid = #{contentid}</if>
|
||||||
<if test="type != null and type != ''">and type = #{type}</if>
|
<if test="type != null and type != ''">and type = #{type}</if>
|
||||||
<if test="xn != null and xn != ''">and xn = #{xn}</if>
|
<!-- <if test="xn != null and xn != ''">and xn = #{xn}</if>-->
|
||||||
<if test="userid != null ">and userid = #{userid}</if>
|
<if test="userid != null ">and userid = #{userid}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user