|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
<el-row>
|
|
<el-row>
|
|
- <!--用户数据1-->
|
|
|
|
|
|
+ <!--用户数据-->
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
<el-form-item label="任务名称" prop="userName">
|
|
<el-form-item label="任务名称" prop="userName">
|
|
<el-input
|
|
<el-input
|
|
@@ -103,12 +103,12 @@
|
|
|
|
|
|
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
|
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
- <el-table-column label="编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
|
|
|
|
- <el-table-column label="任务名称" align="center" key="mingc" prop="mingc" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
|
|
|
- <el-table-column label="模拟器型号" align="center" key="mingc" prop="mingc" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
|
|
|
|
|
+ <el-table-column label="编号" align="center" key="taskId" prop="taskId" v-if="columns[0].visible" />
|
|
|
|
+ <el-table-column label="任务名称" align="center" key="name" prop="name" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
|
|
|
+ <el-table-column label="模拟器型号" align="center" key="simType" prop="simType" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
|
<el-table-column label="故障现象数量" align="center" key="xianxiang" prop="xianxiang" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
|
<el-table-column label="故障现象数量" align="center" key="xianxiang" prop="xianxiang" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
|
<el-table-column label="故障部位数量" align="center" key="buwei" prop="buwei" v-if="columns[4].visible" :show-overflow-tooltip="true" />
|
|
<el-table-column label="故障部位数量" align="center" key="buwei" prop="buwei" v-if="columns[4].visible" :show-overflow-tooltip="true" />
|
|
- <el-table-column label="创建者" align="center" key="creater" prop="creater" v-if="columns[5].visible" :show-overflow-tooltip="true" />
|
|
|
|
|
|
+ <el-table-column label="创建者" align="center" key="createBy" prop="createBy" v-if="columns[5].visible" :show-overflow-tooltip="true" />
|
|
<el-table-column label="备注" align="center" key="remark" prop="remark" v-if="columns[6].visible" :show-overflow-tooltip="true" />
|
|
<el-table-column label="备注" align="center" key="remark" prop="remark" v-if="columns[6].visible" :show-overflow-tooltip="true" />
|
|
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[7].visible" width="160">
|
|
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[7].visible" width="160">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -134,7 +134,7 @@
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
@click="handleDelete(scope.row)"
|
|
>删除</el-button>
|
|
>删除</el-button>
|
|
-
|
|
|
|
|
|
+
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -153,14 +153,10 @@
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="型号">
|
|
|
|
- <!-- v-model="form.monitype" -->
|
|
|
|
- <el-select v-model="selectedEquip" placeholder="请选择模拟器型号">
|
|
|
|
- <el-option
|
|
|
|
- value="请选择"
|
|
|
|
- >请选择</el-option>
|
|
|
|
|
|
+ <el-form-item label="型号" prop="simType">
|
|
|
|
+ <el-select v-model="form.simType" placeholder="请选择模拟器型号" @change="selectSimType">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in dict.type.sim_equip_type"
|
|
|
|
|
|
+ v-for="dict in dict.type.sim_sim_type"
|
|
:key="dict.value"
|
|
:key="dict.value"
|
|
:label="dict.label"
|
|
:label="dict.label"
|
|
:value="dict.value"
|
|
:value="dict.value"
|
|
@@ -169,8 +165,8 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="任务名称" prop="userName">
|
|
|
|
- <el-input placeholder="请输入任务名称" maxlength="30" />
|
|
|
|
|
|
+ <el-form-item label="任务名称" prop="name">
|
|
|
|
+ <el-input placeholder="请输入任务名称" v-model="form.name"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<div style="text-align: right;">
|
|
<div style="text-align: right;">
|
|
@@ -178,11 +174,10 @@
|
|
<el-button @click="toggleSelection()">取消选择</el-button>
|
|
<el-button @click="toggleSelection()">取消选择</el-button>
|
|
</div>
|
|
</div>
|
|
</el-row>
|
|
</el-row>
|
|
-
|
|
|
|
-
|
|
|
|
- <el-table
|
|
|
|
- :data="tableData" border ref="multipleTable" @selection-change="handleSelectionRow"
|
|
|
|
- :span-method="objectSpanMethod"
|
|
|
|
|
|
+
|
|
|
|
+ <el-table
|
|
|
|
+ :data="tableData" border ref="multipleTable" @selection-change="handleSelectionRow"
|
|
|
|
+ :span-method="objectSpanMethod"
|
|
style="width:100%;text-align:center;margin-left:10px; margin-top:10px">
|
|
style="width:100%;text-align:center;margin-left:10px; margin-top:10px">
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="xinghao"
|
|
prop="xinghao"
|
|
@@ -213,8 +208,7 @@
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="型号">
|
|
|
|
- <!-- v-model="form.monitype" -->
|
|
|
|
|
|
+ <el-form-item label="型号" prop="simType">
|
|
<el-select v-model="selectedEquip" placeholder="请选择模拟器型号">
|
|
<el-select v-model="selectedEquip" placeholder="请选择模拟器型号">
|
|
<el-option
|
|
<el-option
|
|
value="请选择"
|
|
value="请选择"
|
|
@@ -238,11 +232,11 @@
|
|
<el-button @click="toggleSelection()">取消选择</el-button>
|
|
<el-button @click="toggleSelection()">取消选择</el-button>
|
|
</div>
|
|
</div>
|
|
</el-row>
|
|
</el-row>
|
|
-
|
|
|
|
-
|
|
|
|
- <el-table
|
|
|
|
- :data="tableData" border ref="multipleTable" @selection-change="handleSelectionRow"
|
|
|
|
- :span-method="objectSpanMethod"
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <el-table
|
|
|
|
+ :data="tableData" border ref="multipleTable" @selection-change="handleSelectionRow"
|
|
|
|
+ :span-method="objectSpanMethod"
|
|
style="width:100%;text-align:center;margin-left:10px; margin-top:10px">
|
|
style="width:100%;text-align:center;margin-left:10px; margin-top:10px">
|
|
<el-table-column
|
|
<el-table-column
|
|
prop="xinghao"
|
|
prop="xinghao"
|
|
@@ -268,8 +262,6 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
<!-- 故障设置自检 -->
|
|
<!-- 故障设置自检 -->
|
|
<el-dialog :title="title" :visible.sync="zijianopen" width="88%" append-to-body>
|
|
<el-dialog :title="title" :visible.sync="zijianopen" width="88%" append-to-body>
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
@@ -281,7 +273,7 @@
|
|
value="请选择"
|
|
value="请选择"
|
|
>请选择</el-option>
|
|
>请选择</el-option>
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in dict.type.sim_equip_type"
|
|
|
|
|
|
+ v-for="dict in dict.type.sim_sim_type"
|
|
:key="dict.value"
|
|
:key="dict.value"
|
|
:label="dict.label"
|
|
:label="dict.label"
|
|
:value="dict.value"
|
|
:value="dict.value"
|
|
@@ -470,7 +462,7 @@
|
|
<el-button @click="cancel">取 消</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
-
|
|
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<style>
|
|
<style>
|
|
@@ -482,178 +474,175 @@
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
<script>
|
|
<script>
|
|
-import { listStudent, getStudent, delStudent, addStudent, updateStudent } from "@/api/sim/student";
|
|
|
|
|
|
+import { listTask,simTypeTask,addTask,updateTask,delTask,getTask } from "@/api/sim/task";
|
|
import { getToken } from "@/utils/auth";
|
|
import { getToken } from "@/utils/auth";
|
|
-import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "Task",
|
|
name: "Task",
|
|
- dicts: ['sim_equip_type'],
|
|
|
|
- components: { Treeselect },
|
|
|
|
|
|
+ dicts: ['sim_sim_type'],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
multipleSelection: [],
|
|
multipleSelection: [],
|
|
selectedEquip: '',
|
|
selectedEquip: '',
|
|
selectedZjEquip: '',
|
|
selectedZjEquip: '',
|
|
tableData: [
|
|
tableData: [
|
|
- {
|
|
|
|
- ids:1,
|
|
|
|
- xinghao: 'FZD04B型侦毒器',
|
|
|
|
- xianxiang: '开机无响应',
|
|
|
|
- name: '1.电源开关',
|
|
|
|
- },{
|
|
|
|
- ids:2,
|
|
|
|
- name: '2.DC/DC转换芯片',
|
|
|
|
- },{
|
|
|
|
- ids:3,
|
|
|
|
- xianxiang: '开机后按抽气开关,微电机不工作',
|
|
|
|
- name: '3.微电机',
|
|
|
|
- },{
|
|
|
|
- ids:4,
|
|
|
|
- name: '4.Q2',
|
|
|
|
- },{
|
|
|
|
- ids:5,
|
|
|
|
- xianxiang: '抽气流量不足',
|
|
|
|
- name: '5.滤网',
|
|
|
|
- },{
|
|
|
|
- ids:6,
|
|
|
|
- name: '6.调速电位器',
|
|
|
|
- },{
|
|
|
|
- ids:7,
|
|
|
|
- xianxiang: '开机后按下加热开关,加热灯不亮,也未加热',
|
|
|
|
- name: '7.加热指示灯',
|
|
|
|
- },{
|
|
|
|
- ids:8,
|
|
|
|
- name: '8.热敏开关',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- ids:9,
|
|
|
|
- xianxiang: '不能正常工作',
|
|
|
|
- name: '9.外壳及零件',
|
|
|
|
- },{
|
|
|
|
- ids:10,
|
|
|
|
- xianxiang: '电压低',
|
|
|
|
- name: '10.供电模块',
|
|
|
|
- },{
|
|
|
|
- ids:11,
|
|
|
|
- xianxiang: '抽气指示灯不亮',
|
|
|
|
- name: '11.抽气指示灯',
|
|
|
|
- },
|
|
|
|
|
|
+ // {
|
|
|
|
+ // ids:1,
|
|
|
|
+ // xinghao: 'FZD04B型侦毒器',
|
|
|
|
+ // xianxiang: '开机无响应',
|
|
|
|
+ // name: '1.电源开关',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:2,
|
|
|
|
+ // name: '2.DC/DC转换芯片',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:3,
|
|
|
|
+ // xianxiang: '开机后按抽气开关,微电机不工作',
|
|
|
|
+ // name: '3.微电机',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:4,
|
|
|
|
+ // name: '4.Q2',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:5,
|
|
|
|
+ // xianxiang: '抽气流量不足',
|
|
|
|
+ // name: '5.滤网',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:6,
|
|
|
|
+ // name: '6.调速电位器',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:7,
|
|
|
|
+ // xianxiang: '开机后按下加热开关,加热灯不亮,也未加热',
|
|
|
|
+ // name: '7.加热指示灯',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:8,
|
|
|
|
+ // name: '8.热敏开关',
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // ids:9,
|
|
|
|
+ // xianxiang: '不能正常工作',
|
|
|
|
+ // name: '9.外壳及零件',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:10,
|
|
|
|
+ // xianxiang: '电压低',
|
|
|
|
+ // name: '10.供电模块',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:11,
|
|
|
|
+ // xianxiang: '抽气指示灯不亮',
|
|
|
|
+ // name: '11.抽气指示灯',
|
|
|
|
+ // },
|
|
|
|
|
|
- {
|
|
|
|
- ids:21,
|
|
|
|
- xinghao:'FZB006型毒剂报警器',
|
|
|
|
- xianxiang: '仪器无法开机',
|
|
|
|
- name: '1.薄膜开关FPC排线',
|
|
|
|
- },{
|
|
|
|
- ids:22,
|
|
|
|
- name: '2.主控板开机电路',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- ids:23,
|
|
|
|
- xianxiang: '蜂鸣器自检时,声音异常',
|
|
|
|
- name: '3.蜂鸣器出声口',
|
|
|
|
- },{
|
|
|
|
- ids:24,
|
|
|
|
- name: '4.接口接线板',
|
|
|
|
- },{
|
|
|
|
- ids:25,
|
|
|
|
- xianxiang: '仪器进入检测界面后,通入检测剂不报警',
|
|
|
|
- name: '5.检测剂',
|
|
|
|
- },{
|
|
|
|
- ids:26,
|
|
|
|
- name: '6.主控板信号采集电路',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- ids:27,
|
|
|
|
- xianxiang: '显示屏无显示',
|
|
|
|
- name: '7.主控板显示屏供电电路',
|
|
|
|
- },{
|
|
|
|
- ids:28,
|
|
|
|
- name: '8.显示屏',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- ids:29,
|
|
|
|
- xianxiang: '长时间不进入“检测中”',
|
|
|
|
- name: '9.干燥管',
|
|
|
|
- },{
|
|
|
|
- ids:210,
|
|
|
|
- name: '10.维护管',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- ids:211,
|
|
|
|
- xianxiang: '不能正常工作',
|
|
|
|
- name: '11.外壳及零件',
|
|
|
|
- },{
|
|
|
|
- ids:212,
|
|
|
|
- xianxiang: '电压低',
|
|
|
|
- name: '12.供电模块',
|
|
|
|
- },{
|
|
|
|
- ids:213,
|
|
|
|
- xianxiang: '无法开机',
|
|
|
|
- name: '13.DC/DC',
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- {
|
|
|
|
- ids:31,
|
|
|
|
- xinghao: '防化兵用毒剂报警器',
|
|
|
|
- xianxiang: '仪器无法开机',
|
|
|
|
- name: '1.FFC排线',
|
|
|
|
- },{
|
|
|
|
- ids:32,
|
|
|
|
- name: '2.汇总主控板',
|
|
|
|
- },{
|
|
|
|
- ids:33,
|
|
|
|
- xianxiang: '开机后,显示屏无显示',
|
|
|
|
- name: '3.显控报警板',
|
|
|
|
- },{
|
|
|
|
- ids:34,
|
|
|
|
- name: '4.显示屏',
|
|
|
|
- },{
|
|
|
|
- ids:35,
|
|
|
|
- xianxiang: '检测状态下模拟剂不报警',
|
|
|
|
- name: '5.汇总主控板信号采集电路',
|
|
|
|
- },{
|
|
|
|
- ids:36,
|
|
|
|
- name: '6.检测剂',
|
|
|
|
- },{
|
|
|
|
- ids:37,
|
|
|
|
- xianxiang: '长时间不能进入检测状态',
|
|
|
|
- name: '7.干燥管',
|
|
|
|
- },{
|
|
|
|
- ids:38,
|
|
|
|
- name: '8.维护管',
|
|
|
|
- },{
|
|
|
|
- ids:39,
|
|
|
|
- xianxiang: '固液检测/气体检测模式切换失败',
|
|
|
|
- name: '9.固液检测单元与主控板连接线',
|
|
|
|
- },{
|
|
|
|
- ids:310,
|
|
|
|
- name: '10.汇总主控板固液通信电路',
|
|
|
|
- },{
|
|
|
|
- ids:311,
|
|
|
|
- name: '11.切换按键',
|
|
|
|
- },{
|
|
|
|
- ids:312,
|
|
|
|
- xianxiang: '有毒有害气体检测模块不报警',
|
|
|
|
- name: '12.高压驱动板与汇总主控板连接线',
|
|
|
|
- },{
|
|
|
|
- ids:313,
|
|
|
|
- name: '13.汇总主控板毒害模块通信电路',
|
|
|
|
- },{
|
|
|
|
- ids:314,
|
|
|
|
- xianxiang: '不能正常工作',
|
|
|
|
- name: '14.外壳及零件',
|
|
|
|
- },{
|
|
|
|
- ids:315,
|
|
|
|
- xianxiang: '电压低',
|
|
|
|
- name: '15.供电模块',
|
|
|
|
- },{
|
|
|
|
- ids:316,
|
|
|
|
- xianxiang: '无法开机',
|
|
|
|
- name: '16.DC/DC',
|
|
|
|
- },
|
|
|
|
|
|
+ // {
|
|
|
|
+ // ids:21,
|
|
|
|
+ // xinghao:'FZB006型毒剂报警器',
|
|
|
|
+ // xianxiang: '仪器无法开机',
|
|
|
|
+ // name: '1.薄膜开关FPC排线',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:22,
|
|
|
|
+ // name: '2.主控板开机电路',
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // ids:23,
|
|
|
|
+ // xianxiang: '蜂鸣器自检时,声音异常',
|
|
|
|
+ // name: '3.蜂鸣器出声口',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:24,
|
|
|
|
+ // name: '4.接口接线板',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:25,
|
|
|
|
+ // xianxiang: '仪器进入检测界面后,通入检测剂不报警',
|
|
|
|
+ // name: '5.检测剂',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:26,
|
|
|
|
+ // name: '6.主控板信号采集电路',
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // ids:27,
|
|
|
|
+ // xianxiang: '显示屏无显示',
|
|
|
|
+ // name: '7.主控板显示屏供电电路',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:28,
|
|
|
|
+ // name: '8.显示屏',
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // ids:29,
|
|
|
|
+ // xianxiang: '长时间不进入“检测中”',
|
|
|
|
+ // name: '9.干燥管',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:210,
|
|
|
|
+ // name: '10.维护管',
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // ids:211,
|
|
|
|
+ // xianxiang: '不能正常工作',
|
|
|
|
+ // name: '11.外壳及零件',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:212,
|
|
|
|
+ // xianxiang: '电压低',
|
|
|
|
+ // name: '12.供电模块',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:213,
|
|
|
|
+ // xianxiang: '无法开机',
|
|
|
|
+ // name: '13.DC/DC',
|
|
|
|
+ // },
|
|
|
|
+
|
|
|
|
+ // {
|
|
|
|
+ // ids:31,
|
|
|
|
+ // xinghao: '防化兵用毒剂报警器',
|
|
|
|
+ // xianxiang: '仪器无法开机',
|
|
|
|
+ // name: '1.FFC排线',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:32,
|
|
|
|
+ // name: '2.汇总主控板',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:33,
|
|
|
|
+ // xianxiang: '开机后,显示屏无显示',
|
|
|
|
+ // name: '3.显控报警板',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:34,
|
|
|
|
+ // name: '4.显示屏',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:35,
|
|
|
|
+ // xianxiang: '检测状态下模拟剂不报警',
|
|
|
|
+ // name: '5.汇总主控板信号采集电路',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:36,
|
|
|
|
+ // name: '6.检测剂',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:37,
|
|
|
|
+ // xianxiang: '长时间不能进入检测状态',
|
|
|
|
+ // name: '7.干燥管',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:38,
|
|
|
|
+ // name: '8.维护管',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:39,
|
|
|
|
+ // xianxiang: '固液检测/气体检测模式切换失败',
|
|
|
|
+ // name: '9.固液检测单元与主控板连接线',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:310,
|
|
|
|
+ // name: '10.汇总主控板固液通信电路',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:311,
|
|
|
|
+ // name: '11.切换按键',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:312,
|
|
|
|
+ // xianxiang: '有毒有害气体检测模块不报警',
|
|
|
|
+ // name: '12.高压驱动板与汇总主控板连接线',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:313,
|
|
|
|
+ // name: '13.汇总主控板毒害模块通信电路',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:314,
|
|
|
|
+ // xianxiang: '不能正常工作',
|
|
|
|
+ // name: '14.外壳及零件',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:315,
|
|
|
|
+ // xianxiang: '电压低',
|
|
|
|
+ // name: '15.供电模块',
|
|
|
|
+ // },{
|
|
|
|
+ // ids:316,
|
|
|
|
+ // xianxiang: '无法开机',
|
|
|
|
+ // name: '16.DC/DC',
|
|
|
|
+ // },
|
|
],
|
|
],
|
|
tableData1: [{
|
|
tableData1: [{
|
|
gzxx: '开机无响应',
|
|
gzxx: '开机无响应',
|
|
@@ -802,7 +791,7 @@ export default {
|
|
name7:7,
|
|
name7:7,
|
|
name8:7,
|
|
name8:7,
|
|
name9:7,
|
|
name9:7,
|
|
- name10:7,
|
|
|
|
|
|
+ name10:7,
|
|
value1:1,
|
|
value1:1,
|
|
value2:1,
|
|
value2:1,
|
|
value3:2,
|
|
value3:2,
|
|
@@ -1208,8 +1197,8 @@ export default {
|
|
value9:1,
|
|
value9:1,
|
|
value10:1,
|
|
value10:1,
|
|
},
|
|
},
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
{
|
|
{
|
|
gzxx: '仪器无法开机',
|
|
gzxx: '仪器无法开机',
|
|
buwei: '1.FFC排线',
|
|
buwei: '1.FFC排线',
|
|
@@ -1572,7 +1561,7 @@ export default {
|
|
value9:1,
|
|
value9:1,
|
|
value10:2,
|
|
value10:2,
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
],
|
|
],
|
|
// 遮罩层
|
|
// 遮罩层
|
|
loading: true,
|
|
loading: true,
|
|
@@ -1609,26 +1598,13 @@ export default {
|
|
// 角色选项
|
|
// 角色选项
|
|
roleOptions: [],
|
|
roleOptions: [],
|
|
// 表单参数
|
|
// 表单参数
|
|
- form: {},
|
|
|
|
|
|
+ form: {
|
|
|
|
+ simType:''
|
|
|
|
+ },
|
|
defaultProps: {
|
|
defaultProps: {
|
|
children: "children",
|
|
children: "children",
|
|
label: "label"
|
|
label: "label"
|
|
},
|
|
},
|
|
- // 用户导入参数
|
|
|
|
- upload: {
|
|
|
|
- // 是否显示弹出层(用户导入)
|
|
|
|
- open: false,
|
|
|
|
- // 弹出层标题(用户导入)
|
|
|
|
- title: "",
|
|
|
|
- // 是否禁用上传
|
|
|
|
- isUploading: false,
|
|
|
|
- // 是否更新已经存在的用户数据
|
|
|
|
- updateSupport: 0,
|
|
|
|
- // 设置上传的请求头部
|
|
|
|
- headers: { Authorization: "Bearer " + getToken() },
|
|
|
|
- // 上传的地址
|
|
|
|
- url: process.env.VUE_APP_BASE_API + "/simulator/user/importData"
|
|
|
|
- },
|
|
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParams: {
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -1651,6 +1627,13 @@ export default {
|
|
],
|
|
],
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {
|
|
rules: {
|
|
|
|
+ name: [
|
|
|
|
+ { required: true, message: "任务名称不能为空", trigger: "blur" },
|
|
|
|
+ ],
|
|
|
|
+ simType: [
|
|
|
|
+ { required: true, message: "模拟器型号不能为空", trigger: "change"}
|
|
|
|
+ ],
|
|
|
|
+
|
|
}
|
|
}
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -1659,172 +1642,6 @@ export default {
|
|
deptName(val) {
|
|
deptName(val) {
|
|
this.$refs.tree.filter(val);
|
|
this.$refs.tree.filter(val);
|
|
},
|
|
},
|
|
- selectedEquip(newValue) {
|
|
|
|
- // console.log(newValue);
|
|
|
|
- // 根据newValue更新tableData
|
|
|
|
- // this.tableData = this.getNewTableData(newValue);
|
|
|
|
- // console.log(this.getNewTableData(newValue);
|
|
|
|
- if(newValue == 1){
|
|
|
|
- this.tableData = [{
|
|
|
|
- ids:1,
|
|
|
|
- xinghao: 'FZD04B型侦毒器',
|
|
|
|
- xianxiang: '开机无响应',
|
|
|
|
- name: '1.电源开关',
|
|
|
|
- },{
|
|
|
|
- ids:2,
|
|
|
|
- name: '2.DC/DC转换芯片',
|
|
|
|
- },{
|
|
|
|
- ids:3,
|
|
|
|
- xianxiang: '开机后按抽气开关,微电机不工作',
|
|
|
|
- name: '3.微电机',
|
|
|
|
- },{
|
|
|
|
- ids:4,
|
|
|
|
- name: '4.Q2',
|
|
|
|
- },{
|
|
|
|
- ids:5,
|
|
|
|
- xianxiang: '抽气流量不足',
|
|
|
|
- name: '5.滤网',
|
|
|
|
- },{
|
|
|
|
- ids:6,
|
|
|
|
- name: '6.调速电位器',
|
|
|
|
- },{
|
|
|
|
- ids:7,
|
|
|
|
- xianxiang: '开机后按下加热开关,加热灯不亮,也未加热',
|
|
|
|
- name: '7.加热指示灯',
|
|
|
|
- },{
|
|
|
|
- ids:8,
|
|
|
|
- name: '8.热敏开关',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- ids:9,
|
|
|
|
- xianxiang: '不能正常工作',
|
|
|
|
- name: '9.外壳及零件',
|
|
|
|
- },{
|
|
|
|
- ids:10,
|
|
|
|
- xianxiang: '电压低',
|
|
|
|
- name: '10.供电模块',
|
|
|
|
- },{
|
|
|
|
- ids:11,
|
|
|
|
- xianxiang: '抽气指示灯不亮',
|
|
|
|
- name: '11.抽气指示灯',
|
|
|
|
- }];
|
|
|
|
- }else if(newValue == 2){
|
|
|
|
- this.tableData = [{
|
|
|
|
- ids:21,
|
|
|
|
- xinghao:'FZB006型毒剂报警器',
|
|
|
|
- xianxiang: '仪器无法开机',
|
|
|
|
- name: '1.薄膜开关FPC排线',
|
|
|
|
- },{
|
|
|
|
- ids:22,
|
|
|
|
- name: '2.主控板开机电路',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- ids:23,
|
|
|
|
- xianxiang: '蜂鸣器自检时,声音异常',
|
|
|
|
- name: '3.蜂鸣器出声口',
|
|
|
|
- },{
|
|
|
|
- ids:24,
|
|
|
|
- name: '4.接口接线板',
|
|
|
|
- },{
|
|
|
|
- ids:25,
|
|
|
|
- xianxiang: '仪器进入检测界面后,通入检测剂不报警',
|
|
|
|
- name: '5.检测剂',
|
|
|
|
- },{
|
|
|
|
- ids:26,
|
|
|
|
- name: '6.主控板信号采集电路',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- ids:27,
|
|
|
|
- xianxiang: '显示屏无显示',
|
|
|
|
- name: '7.主控板显示屏供电电路',
|
|
|
|
- },{
|
|
|
|
- ids:28,
|
|
|
|
- name: '8.显示屏',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- ids:29,
|
|
|
|
- xianxiang: '长时间不进入“检测中”',
|
|
|
|
- name: '9.干燥管',
|
|
|
|
- },{
|
|
|
|
- ids:210,
|
|
|
|
- name: '10.维护管',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- ids:211,
|
|
|
|
- xianxiang: '不能正常工作',
|
|
|
|
- name: '11.外壳及零件',
|
|
|
|
- },{
|
|
|
|
- ids:212,
|
|
|
|
- xianxiang: '电压低',
|
|
|
|
- name: '12.供电模块',
|
|
|
|
- },{
|
|
|
|
- ids:213,
|
|
|
|
- xianxiang: '无法开机',
|
|
|
|
- name: '13.DC/DC',
|
|
|
|
- }]
|
|
|
|
- }else if(newValue == 3){
|
|
|
|
- this.tableData = [{
|
|
|
|
- ids:31,
|
|
|
|
- xinghao: '防化兵用毒剂报警器',
|
|
|
|
- xianxiang: '仪器无法开机',
|
|
|
|
- name: '1.FFC排线',
|
|
|
|
- },{
|
|
|
|
- ids:32,
|
|
|
|
- name: '2.汇总主控板',
|
|
|
|
- },{
|
|
|
|
- ids:33,
|
|
|
|
- xianxiang: '开机后,显示屏无显示',
|
|
|
|
- name: '3.显控报警板',
|
|
|
|
- },{
|
|
|
|
- ids:34,
|
|
|
|
- name: '4.显示屏',
|
|
|
|
- },{
|
|
|
|
- ids:35,
|
|
|
|
- xianxiang: '检测状态下模拟剂不报警',
|
|
|
|
- name: '5.汇总主控板信号采集电路',
|
|
|
|
- },{
|
|
|
|
- ids:36,
|
|
|
|
- name: '6.检测剂',
|
|
|
|
- },{
|
|
|
|
- ids:37,
|
|
|
|
- xianxiang: '长时间不能进入检测状态',
|
|
|
|
- name: '7.干燥管',
|
|
|
|
- },{
|
|
|
|
- ids:38,
|
|
|
|
- name: '8.维护管',
|
|
|
|
- },{
|
|
|
|
- ids:39,
|
|
|
|
- xianxiang: '固液检测/气体检测模式切换失败',
|
|
|
|
- name: '9.固液检测单元与主控板连接线',
|
|
|
|
- },{
|
|
|
|
- ids:310,
|
|
|
|
- name: '10.汇总主控板固液通信电路',
|
|
|
|
- },{
|
|
|
|
- ids:311,
|
|
|
|
- name: '11.切换按键',
|
|
|
|
- },{
|
|
|
|
- ids:312,
|
|
|
|
- xianxiang: '有毒有害气体检测模块不报警',
|
|
|
|
- name: '12.高压驱动板与汇总主控板连接线',
|
|
|
|
- },{
|
|
|
|
- ids:313,
|
|
|
|
- name: '13.汇总主控板毒害模块通信电路',
|
|
|
|
- },{
|
|
|
|
- ids:314,
|
|
|
|
- xianxiang: '不能正常工作',
|
|
|
|
- name: '14.外壳及零件',
|
|
|
|
- },{
|
|
|
|
- ids:315,
|
|
|
|
- xianxiang: '电压低',
|
|
|
|
- name: '15.供电模块',
|
|
|
|
- },{
|
|
|
|
- ids:316,
|
|
|
|
- xianxiang: '无法开机',
|
|
|
|
- name: '16.DC/DC',
|
|
|
|
- }]
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
selectedZjEquip(newValue) {
|
|
selectedZjEquip(newValue) {
|
|
// console.log(newValue);
|
|
// console.log(newValue);
|
|
// 根据newValue更新tableData
|
|
// 根据newValue更新tableData
|
|
@@ -1978,7 +1795,7 @@ export default {
|
|
name7:7,
|
|
name7:7,
|
|
name8:7,
|
|
name8:7,
|
|
name9:7,
|
|
name9:7,
|
|
- name10:7,
|
|
|
|
|
|
+ name10:7,
|
|
value1:1,
|
|
value1:1,
|
|
value2:1,
|
|
value2:1,
|
|
value3:2,
|
|
value3:2,
|
|
@@ -2750,12 +2567,41 @@ export default {
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getList();
|
|
this.getList();
|
|
- //this.getDeptTree();
|
|
|
|
- this.getConfigKey("sys.user.initPassword").then(response => {
|
|
|
|
- this.initPassword = response.msg;
|
|
|
|
- });
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 选择型号,循环故障清单
|
|
|
|
+ selectSimType(val){
|
|
|
|
+ console.log(val);
|
|
|
|
+ console.log('newValue');
|
|
|
|
+ simTypeTask(val).then(response => {
|
|
|
|
+ console.log(response.data)
|
|
|
|
+ console.log('response')
|
|
|
|
+ // let jsonString = '';
|
|
|
|
+ // const obj = {};
|
|
|
|
+ // for (let i = 0; i < 6; i++) {
|
|
|
|
+ // obj[i] = response.data.selectedData[i]['name'];
|
|
|
|
+ // }
|
|
|
|
+ // console.log(obj)
|
|
|
|
+ // jsonString = JSON.stringify(obj);
|
|
|
|
+
|
|
|
|
+ const arr = [];
|
|
|
|
+ arr['ids'] = 1;
|
|
|
|
+ arr['xinghao'] = 'FZD04B型侦毒器';
|
|
|
|
+ arr['xianxiang'] = '开机无响应';
|
|
|
|
+ arr['name'] = '1.电源开关';
|
|
|
|
+ console.log(arr);
|
|
|
|
+ console.log(JSON.stringify(arr));
|
|
|
|
+ this.tableData = arr;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // {
|
|
|
|
+ // ids:1,
|
|
|
|
+ // xinghao: 'FZD04B型侦毒器',
|
|
|
|
+ // xianxiang: '开机无响应',
|
|
|
|
+ // name: '1.电源开关',
|
|
|
|
+ // },
|
|
|
|
+
|
|
|
|
+ },
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
// console.log(this.selectedEquip+'@@@')
|
|
// console.log(this.selectedEquip+'@@@')
|
|
//第一列型号
|
|
//第一列型号
|
|
@@ -2793,7 +2639,7 @@ export default {
|
|
return { rowspan: 1, colspan: 1 };
|
|
return { rowspan: 1, colspan: 1 };
|
|
}else{
|
|
}else{
|
|
return { rowspan: 0, colspan: 0 };
|
|
return { rowspan: 0, colspan: 0 };
|
|
- }
|
|
|
|
|
|
+ }
|
|
}else if(this.selectedEquip==3){
|
|
}else if(this.selectedEquip==3){
|
|
if(rowIndex<7 && rowIndex % 2 === 0){
|
|
if(rowIndex<7 && rowIndex % 2 === 0){
|
|
return { rowspan: 2, colspan: 1 };
|
|
return { rowspan: 2, colspan: 1 };
|
|
@@ -2805,7 +2651,7 @@ export default {
|
|
return { rowspan: 1, colspan: 1 };
|
|
return { rowspan: 1, colspan: 1 };
|
|
}else{
|
|
}else{
|
|
return { rowspan: 0, colspan: 0 };
|
|
return { rowspan: 0, colspan: 0 };
|
|
- }
|
|
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
if(rowIndex<7 && rowIndex % 2 === 0){
|
|
if(rowIndex<7 && rowIndex % 2 === 0){
|
|
return { rowspan: 2, colspan: 1 };
|
|
return { rowspan: 2, colspan: 1 };
|
|
@@ -2821,14 +2667,14 @@ export default {
|
|
return { rowspan: 0, colspan: 0 };
|
|
return { rowspan: 0, colspan: 0 };
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
//故障部位 和 选择
|
|
//故障部位 和 选择
|
|
if(columnIndex === 2 || columnIndex === 3){
|
|
if(columnIndex === 2 || columnIndex === 3){
|
|
//return { rowspan: 1, colspan: 1 };
|
|
//return { rowspan: 1, colspan: 1 };
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
|
|
objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
|
|
//第二列故障现象
|
|
//第二列故障现象
|
|
if(columnIndex === 0) {
|
|
if(columnIndex === 0) {
|
|
@@ -2847,13 +2693,6 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 根据选择的option获取新的数据
|
|
|
|
- // getNewTableData(option) {
|
|
|
|
- // // 逻辑处理返回新的数据数组
|
|
|
|
- // return [
|
|
|
|
- // // ...新数据
|
|
|
|
- // ];
|
|
|
|
- // },
|
|
|
|
toggleSelection(rows) {
|
|
toggleSelection(rows) {
|
|
if (rows) {
|
|
if (rows) {
|
|
rows.forEach(row => {
|
|
rows.forEach(row => {
|
|
@@ -2871,7 +2710,7 @@ export default {
|
|
/** 查询用户列表 */
|
|
/** 查询用户列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- listStudent(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
|
|
|
|
+ listTask(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
//将返回值注释
|
|
//将返回值注释
|
|
this.userList = response.rows;
|
|
this.userList = response.rows;
|
|
this.total = response.total;
|
|
this.total = response.total;
|
|
@@ -2890,22 +2729,6 @@ export default {
|
|
if (!value) return true;
|
|
if (!value) return true;
|
|
return data.label.indexOf(value) !== -1;
|
|
return data.label.indexOf(value) !== -1;
|
|
},
|
|
},
|
|
- // 节点单击事件
|
|
|
|
- handleNodeClick(data) {
|
|
|
|
- this.queryParams.deptId = data.id;
|
|
|
|
- this.handleQuery();
|
|
|
|
- },
|
|
|
|
- // 用户状态修改
|
|
|
|
- handleStatusChange(row) {
|
|
|
|
- let text = row.status === "0" ? "启用" : "停用";
|
|
|
|
- this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function() {
|
|
|
|
- return changeUserStatus(row.userId, row.status);
|
|
|
|
- }).then(() => {
|
|
|
|
- this.$modal.msgSuccess(text + "成功");
|
|
|
|
- }).catch(function() {
|
|
|
|
- row.status = row.status === "0" ? "1" : "0";
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
//清除故障
|
|
//清除故障
|
|
clearFaultChange(row,number,nametext){
|
|
clearFaultChange(row,number,nametext){
|
|
console.log()
|
|
console.log()
|
|
@@ -2934,18 +2757,11 @@ export default {
|
|
// 表单重置
|
|
// 表单重置
|
|
reset() {
|
|
reset() {
|
|
this.form = {
|
|
this.form = {
|
|
- userId: undefined,
|
|
|
|
- deptId: undefined,
|
|
|
|
- userName: undefined,
|
|
|
|
- nickName: undefined,
|
|
|
|
- password: undefined,
|
|
|
|
- phonenumber: undefined,
|
|
|
|
- email: undefined,
|
|
|
|
- sex: undefined,
|
|
|
|
- status: "0",
|
|
|
|
- remark: undefined,
|
|
|
|
- postIds: [],
|
|
|
|
- roleIds: []
|
|
|
|
|
|
+ taskId: undefined,
|
|
|
|
+ name: undefined,
|
|
|
|
+ simType:undefined,
|
|
|
|
+ // postIds: [],
|
|
|
|
+ // roleIds: []
|
|
};
|
|
};
|
|
this.resetForm("form");
|
|
this.resetForm("form");
|
|
},
|
|
},
|
|
@@ -2964,7 +2780,7 @@ export default {
|
|
},
|
|
},
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
- this.ids = selection.map(item => item.userId);
|
|
|
|
|
|
+ this.ids = selection.map(item => item.taskId);
|
|
this.single = selection.length != 1;
|
|
this.single = selection.length != 1;
|
|
this.multiple = !selection.length;
|
|
this.multiple = !selection.length;
|
|
},
|
|
},
|
|
@@ -2983,19 +2799,14 @@ export default {
|
|
},
|
|
},
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
handleAdd() {
|
|
-
|
|
|
|
|
|
+ // this.$tab.openPage("用户管理", "/system/user");
|
|
this.reset();
|
|
this.reset();
|
|
- // getUser().then(response => {
|
|
|
|
- // this.postOptions = response.posts;
|
|
|
|
- // this.roleOptions = response.roles;
|
|
|
|
- this.open = true;
|
|
|
|
- this.title = "新增训练任务";
|
|
|
|
- this.form.password = this.initPassword;
|
|
|
|
- // });
|
|
|
|
|
|
+ this.open = true;
|
|
|
|
+ this.title = "新增训练任务";
|
|
},
|
|
},
|
|
/* 故障设置自检 **/
|
|
/* 故障设置自检 **/
|
|
handleInspect() {
|
|
handleInspect() {
|
|
- //this.reset();
|
|
|
|
|
|
+ this.reset();
|
|
// getUser().then(response => {
|
|
// getUser().then(response => {
|
|
//this.postOptions = response.posts;
|
|
//this.postOptions = response.posts;
|
|
//this.roleOptions = response.roles;
|
|
//this.roleOptions = response.roles;
|
|
@@ -3007,65 +2818,40 @@ export default {
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
this.reset();
|
|
this.reset();
|
|
- const userId = row.userId || this.ids;
|
|
|
|
- getUser(userId).then(response => {
|
|
|
|
|
|
+ const taskId = row.taskId || this.ids;
|
|
|
|
+ getTask(taskId).then(response => {
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
- this.postOptions = response.posts;
|
|
|
|
- this.roleOptions = response.roles;
|
|
|
|
- this.$set(this.form, "postIds", response.postIds);
|
|
|
|
- this.$set(this.form, "roleIds", response.roleIds);
|
|
|
|
|
|
+ // this.postOptions = response.posts;
|
|
|
|
+ // this.roleOptions = response.roles;
|
|
|
|
+ // this.$set(this.form, "postIds", response.postIds);
|
|
|
|
+ // this.$set(this.form, "roleIds", response.roleIds);
|
|
this.open = true;
|
|
this.open = true;
|
|
- this.title = "修改用户";
|
|
|
|
- this.form.password = "";
|
|
|
|
|
|
+ this.title = "修改任务";
|
|
|
|
+ // this.form.password = "";
|
|
});
|
|
});
|
|
},
|
|
},
|
|
/** 详情按钮操作 */
|
|
/** 详情按钮操作 */
|
|
handleView(row) {
|
|
handleView(row) {
|
|
this.reset();
|
|
this.reset();
|
|
- const userId = row.userId || this.ids;
|
|
|
|
- getUser(userId).then(response => {
|
|
|
|
|
|
+ const taskId = row.taskId || this.ids;
|
|
|
|
+ getUser(taskId).then(response => {
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
this.openview = true;
|
|
this.openview = true;
|
|
this.title = "任务详情";
|
|
this.title = "任务详情";
|
|
});
|
|
});
|
|
},
|
|
},
|
|
-
|
|
|
|
- /** 重置密码按钮操作 */
|
|
|
|
- handleResetPwd(row) {
|
|
|
|
- this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- closeOnClickModal: false,
|
|
|
|
- inputPattern: /^.{5,20}$/,
|
|
|
|
- inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
|
|
|
|
- inputValidator: (value) => {
|
|
|
|
- if (/<|>|"|'|\||\\/.test(value)) {
|
|
|
|
- return "不能包含非法字符:< > \" ' \\\ |"
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- }).then(({ value }) => {
|
|
|
|
- resetUserPwd(row.userId, value).then(response => {
|
|
|
|
- this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
|
|
|
- });
|
|
|
|
- }).catch(() => {});
|
|
|
|
- },
|
|
|
|
- /** 分配角色操作 */
|
|
|
|
- handleAuthRole: function(row) {
|
|
|
|
- const userId = row.userId;
|
|
|
|
- this.$router.push("/simulator/user-auth/role/" + userId);
|
|
|
|
- },
|
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm: function() {
|
|
submitForm: function() {
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- if (this.form.userId != undefined) {
|
|
|
|
- updateUser(this.form).then(response => {
|
|
|
|
|
|
+ if (this.form.taskId != undefined) {
|
|
|
|
+ updateTask(this.form).then(response => {
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.getList();
|
|
this.getList();
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- addUser(this.form).then(response => {
|
|
|
|
|
|
+ addTask(this.form).then(response => {
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.getList();
|
|
this.getList();
|
|
@@ -3076,57 +2862,25 @@ export default {
|
|
},
|
|
},
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
- const userIds = row.userId || this.ids;
|
|
|
|
- this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() {
|
|
|
|
- return delUser(userIds);
|
|
|
|
- }).then(() => {
|
|
|
|
- this.getList();
|
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
|
- }).catch(() => {});
|
|
|
|
- },
|
|
|
|
- //训练任务下发
|
|
|
|
- handleIssued(row) {
|
|
|
|
- const userIds = row.userId || this.ids;
|
|
|
|
- this.$modal.confirm('是否确定编号为"' + userIds + '"的训练任务?').then(function() {
|
|
|
|
- //return delUser(userIds);
|
|
|
|
|
|
+ const taskIds = row.taskId || this.ids;
|
|
|
|
+ this.$modal.confirm('是否确认删除编号为"' + taskIds + '"的数据项?').then(function() {
|
|
|
|
+ return delTask(taskIds);
|
|
}).then(() => {
|
|
}).then(() => {
|
|
this.getList();
|
|
this.getList();
|
|
this.$modal.msgSuccess("删除成功");
|
|
this.$modal.msgSuccess("删除成功");
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
},
|
|
},
|
|
|
|
+ // //训练任务下发
|
|
|
|
+ // handleIssued(row) {
|
|
|
|
+ // const userIds = row.userId || this.ids;
|
|
|
|
+ // this.$modal.confirm('是否确定编号为"' + userIds + '"的训练任务?').then(function() {
|
|
|
|
+ // //return delUser(userIds);
|
|
|
|
+ // }).then(() => {
|
|
|
|
+ // this.getList();
|
|
|
|
+ // this.$modal.msgSuccess("删除成功");
|
|
|
|
+ // }).catch(() => {});
|
|
|
|
+ // },
|
|
|
|
|
|
- /** 导出按钮操作 */
|
|
|
|
- handleExport() {
|
|
|
|
- this.download('simulator/user/export', {
|
|
|
|
- ...this.queryParams
|
|
|
|
- }, `user_${new Date().getTime()}.xlsx`)
|
|
|
|
- },
|
|
|
|
- /** 导入按钮操作 */
|
|
|
|
- handleImport() {
|
|
|
|
- this.upload.title = "用户导入";
|
|
|
|
- this.upload.open = true;
|
|
|
|
- },
|
|
|
|
- /** 下载模板操作 */
|
|
|
|
- importTemplate() {
|
|
|
|
- this.download('simulator/user/importTemplate', {
|
|
|
|
- }, `user_template_${new Date().getTime()}.xlsx`)
|
|
|
|
- },
|
|
|
|
- // 文件上传中处理
|
|
|
|
- handleFileUploadProgress(event, file, fileList) {
|
|
|
|
- this.upload.isUploading = true;
|
|
|
|
- },
|
|
|
|
- // 文件上传成功处理
|
|
|
|
- handleFileSuccess(response, file, fileList) {
|
|
|
|
- this.upload.open = false;
|
|
|
|
- this.upload.isUploading = false;
|
|
|
|
- this.$refs.upload.clearFiles();
|
|
|
|
- this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
|
|
|
|
- this.getList();
|
|
|
|
- },
|
|
|
|
- // 提交上传文件
|
|
|
|
- submitFileForm() {
|
|
|
|
- this.$refs.upload.submit();
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|