Commit f0b7a6c2b0171ba6d0e74f1fe00e3d02762d9cc4
1 parent
bde7e20f
志哥王哥牛批
Showing
4 changed files
with
545 additions
and
146 deletions
src/api/HistoryAnswer.js
0 → 100644
src/api/userclass.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | + | |
| 4 | +export function GetUserClassList(params) { | |
| 5 | + return request({ | |
| 6 | + url: `/tb_userClass/List`, | |
| 7 | + method: 'get', | |
| 8 | + params | |
| 9 | + }) | |
| 10 | +} | |
| 11 | +export function UserClassCreate(data) { | |
| 12 | + return request({ | |
| 13 | + url: `/tb_userClass/Create`, | |
| 14 | + method: 'post', | |
| 15 | + data | |
| 16 | + }) | |
| 17 | +} | |
| 18 | + | |
| 19 | +export function UserClassUpdate(data) { | |
| 20 | + return request({ | |
| 21 | + url: `/tb_userClass/Update`, | |
| 22 | + method: 'post', | |
| 23 | + data | |
| 24 | + }) | |
| 25 | +} | |
| 26 | + | |
| 27 | +export function UserClassDelete(data) { | |
| 28 | + return request({ | |
| 29 | + url: `/tb_userClass/Delete`, | |
| 30 | + method: 'post', | |
| 31 | + params: data | |
| 32 | + }) | |
| 33 | +} | |
| 34 | + | |
| 0 | 35 | \ No newline at end of file | ... | ... |
src/views/user/picuserimport.vue
| ... | ... | @@ -29,7 +29,7 @@ |
| 29 | 29 | |
| 30 | 30 | <el-form-item> |
| 31 | 31 | <el-button type="success" @click="search">搜索</el-button> |
| 32 | - <el-button size="mini" @click="handleshare()" type="primary">批量确认</el-button> | |
| 32 | + <el-button size="mini" @click="handleshare()" type="primary">批量入库</el-button> | |
| 33 | 33 | <el-button size="mini" @click="handleAdd()" type="primary">新增一行</el-button> |
| 34 | 34 | </el-form-item> |
| 35 | 35 | </el-form> |
| ... | ... | @@ -73,7 +73,7 @@ |
| 73 | 73 | </div> |
| 74 | 74 | <!-- 全局控制删除 --> |
| 75 | 75 | <el-button size="mini" v-if="is_delete&&scope.row.add==undefined" :plain="true" type="warning" |
| 76 | - style="margin-left:10px" @click="handleshare(scope.$index, scope.row)">确认信息</el-button> | |
| 76 | + style="margin-left:10px" @click="handleshare(scope.$index, scope.row)">确认入库</el-button> | |
| 77 | 77 | <el-button size="mini" v-if="is_delete&&scope.row.add==undefined" :plain="true" type="danger" |
| 78 | 78 | style="margin-left:10px" @click="handleDelete(scope.$index, scope.row)">删除</el-button> |
| 79 | 79 | </template> | ... | ... |
src/views/user/userlist.vue
| ... | ... | @@ -24,166 +24,521 @@ |
| 24 | 24 | |
| 25 | 25 | <el-form-item> |
| 26 | 26 | <el-button type="success" @click="search">搜索</el-button> |
| 27 | - <el-button v-if="selectedList.length" type="primary" @click="handleInviteInterview" | |
| 28 | - >邀请面试</el-button | |
| 29 | - > | |
| 27 | + <el-button type="success" @click="resetSearch">重置</el-button> | |
| 28 | + <el-button v-if="selectedList.length" type="primary" @click="handleInviteInterview">邀请面试</el-button> | |
| 30 | 29 | </el-form-item> |
| 31 | 30 | </el-form> |
| 32 | 31 | |
| 33 | - | |
| 32 | + | |
| 33 | + | |
| 34 | 34 | </div> |
| 35 | - <el-upload | |
| 36 | - class="upload-demo" | |
| 37 | - action="/api/Account/importUsers?UserClassId=0" | |
| 38 | - multiple | |
| 39 | - :limit="1" | |
| 40 | - :show-file-list="false" | |
| 41 | - :on-exceed="handleExceed" | |
| 42 | - :on-success="handleSuccess" | |
| 43 | - :file-list="fileList" | |
| 44 | - > | |
| 35 | + | |
| 36 | + <el-upload class="upload-demo" action="/api/Account/importUsers?UserClassId=0" multiple :limit="1" | |
| 37 | + :show-file-list="false" :on-exceed="handleExceed" :on-success="handleSuccess" :file-list="fileList"> | |
| 45 | 38 | <el-button size="small" type="primary">导入用户</el-button> |
| 46 | 39 | </el-upload> |
| 47 | 40 | </div> |
| 48 | - <el-table | |
| 49 | - :data="userList" | |
| 50 | - id="QuestionTable" | |
| 51 | - border | |
| 52 | - style=" | |
| 53 | - width: 100%; | |
| 54 | - border-radius: 5px; | |
| 55 | - box-shadow: 0 0 10px #efefef; | |
| 56 | - margin-top: 10px; | |
| 57 | - " | |
| 58 | - @selection-change="handleSelectionChange" | |
| 59 | - :stripe="true" | |
| 60 | - > | |
| 61 | - <el-table-column type="selection" width="55"> </el-table-column> | |
| 62 | - <el-table-column | |
| 63 | - type="index" | |
| 64 | - prop="date" | |
| 65 | - width="50" | |
| 66 | - align="center" | |
| 67 | - ></el-table-column> | |
| 68 | - <el-table-column prop="date" label="姓名"> | |
| 69 | - <template slot-scope="scope"> | |
| 70 | - <span>{{ scope.row.fullName }}</span> | |
| 71 | - </template> | |
| 72 | - </el-table-column> | |
| 73 | - <el-table-column prop="date" label="电话号码"> | |
| 74 | - <template slot-scope="scope"> | |
| 75 | - <el-tooltip | |
| 76 | - class="item" | |
| 77 | - effect="dark" | |
| 78 | - :content="scope.row.phone" | |
| 79 | - placement="top-start" | |
| 80 | - > | |
| 81 | - <span>{{ scope.row.phone1 }}</span> | |
| 82 | - </el-tooltip> | |
| 83 | - </template> | |
| 84 | - </el-table-column> | |
| 85 | - | |
| 86 | - <el-table-column prop="date" label="性别"> </el-table-column> | |
| 87 | - <el-table-column prop="date" label="毕业院校"> </el-table-column> | |
| 88 | - <el-table-column prop="date" label="最高学历"> </el-table-column>专业 | |
| 89 | - <el-table-column prop="date" label="专业"> </el-table-column> | |
| 90 | - | |
| 91 | - | |
| 92 | - <el-table-column prop="date" label="注册时间"> | |
| 93 | - <template slot-scope="scope"> | |
| 94 | - <span>{{ scope.row.addTime.replace("T", " ") }}</span> | |
| 95 | - </template> | |
| 96 | - </el-table-column> | |
| 97 | - </el-table> | |
| 98 | - <el-pagination | |
| 99 | - background | |
| 100 | - @current-change="currentchange" | |
| 101 | - style="position: static; bottom: 3px; text-align: center; margin-top: 5px" | |
| 102 | - :page-size="this.query.PageSize" | |
| 103 | - layout="total,prev, pager, next" | |
| 104 | - :total="Count" | |
| 105 | - > | |
| 106 | - </el-pagination> | |
| 41 | + <el-container style=" border: 1px solid #eee;"> | |
| 42 | + <el-aside width="255px" | |
| 43 | + style="width: 255px;background-color: #fff;padding: 10px;border-right: 1px solid #dcdfe6;"> | |
| 44 | + <div style="float:left"> | |
| 45 | + 所属分类 | |
| 46 | + </div> | |
| 47 | + <div style="text-align:right;"> | |
| 48 | + <el-button size="mini" type="primary" icon="el-icon-plus" circle @click="addcat"></el-button> | |
| 49 | + <el-button size="mini" type="warning" icon="el-icon-edit" circle @click="editcat"></el-button> | |
| 50 | + <el-button size="mini" type="danger" icon="el-icon-delete" @click="delcat" circle></el-button> | |
| 51 | + </div> | |
| 52 | + <el-input size="small " placeholder="分类筛选" v-model="filterText" style="margin-bottom:10px;margin-top:10px;"> | |
| 53 | + </el-input> | |
| 54 | + <el-tree :data="data" :props="props" ref="tree" :filter-node-method="filterNode" @node-click="handleNodeClick"> | |
| 55 | + </el-tree> | |
| 56 | + | |
| 57 | + </el-aside> | |
| 58 | + | |
| 59 | + <el-main> | |
| 60 | + | |
| 61 | + | |
| 62 | + <div class="filter-container"> | |
| 63 | + <el-table ref="userList" :data="userList" id="QuestionTable" border style=" | |
| 64 | + width: 100%; | |
| 65 | + border-radius: 5px; | |
| 66 | + box-shadow: 0 0 10px #efefef; | |
| 67 | + margin-top: 10px; | |
| 68 | + " @selection-change="handleSelectionChange" :stripe="true"> | |
| 69 | + <el-table-column type="selection" width="55"> </el-table-column> | |
| 70 | + <el-table-column type="index" prop="date" width="50" align="center"></el-table-column> | |
| 71 | + <el-table-column prop="date" label="姓名"> | |
| 72 | + <template slot-scope="scope"> | |
| 73 | + <span>{{ scope.row.fullName }}</span> | |
| 74 | + </template> | |
| 75 | + </el-table-column> | |
| 76 | + <el-table-column prop="date" label="电话号码"> | |
| 77 | + <template slot-scope="scope"> | |
| 78 | + <el-tooltip class="item" effect="dark" :content="scope.row.phone" placement="top-start"> | |
| 79 | + <span>{{ scope.row.phone1 }}</span> | |
| 80 | + </el-tooltip> | |
| 81 | + </template> | |
| 82 | + </el-table-column> | |
| 83 | + | |
| 84 | + <el-table-column prop="date" label="近期测试"> | |
| 85 | + <template slot-scope="{row}"> | |
| 86 | + <span>{{row.TestPaperTitle || '无'}}</span> | |
| 87 | + <el-button v-if="row.TestPaperTitle || 1==1" type="text" icon="el-icon-star-off" | |
| 88 | + @click="handleTestHitory(row)"></el-button> | |
| 89 | + </template> | |
| 90 | + </el-table-column> | |
| 91 | + <el-table-column prop="date" label="电话号码"> | |
| 92 | + <template slot-scope="scope"> | |
| 93 | + <el-tooltip class="item" effect="dark" :content="scope.row.phone" placement="top-start"> | |
| 94 | + <span>{{ scope.row.phone1 }}</span> | |
| 95 | + </el-tooltip> | |
| 96 | + </template> | |
| 97 | + </el-table-column> | |
| 98 | + | |
| 99 | + | |
| 100 | + <el-table-column prop="date" label="性别" sortable> </el-table-column> | |
| 101 | + <el-table-column prop="date" label="民族" sortable> </el-table-column> | |
| 102 | + <el-table-column prop="date" label="专业" sortable> </el-table-column> | |
| 103 | + <el-table-column prop="date" label="毕业院校" sortable> </el-table-column> | |
| 104 | + <el-table-column prop="date" label="最高学历" sortable> </el-table-column> | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + <el-table-column prop="addTime" label="录入时间" sortable> | |
| 109 | + <template slot-scope="scope"> | |
| 110 | + <span>{{ scope.row.addTime.replace("T", " ") }}</span> | |
| 111 | + </template> | |
| 112 | + </el-table-column> | |
| 113 | + | |
| 114 | + <el-table-column prop="date" label="操作" width="180"> | |
| 115 | + <template slot-scope="scope"> | |
| 116 | + <el-button type="text" icon="el-icon-edit" @click="handleEdit(scope.row)" circle>编辑</el-button> | |
| 117 | + <el-button type="text" icon="el-icon-delete" circle>删除</el-button> | |
| 118 | + </template> | |
| 119 | + </el-table-column> | |
| 120 | + </el-table> | |
| 121 | + <el-pagination background @current-change="currentchange" | |
| 122 | + style="position: static; bottom: 3px; text-align: center; margin-top: 5px" :page-size="this.query.PageSize" | |
| 123 | + layout="total,prev, pager, next" :total="Count"> | |
| 124 | + </el-pagination> | |
| 125 | + </div> | |
| 126 | + | |
| 127 | + </el-main> | |
| 128 | + | |
| 129 | + </el-container> | |
| 130 | + | |
| 131 | + <el-dialog title="邀请面试-试卷选择" :visible.sync="dialogFormVisible"> | |
| 132 | + <el-form :model="form"> | |
| 133 | + <!-- <el-form-item label="活动名称" :label-width="formLabelWidth"> | |
| 134 | + <el-input v-model="form.name" autocomplete="off"></el-input> | |
| 135 | + </el-form-item> --> | |
| 136 | + <el-form-item label="试卷"> | |
| 137 | + <el-select v-model="form.TestPaperId" placeholder="请选择试卷" style="width:80%"> | |
| 138 | + <el-option :value="item.id" v-for="item in testpaperlist">{{'['+item.id+'] '+(item.TestPaperTitle || | |
| 139 | + '未命名')}}</el-option> | |
| 140 | + </el-select> | |
| 141 | + </el-form-item> | |
| 142 | + </el-form> | |
| 143 | + <div slot="footer" class="dialog-footer"> | |
| 144 | + <el-button @click="dialogFormVisible = false">取 消</el-button> | |
| 145 | + <el-button type="primary" @click="handleShareSend">确认发送</el-button> | |
| 146 | + </div> | |
| 147 | + </el-dialog> | |
| 148 | + | |
| 149 | + <el-dialog title="测试历史记录" :visible.sync="dialogTableVisible" @close=" gridData =[]" height="400"> | |
| 150 | + <el-table :data="gridData" height="400"> | |
| 151 | + <el-table-column property="AnswerTime" label="测试时间" width="180" sortable> | |
| 152 | + <template slot-scope="scope"> | |
| 153 | + <span>{{ scope.row.AnswerTime.replace("T", " ") }}</span> | |
| 154 | + </template> | |
| 155 | + | |
| 156 | + </el-table-column> | |
| 157 | + <el-table-column property="StartTime" label="开始时间" width="180" sortable> | |
| 158 | + <template slot-scope="scope"> | |
| 159 | + <span>{{ scope.row.StartTime.replace("T", " ") }}</span> | |
| 160 | + </template> | |
| 161 | + </el-table-column> | |
| 162 | + <el-table-column property="address" label="结束时间" width="180" sortable> | |
| 163 | + <template slot-scope="scope"> | |
| 164 | + <span>{{ scope.row.EndTime.replace("T", " ") }}</span> | |
| 165 | + </template> | |
| 166 | + </el-table-column> | |
| 167 | + <el-table-column property="Achievement" label="成绩" sortable></el-table-column> | |
| 168 | + </el-table> | |
| 169 | + | |
| 170 | + <div style="text-align:right;margin-top:20px"> | |
| 171 | + | |
| 172 | + <el-button type="primary" @click="dialogTableVisible = false"> | |
| 173 | + 确定 | |
| 174 | + </el-button> | |
| 175 | + </div> | |
| 176 | + </el-dialog> | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + <el-dialog :visible.sync="dialogVisiblecat" :title="dialogTypecat === 'update' ? '修改' : '新增'" width="455px"> | |
| 181 | + <el-form ref="dataForm" :model="temp" label-width="120px" label-position="right"> | |
| 182 | + | |
| 183 | + <el-form-item label="分类名称"> | |
| 184 | + <el-input v-model="temp.ClassTitle" placeholder="请输入名称" /> | |
| 185 | + </el-form-item> | |
| 186 | + <!-- <el-form-item label="备注"> | |
| 187 | + <el-input v-model="temp.exid1" placeholder="请输入备注" /> | |
| 188 | + </el-form-item> --> | |
| 189 | + </el-form> | |
| 190 | + <div style="text-align:right;"> | |
| 191 | + <el-button type="danger" @click="dialogVisiblecat = false"> | |
| 192 | + 取消 | |
| 193 | + </el-button> | |
| 194 | + <el-button type="primary" @click="submitcat"> | |
| 195 | + 确定 | |
| 196 | + </el-button> | |
| 197 | + </div> | |
| 198 | + </el-dialog> | |
| 199 | + | |
| 200 | + | |
| 201 | + <el-dialog title="人才用户信息" :visible.sync="dialogClassIVIsible" width="450"> | |
| 202 | + <el-form ref="adminUserInfo" :model="adminUserInfo" label-width="90px" style="margin-left: 40px;"> | |
| 203 | + <el-form-item label="名称" prop="fullName"> | |
| 204 | + <el-input v-model="adminUserInfo.fullName " placeholder="请输入姓名" style="width: 40%;"></el-input> | |
| 205 | + </el-form-item> | |
| 206 | + <el-form-item label="电话号码"> | |
| 207 | + <el-input v-model="adminUserInfo.phone " placeholder="请输入电话号码" style="width: 40%;" maxlength="11"></el-input> | |
| 208 | + </el-form-item> | |
| 209 | + <el-form-item label="最高学历"> | |
| 210 | + <el-select v-model="adminUserInfo.xueli" placeholder="最高学历"> | |
| 211 | + <el-option label="大专" value="shanghai"></el-option> | |
| 212 | + <el-option label="本科" value="beijing"></el-option> | |
| 213 | + </el-select> | |
| 214 | + </el-form-item> | |
| 215 | + | |
| 216 | + <el-form-item label="民族"> | |
| 217 | + <el-select v-model="adminUserInfo.minzu" placeholder="民族"> | |
| 218 | + <el-option v-for="item in mzlist" :label="item" :value="item"></el-option> | |
| 219 | + </el-select> | |
| 220 | + </el-form-item> | |
| 221 | + <el-form-item label="性别"> | |
| 222 | + <el-select v-model="adminUserInfo.sex" placeholder="性别"> | |
| 223 | + <el-option label="男" value="1"></el-option> | |
| 224 | + <el-option label="女" value="0"></el-option> | |
| 225 | + </el-select> | |
| 226 | + </el-form-item> | |
| 227 | + <el-form-item label="专业" style="margin-top: 40px;" prop="username"> | |
| 228 | + <el-input v-model="adminUserInfo.zhuanye" placeholder="请输入专业" style="width: 40%;"></el-input> | |
| 229 | + </el-form-item> | |
| 230 | + <el-form-item label="毕业院校" style="margin-top: 40px;" prop="username"> | |
| 231 | + <el-input v-model="adminUserInfo.byyx" placeholder="请输入毕业院校" style="width: 40%;"></el-input> | |
| 232 | + </el-form-item> | |
| 233 | + | |
| 234 | + <!-- <el-form-item label="密码" prop="password" > | |
| 235 | + <el-input v-model="adminUserInfo.password " placeholder="请输入密码 不填默认不修改" show-password style="width: 40%;"></el-input> | |
| 236 | + </el-form-item> --> | |
| 237 | + <el-form-item style="text-align: right;"> | |
| 238 | + <el-button @click="dialogClassIVIsible=false">取消</el-button> | |
| 239 | + <el-button type="primary" @click="submitForm('adminUserInfo')">提交</el-button> | |
| 240 | + </el-form-item> | |
| 241 | + </el-form> | |
| 242 | + | |
| 243 | + <div style="clear: both;"></div> | |
| 244 | + </el-dialog> | |
| 245 | + | |
| 107 | 246 | </div> |
| 108 | 247 | </template> |
| 109 | 248 | |
| 110 | 249 | <script> |
| 111 | -import { ImportUserByExcel, GetUserList } from "@/api/user"; | |
| 112 | -export default { | |
| 113 | - data() { | |
| 114 | - return { | |
| 115 | - userList: [], | |
| 116 | - Count: 0, | |
| 117 | - type: "1", | |
| 118 | - query: { | |
| 119 | - UserTypeEnum: 1, //0:管理员,1普通用户 | |
| 120 | - PageIndex: 1, | |
| 121 | - PageSize: 10, | |
| 122 | - keyword:'' | |
| 123 | - }, | |
| 124 | - fileList:[], | |
| 125 | - selectedList: [], | |
| 126 | - }; | |
| 127 | - }, | |
| 128 | - created() { | |
| 129 | - this.GetUser(); | |
| 130 | - }, | |
| 131 | - methods: { | |
| 132 | - search(){ | |
| 133 | - this.GetUser(); | |
| 250 | + import { ImportUserByExcel, GetUserList } from "@/api/user"; | |
| 251 | + import { GetUserClassList, UserClassCreate, UserClassUpdate, UserClassDelete } from "@/api/userclass"; | |
| 252 | + import { GetHistoryList } from '@/api/HistoryAnswer' | |
| 253 | + | |
| 254 | + import { | |
| 255 | + getTestPaperList | |
| 256 | + } from '@/api/TestPaper' | |
| 257 | + export default { | |
| 258 | + data() { | |
| 259 | + return { | |
| 260 | + dialogFormVisible: false, | |
| 261 | + dialogTableVisible: false, | |
| 262 | + dialogTypecat: 'create', | |
| 263 | + testpaperlist: [], | |
| 264 | + form: {}, | |
| 265 | + userList: [], | |
| 266 | + data: [], | |
| 267 | + dialogVisiblecat: false, | |
| 268 | + filterText: '', | |
| 269 | + gridData: [], | |
| 270 | + Count: 0, | |
| 271 | + adminUserInfo: {}, | |
| 272 | + temp: { | |
| 273 | + ParentId: 0 | |
| 274 | + }, | |
| 275 | + mzlist: ['汉族', | |
| 276 | + '蒙古族 ', '羌族 ', '僳僳族 ', '哈尼族', | |
| 277 | + '回族', '布朗族', '佤族', '哈萨克族', | |
| 278 | + '藏族', '撒拉族', '畲族', '傣族', | |
| 279 | + '维吾尔族', '毛南族', '高山族', '德昂族', | |
| 280 | + '苗族', '仡佬族', '拉祜族', '保安族', | |
| 281 | + '彝族', '锡伯族', '水族', '裕固族', | |
| 282 | + '壮族', '阿昌族', '东乡族', '京族', | |
| 283 | + '布依族', '普米族', '纳西族', '独龙族', | |
| 284 | + '朝鲜族', '塔吉克族', '景颇族', '鄂伦春族', | |
| 285 | + '满族', '怒族', '柯尔克孜族', '赫哲族', | |
| 286 | + '侗族', '乌孜别克族', '土族', '门巴族', | |
| 287 | + '瑶族', '俄罗斯族', '达斡尔族', '珞巴族', | |
| 288 | + '白族', '鄂温克族', '塔塔尔族', '基诺族' | |
| 289 | + ], | |
| 290 | + type: "1", | |
| 291 | + dialogClassIVIsible: false, | |
| 292 | + query: { | |
| 293 | + UserTypeEnum: 1, //0:管理员,1普通用户 | |
| 294 | + PageIndex: 1, | |
| 295 | + PageSize: 10, | |
| 296 | + keyword: '' | |
| 297 | + }, | |
| 298 | + fileList: [], | |
| 299 | + selectedList: [], | |
| 300 | + props: { | |
| 301 | + label: 'ClassTitle', | |
| 302 | + children: 'children' | |
| 303 | + }, | |
| 304 | + }; | |
| 134 | 305 | }, |
| 135 | - handleSuccess(){ | |
| 136 | - this.$message.success('导入完成!'); | |
| 137 | - this.GetUser(); | |
| 306 | + watch: { | |
| 307 | + filterText(val) { | |
| 308 | + this.$refs.tree.filter(val); | |
| 309 | + } | |
| 138 | 310 | }, |
| 139 | - handleInviteInterview() {}, | |
| 140 | - handleSelectionChange(val) { | |
| 141 | - console.log(val); | |
| 142 | - this.selectedList = val; | |
| 311 | + | |
| 312 | + created() { | |
| 313 | + this.GetUser(); | |
| 314 | + this.forceTestPaper(); | |
| 315 | + this.loadTree(); | |
| 143 | 316 | }, |
| 144 | - handleExceed(){}, | |
| 145 | - ImportUser() {}, | |
| 146 | - GetUser() { | |
| 147 | - GetUserList(this.query).then((res) => { | |
| 148 | - this.userList = res.data.data.rows.map((t) => { | |
| 149 | - if (t.phone) { | |
| 150 | - t.phone1 = t.phone.replace(t.phone.substring(3, 7), "****"); | |
| 151 | - } | |
| 152 | - return t; | |
| 317 | + methods: { | |
| 318 | + submitForm() { | |
| 319 | + this.dialogClassIVIsible = false; | |
| 320 | + }, | |
| 321 | + handleEdit(data) { | |
| 322 | + this.dialogClassIVIsible = true; | |
| 323 | + this.adminUserInfo = data; | |
| 324 | + }, | |
| 325 | + handleTestHitory(row) { | |
| 326 | + GetHistoryList({ UserId: row.id }).then(res => { | |
| 327 | + this.gridData = res.data.data; | |
| 328 | + this.dialogTableVisible = true; | |
| 153 | 329 | }); |
| 154 | - this.Count = res.data.data.total; | |
| 155 | - }); | |
| 156 | - }, | |
| 157 | - currentchange(page) { | |
| 158 | - this.query.PageIndex = page; | |
| 159 | - this.GetUser(); | |
| 330 | + | |
| 331 | + }, | |
| 332 | + handleShareSend() { | |
| 333 | + var rows = this.$refs.userList.selection; | |
| 334 | + var ids = rows.map(o => o.id) || []; | |
| 335 | + var postData = { | |
| 336 | + TestPaperId: this.form.TestPaperId, | |
| 337 | + UserList: ids | |
| 338 | + }; | |
| 339 | + if (!ids || ids.length < 1) { | |
| 340 | + this.$message.warning('请至少选择一个用户进行发送!'); | |
| 341 | + return; | |
| 342 | + } | |
| 343 | + if (!this.form.TestPaperId) { | |
| 344 | + | |
| 345 | + this.$message.warning('请选择试卷后再发送!'); | |
| 346 | + return; | |
| 347 | + } | |
| 348 | + this.$confirm('确认向选择的' + ids.length + '个用户发送试卷连接进行测试吗?', '提示消息', { | |
| 349 | + confirmButtonText: '确认', | |
| 350 | + cancelButtonText: '取消', | |
| 351 | + callback: (action) => { | |
| 352 | + if (action == "confirm") { | |
| 353 | + | |
| 354 | + SendUserMessage(postData).then(res => { | |
| 355 | + if (res.data.code == 200) { | |
| 356 | + this.$message.success('发送成功'); | |
| 357 | + this.form = {}; | |
| 358 | + this.dialogFormVisible = false; | |
| 359 | + this.GetUser(); | |
| 360 | + } | |
| 361 | + else { | |
| 362 | + this.$message.error('发送失败'); | |
| 363 | + } | |
| 364 | + }); | |
| 365 | + } | |
| 366 | + }, | |
| 367 | + }) | |
| 368 | + }, | |
| 369 | + forceTestPaper() { | |
| 370 | + let parameter = { | |
| 371 | + pageIndex: 1, | |
| 372 | + pageSize: 10000, | |
| 373 | + sort: "id", | |
| 374 | + sortOrder: 1, | |
| 375 | + keyword: "" | |
| 376 | + } | |
| 377 | + getTestPaperList(parameter).then(res => { | |
| 378 | + this.testpaperlist = res.data.data; | |
| 379 | + }); | |
| 380 | + }, | |
| 381 | + search() { | |
| 382 | + this.GetUser(); | |
| 383 | + }, | |
| 384 | + handleSuccess() { | |
| 385 | + this.$message.success('导入完成!'); | |
| 386 | + this.GetUser(); | |
| 387 | + }, | |
| 388 | + handleInviteInterview() { | |
| 389 | + this.dialogFormVisible = true; | |
| 390 | + }, | |
| 391 | + handleSelectionChange(val) { | |
| 392 | + console.log(val); | |
| 393 | + this.selectedList = val; | |
| 394 | + }, | |
| 395 | + handleExceed() { }, | |
| 396 | + ImportUser() { }, | |
| 397 | + | |
| 398 | + | |
| 399 | + showcontent(c, row) { | |
| 400 | + this.showbody = c; | |
| 401 | + this.dialogVisible_content = true; | |
| 402 | + }, | |
| 403 | + submitcat() { | |
| 404 | + // if (this.loading) { | |
| 405 | + // return | |
| 406 | + // } | |
| 407 | + this.loading = true | |
| 408 | + var postData = this.temp; | |
| 409 | + if (this.dialogTypecat == 'update') { | |
| 410 | + if (postData.AddTime == '0001-01-01T00:00:00') postData.AddTime = new Date(); | |
| 411 | + UserClassUpdate(postData).then(o => { | |
| 412 | + this.$message({ | |
| 413 | + message: '提交成功', | |
| 414 | + type: 'success' | |
| 415 | + }) | |
| 416 | + this.dialogVisiblecat = false; | |
| 417 | + }); | |
| 418 | + | |
| 419 | + } | |
| 420 | + else { | |
| 421 | + | |
| 422 | + UserClassCreate(postData).then(o => { | |
| 423 | + | |
| 424 | + this.$message({ | |
| 425 | + message: '提交成功', | |
| 426 | + type: 'success' | |
| 427 | + }) | |
| 428 | + | |
| 429 | + this.dialogVisiblecat = false | |
| 430 | + | |
| 431 | + this.loadTree(); | |
| 432 | + }); | |
| 433 | + } | |
| 434 | + }, | |
| 435 | + editclose(data) { | |
| 436 | + // this.dialogVisible_step = false; | |
| 437 | + this.fetchData() | |
| 438 | + }, | |
| 439 | + loadTree() { | |
| 440 | + GetUserClassList({ ParentId: 0 }).then(res => { | |
| 441 | + this.data = res.data.data | |
| 442 | + }) | |
| 443 | + }, | |
| 444 | + filterNode(value, data) { | |
| 445 | + if (!value) return true; | |
| 446 | + return data.ClassTitle.indexOf(value) !== -1 | |
| 447 | + }, | |
| 448 | + addcat() { | |
| 449 | + this.temp = { AddTime: new Date() } | |
| 450 | + this.dialogVisiblecat = true | |
| 451 | + }, | |
| 452 | + editcat() { | |
| 453 | + this.dialogTypecat = 'update'; | |
| 454 | + if (!this.temp.id) { | |
| 455 | + this.$message({ | |
| 456 | + message: '请选择一个分类进行操作!', | |
| 457 | + type: 'warning' | |
| 458 | + }) | |
| 459 | + return; | |
| 460 | + } | |
| 461 | + this.dialogVisiblecat = true; | |
| 462 | + }, | |
| 463 | + delcat() { | |
| 464 | + if (!this.temp.id) { | |
| 465 | + this.$message({ | |
| 466 | + message: '请选择一个分类进行操作!', | |
| 467 | + type: 'warning' | |
| 468 | + }) | |
| 469 | + return; | |
| 470 | + } | |
| 471 | + this.$confirm('确认删除该分类吗?', '提示', { | |
| 472 | + confirmButtonText: '确定', | |
| 473 | + cancelButtonText: '取消', | |
| 474 | + type: 'warning' | |
| 475 | + }).then(() => { | |
| 476 | + UserClassDelete({ ids: this.temp.id }).then(o => { | |
| 477 | + this.loadTree(); | |
| 478 | + this.$message({ | |
| 479 | + message: '删除成功', | |
| 480 | + type: 'success' | |
| 481 | + }) | |
| 482 | + }); | |
| 483 | + | |
| 484 | + }) | |
| 485 | + }, | |
| 486 | + handleNodeClick(data, checked, indeterminate) { | |
| 487 | + this.query.userClassId = data.id; | |
| 488 | + this.temp = data; | |
| 489 | + this.GetUser() | |
| 490 | + }, | |
| 491 | + | |
| 492 | + resetSearch() { | |
| 493 | + this.query = { | |
| 494 | + UserTypeEnum: 1, //0:管理员,1普通用户 | |
| 495 | + PageIndex: 1, | |
| 496 | + PageSize: 10, | |
| 497 | + keyword: '' | |
| 498 | + }; | |
| 499 | + this.GetUser(); | |
| 500 | + }, | |
| 501 | + GetUser() { | |
| 502 | + GetUserList(this.query).then((res) => { | |
| 503 | + this.userList = res.data.data.rows.map((t) => { | |
| 504 | + if (t.phone) { | |
| 505 | + t.phone1 = t.phone.replace(t.phone.substring(3, 7), "****"); | |
| 506 | + } | |
| 507 | + return t; | |
| 508 | + }); | |
| 509 | + this.Count = res.data.data.total; | |
| 510 | + }); | |
| 511 | + }, | |
| 512 | + currentchange(page) { | |
| 513 | + this.query.PageIndex = page; | |
| 514 | + this.GetUser(); | |
| 515 | + }, | |
| 160 | 516 | }, |
| 161 | - }, | |
| 162 | -}; | |
| 517 | + }; | |
| 163 | 518 | </script> |
| 164 | 519 | |
| 165 | 520 | <style lang="scss" scoped> |
| 166 | -.seetingsDiv { | |
| 167 | - display: flex; | |
| 168 | - align-items: center; | |
| 169 | - width: 100%; | |
| 170 | - padding-top:10px; | |
| 171 | - padding-left:10px; | |
| 172 | - /* height: 60px; */ | |
| 173 | - background: #efefef; | |
| 174 | - /* line-height: 60px; */ | |
| 175 | - border-radius: 5px; | |
| 176 | - box-shadow: 0 0 5px #cdcdcd; | |
| 177 | - justify-content: space-between; | |
| 178 | -} | |
| 179 | - | |
| 180 | -.seetingsDiv button { | |
| 181 | - height: 40px; | |
| 182 | - background-color: #304156; | |
| 183 | - border: 0px; | |
| 184 | - margin-left: 10px; | |
| 185 | - box-shadow: 0 0 5px #cdcdcd; | |
| 186 | - float: none; | |
| 187 | - margin-right: 10px; | |
| 188 | -} | |
| 189 | -</style> | |
| 521 | + .seetingsDiv { | |
| 522 | + display: flex; | |
| 523 | + align-items: center; | |
| 524 | + width: 100%; | |
| 525 | + padding-top: 10px; | |
| 526 | + padding-left: 10px; | |
| 527 | + /* height: 60px; */ | |
| 528 | + background: #efefef; | |
| 529 | + /* line-height: 60px; */ | |
| 530 | + border-radius: 5px; | |
| 531 | + box-shadow: 0 0 5px #cdcdcd; | |
| 532 | + justify-content: space-between; | |
| 533 | + } | |
| 534 | + | |
| 535 | + .seetingsDiv button { | |
| 536 | + height: 40px; | |
| 537 | + background-color: #304156; | |
| 538 | + border: 0px; | |
| 539 | + margin-left: 10px; | |
| 540 | + box-shadow: 0 0 5px #cdcdcd; | |
| 541 | + float: none; | |
| 542 | + margin-right: 10px; | |
| 543 | + } | |
| 544 | +</style> | |
| 190 | 545 | \ No newline at end of file | ... | ... |