处方管理功能,测试项目分类功能,全国平均成绩
This commit is contained in:
parent
4199ddef14
commit
46852f4a41
54
src/api/system/testItemCountryScore.js
Normal file
54
src/api/system/testItemCountryScore.js
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询全国平均成绩列表
|
||||||
|
export function listTestItemCountryScore(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/testItemCountryScore/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 查询项目列表
|
||||||
|
export function testItemslist(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/testItems/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询全国平均成绩详细
|
||||||
|
export function getTestItemCountryScore(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/testItemCountryScore/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增全国平均成绩
|
||||||
|
export function addTestItemCountryScore(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/testItemCountryScore/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改全国平均成绩
|
||||||
|
export function updateTestItemCountryScore(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/testItemCountryScore/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除全国平均成绩
|
||||||
|
export function delTestItemCountryScore(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/testItemCountryScore/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
742
src/views/system/testItemCountryScore/index.vue
Normal file
742
src/views/system/testItemCountryScore/index.vue
Normal file
@ -0,0 +1,742 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="所属项目" prop="itemId">
|
||||||
|
<!-- this.queryParams.itemName=null -->
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.itemName"
|
||||||
|
placeholder="请输入所属项目"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="测试项目平均成绩" label-width="200">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.itemAvgScore"
|
||||||
|
placeholder="请输入测试项目平均成绩"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:testItemCountryScore:add']"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:testItemCountryScore:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:testItemCountryScore:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:testItemCountryScore:export']"
|
||||||
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="testItemCountryScoreList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||||
|
<el-table-column label="所属项目" align="center" prop="itemName" />
|
||||||
|
<el-table-column label="测试项目平均成绩" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.dictValue == "number" ? scope.row.itemAvgScore : "" }}
|
||||||
|
{{ scope.row.dictValue == "text" ? scope.row.itemAvgText : "" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:testItemCountryScore:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:testItemCountryScore:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!--修改全国平均成绩对话框 -->
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="open2"
|
||||||
|
width="550px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px"
|
||||||
|
style=""
|
||||||
|
>
|
||||||
|
<el-form-item label="所属项目" prop="itemId">
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
@click="innerVisible = true"
|
||||||
|
v-if="xmname == '请选择所属项目'"
|
||||||
|
style="
|
||||||
|
width: 360px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
padding-left: -10px;
|
||||||
|
"
|
||||||
|
>{{ xmname }}</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
@click="innerVisible = true"
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 360px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
"
|
||||||
|
>{{ xmname }}</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item
|
||||||
|
label="测试项目平均成绩"
|
||||||
|
prop="itemAvgScore"
|
||||||
|
key="itemAvgScore"
|
||||||
|
v-if="form.dictValue == 'number'"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model.number="form.itemAvgScore"
|
||||||
|
style="width:360px"
|
||||||
|
placeholder="请输入平均成绩"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="测试项目平均成绩"
|
||||||
|
prop="itemAvgText"
|
||||||
|
key="itemAvgText"
|
||||||
|
v-if="form.dictValue == 'text'"
|
||||||
|
>
|
||||||
|
<el-input v-model="form.itemAvgText" placeholder="请输入平均成绩" style="width:360px"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel2">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 添加全国平均成绩对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="550px" append-to-body>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form2"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px"
|
||||||
|
style=""
|
||||||
|
>
|
||||||
|
<el-form-item label="所属项目" prop="itemId">
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
@click="innerVisible = true"
|
||||||
|
v-if="xmname == '请选择所属项目'"
|
||||||
|
style="
|
||||||
|
width: 360px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
padding-left: -10px;
|
||||||
|
"
|
||||||
|
>{{ xmname }}</el-button
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
@click="innerVisible = true"
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 360px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
"
|
||||||
|
>{{ xmname }}</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="测试项目平均成绩"
|
||||||
|
prop="itemAvgScore"
|
||||||
|
v-if="form2.resultDictType == ''"
|
||||||
|
>
|
||||||
|
<el-input placeholder="请输入测试项目平均成绩" style="width: 360px" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item
|
||||||
|
label="测试项目平均成绩"
|
||||||
|
prop="itemAvgScore"
|
||||||
|
v-else-if="form2.resultDictType == 'number'"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model.number="form2.itemAvgScore"
|
||||||
|
placeholder="请输入测试项目平均成绩"
|
||||||
|
style="width: 360px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item
|
||||||
|
label="测试项目平均成绩"
|
||||||
|
prop="itemAvgText"
|
||||||
|
v-else-if="form2.resultDictType == 'text'"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="form2.itemAvgText"
|
||||||
|
placeholder="请输入测试项目平均成绩"
|
||||||
|
style="width: 360px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 项目弹窗 -->
|
||||||
|
<el-dialog
|
||||||
|
width="850px"
|
||||||
|
title="选择所属项目"
|
||||||
|
:visible.sync="innerVisible"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
:model="queryParams2"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="90px"
|
||||||
|
>
|
||||||
|
<el-form-item label="项目名称" prop="itemName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams2.itemName"
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery2"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-table :data="testItemslists">
|
||||||
|
<el-table-column label="请选择" width="70" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
v-if="itemId2 == scope.row.id"
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
circle
|
||||||
|
@click="xmclick(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
circle
|
||||||
|
@click="xmclick(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
property="itemName"
|
||||||
|
label="项目名称"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="字典类型"
|
||||||
|
align="center"
|
||||||
|
prop="resultDictType"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{
|
||||||
|
scope.row.resultDictType == ResultType1.dictCode
|
||||||
|
? ResultType1.dictLabel
|
||||||
|
: ""
|
||||||
|
}}{{
|
||||||
|
scope.row.resultDictType == ResultType2.dictCode
|
||||||
|
? ResultType2.dictLabel
|
||||||
|
: ""
|
||||||
|
}}</template
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="itemCode"
|
||||||
|
label="测试项目编号"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="itemContent"
|
||||||
|
label="项目内容"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="mesureUnit"
|
||||||
|
label="项目度量单位"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="largeStandardScore"
|
||||||
|
label="大班标准最高得分"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="middleStandardScore"
|
||||||
|
label="中班标准最高得分"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="smallStandardScore"
|
||||||
|
label="小班标准最高得分"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="unifiedStandardScore"
|
||||||
|
label="统一标准最高得分"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="sorting"
|
||||||
|
label="排序"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="remark"
|
||||||
|
label="项目概述"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="createBy"
|
||||||
|
label="创建人"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="createTime"
|
||||||
|
label="创建时间"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="updateBy"
|
||||||
|
label="修改人"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="updateTime"
|
||||||
|
label="修改时间"
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total2 > 0"
|
||||||
|
:total="total2"
|
||||||
|
:page.sync="queryParams2.pageNum"
|
||||||
|
:limit.sync="queryParams2.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
listTestItemCountryScore,
|
||||||
|
getTestItemCountryScore,
|
||||||
|
delTestItemCountryScore,
|
||||||
|
addTestItemCountryScore,
|
||||||
|
updateTestItemCountryScore,
|
||||||
|
testItemslist,
|
||||||
|
} from "@/api/system/testItemCountryScore";
|
||||||
|
import { tKindergartenInfo } from "@/api/system/kindergartenInfo";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "TestItemCountryScore",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
//项目测试类型
|
||||||
|
itemResultType: "item_result_type",
|
||||||
|
//字典类型
|
||||||
|
itemResultTypelist: [],
|
||||||
|
ResultType1: "", //numberLeixing
|
||||||
|
ResultType2: "", //textleixing
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
innerVisible: false,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
//xiangmuname
|
||||||
|
xmname: "请选择所属项目",
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
total2: 0,
|
||||||
|
//xiangmu
|
||||||
|
testItemslists: [],
|
||||||
|
// 全国平均成绩表格数据
|
||||||
|
testItemCountryScoreList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
open2: false,
|
||||||
|
|
||||||
|
// 查询参数
|
||||||
|
itemId2:"",
|
||||||
|
itemId: "",
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
itemName: null,
|
||||||
|
},
|
||||||
|
queryParams2: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
itemCategoryId: "",
|
||||||
|
itemName: "",
|
||||||
|
itemCode: "",
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
form2: {},
|
||||||
|
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
itemId: [{ required: true }],
|
||||||
|
itemAvgScore: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
type: "number",
|
||||||
|
message: "必须填入数字",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
itemAvgText: [
|
||||||
|
{ required: true, message: "请输入全市平均成绩", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
xmclick(row) {
|
||||||
|
console.log(row);
|
||||||
|
this.xmname = row.itemName;
|
||||||
|
this.itemId2 = row.id;
|
||||||
|
this.form.itemId = row.id;
|
||||||
|
this.form2.itemId = row.id;
|
||||||
|
this.innerVisible = false;
|
||||||
|
this.form.itemName = row.itemName;
|
||||||
|
if (row.resultDictType == this.ResultType1.dictCode) {
|
||||||
|
this.form2.resultDictType = this.ResultType1.dictValue;
|
||||||
|
this.form.dictValue = this.ResultType1.dictValue;
|
||||||
|
this.form2.itemAvgText = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (row.resultDictType == this.ResultType2.dictCode) {
|
||||||
|
this.form2.resultDictType = this.ResultType2.dictValue;
|
||||||
|
this.form.dictValue = this.ResultType2.dictValue;
|
||||||
|
this.form.itemAvgScore = "";
|
||||||
|
this.form2.itemAvgScore = "";
|
||||||
|
}
|
||||||
|
console.log(this.form);
|
||||||
|
console.log(this.form2);
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 查询全国平均成绩列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
testItemslist(this.queryParams2).then((res) => {
|
||||||
|
this.testItemslists = res.rows;
|
||||||
|
console.log(this.testItemslists);
|
||||||
|
this.total2 = res.total;
|
||||||
|
});
|
||||||
|
listTestItemCountryScore(this.queryParams).then((response) => {
|
||||||
|
this.testItemCountryScoreList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
tKindergartenInfo(this.itemResultType).then((res) => {
|
||||||
|
// console.log(res);
|
||||||
|
this.itemResultTypelist = res.data;
|
||||||
|
this.ResultType1 = this.itemResultTypelist[0];
|
||||||
|
this.ResultType2 = this.itemResultTypelist[1];
|
||||||
|
// console.log(this.ResultType1);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel2() {
|
||||||
|
this.open2 = false;
|
||||||
|
this.xmname = "请选择所属项目";
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.xmname = "请选择所属项目";
|
||||||
|
this.itemId2 = "";
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
itemId: null,
|
||||||
|
itemAvgScore: "",
|
||||||
|
itemAvgText: "",
|
||||||
|
resultDictType: "", //number text
|
||||||
|
};
|
||||||
|
this.form2 = {
|
||||||
|
itemId: null,
|
||||||
|
itemAvgScore: "",
|
||||||
|
itemAvgText: "",
|
||||||
|
resultDictType: "", //number text
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery2() {
|
||||||
|
this.queryParams2.pageNum = 1;
|
||||||
|
testItemslist(this.queryParams).then((response) => {
|
||||||
|
this.testItemslist = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
this.handleQuery2();
|
||||||
|
this.queryParams.itemName = "";
|
||||||
|
},
|
||||||
|
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map((item) => item.id);
|
||||||
|
this.single = selection.length !== 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加全国平均成绩";
|
||||||
|
this.itemId2 = "";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.itemId2 = row.itemId;
|
||||||
|
// console.log(row);
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getTestItemCountryScore(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.xmname = row.itemName;
|
||||||
|
this.open2 = true;
|
||||||
|
this.title = "修改全国平均成绩";
|
||||||
|
console.log(this.form);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
if (this.form.dictValue == this.ResultType1.dictValue) {
|
||||||
|
console.log(this.ResultType1.dictValue);
|
||||||
|
this.form.itemAvgText = "";
|
||||||
|
}
|
||||||
|
if (this.form.dictValue == this.ResultType2.dictValue) {
|
||||||
|
console.log(this.ResultType2.dictValue);
|
||||||
|
this.form.itemAvgScore = "";
|
||||||
|
}
|
||||||
|
console.log(this.form);
|
||||||
|
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateTestItemCountryScore(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open2 = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addTestItemCountryScore(this.form2).then((response) => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
this.itemId2 = "";
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal
|
||||||
|
.confirm("是否确认删除全国平均成绩的数据项?")
|
||||||
|
.then(function () {
|
||||||
|
return delTestItemCountryScore(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download(
|
||||||
|
"system/testItemCountryScore/export",
|
||||||
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`testItemCountryScore_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user