Commit d1837e7a12518243a610ec4b0ec5d38328cfa8fb
1 parent
e0458767
测试
Showing
10 changed files
with
481 additions
and
507 deletions
src/api/user.js
| ... | ... | @@ -200,4 +200,14 @@ export function saveTypeSetting(data) { |
| 200 | 200 | method: 'post', |
| 201 | 201 | data |
| 202 | 202 | }) |
| 203 | -} | |
| 204 | 203 | \ No newline at end of file |
| 204 | +} | |
| 205 | + | |
| 206 | +//设置标签 | |
| 207 | + export function SelectPhoneBool(id,phone) { | |
| 208 | + return request({ | |
| 209 | + url: `/Users/SelectPhoneBool?id=${id}&phone=${phone}`, | |
| 210 | + method: 'get', | |
| 211 | + }) | |
| 212 | +} | |
| 213 | + | |
| 214 | + | ... | ... |
src/views/TestPaper/AddTestPaper.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <div style="text-align: center;width: 680px;margin: auto;margin-top: 200px"> | |
| 4 | + <ul class="AddUl"> | |
| 5 | + <li>添加专业试卷</li> | |
| 6 | + <li>添加测评试卷</li> | |
| 7 | + </ul> | |
| 8 | + </div> | |
| 9 | + | |
| 10 | + </div> | |
| 11 | +</template> | |
| 12 | + | |
| 13 | +<script> | |
| 14 | +</script> | |
| 15 | + | |
| 16 | +<style> | |
| 17 | + .AddUl { | |
| 18 | + list-style: none; | |
| 19 | + padding: none; | |
| 20 | + text-align: center; | |
| 21 | + } | |
| 22 | + .AddUl li { | |
| 23 | + float: left; | |
| 24 | + background-color: #0077AA; | |
| 25 | + width: 300px; | |
| 26 | + height: 200px; | |
| 27 | + line-height: 200px; | |
| 28 | + text-align: center; | |
| 29 | + margin-right: 10px; | |
| 30 | + color: #FFF; | |
| 31 | + font-size: 30px; | |
| 32 | + font-weight: bold; | |
| 33 | + border-radius: 10px; | |
| 34 | + box-shadow: 0 0 10px #808080; | |
| 35 | + cursor: pointer; | |
| 36 | + } | |
| 37 | + .AddUl li:hover{ | |
| 38 | + background-color: #000000; | |
| 39 | + } | |
| 40 | +</style> | ... | ... |
src/views/TestPaper/TestPaperClass.vue
| ... | ... | @@ -216,12 +216,11 @@ this.getTestPaperClassListHeadler(); |
| 216 | 216 | } |
| 217 | 217 | </script> |
| 218 | 218 | |
| 219 | -<style> | |
| 219 | +<style scoped> | |
| 220 | 220 | .seetingsDiv { |
| 221 | 221 | width: 100%; |
| 222 | 222 | height: 60px; |
| 223 | 223 | background: #efefef; |
| 224 | - line-height: 60px; | |
| 225 | 224 | border-radius: 5px; |
| 226 | 225 | box-shadow: 0 0 5px #cdcdcd; |
| 227 | 226 | } |
| ... | ... | @@ -231,7 +230,7 @@ this.getTestPaperClassListHeadler(); |
| 231 | 230 | border: 0px; |
| 232 | 231 | margin-left: 10px; |
| 233 | 232 | box-shadow: 0 0 5px #cdcdcd; |
| 234 | - float: right; | |
| 233 | + float: left; | |
| 235 | 234 | margin-top: 12px; |
| 236 | 235 | margin-right: 10px; |
| 237 | 236 | } | ... | ... |
src/views/TestPaper/TestPaperList.vue
src/views/carousel/index.vue
| ... | ... | @@ -255,12 +255,12 @@ |
| 255 | 255 | } |
| 256 | 256 | </script> |
| 257 | 257 | |
| 258 | -<style> | |
| 258 | +<style scoped> | |
| 259 | 259 | .seetingsDiv { |
| 260 | 260 | width: 100%; |
| 261 | 261 | height: 60px; |
| 262 | 262 | background: #efefef; |
| 263 | - line-height: 60px; | |
| 263 | + | |
| 264 | 264 | border-radius: 5px; |
| 265 | 265 | box-shadow: 0 0 5px #cdcdcd; |
| 266 | 266 | } |
| ... | ... | @@ -270,7 +270,7 @@ |
| 270 | 270 | border: 0px; |
| 271 | 271 | margin-left: 10px; |
| 272 | 272 | box-shadow: 0 0 5px #cdcdcd; |
| 273 | - float: right; | |
| 273 | + float: left; | |
| 274 | 274 | margin-top: 12px; |
| 275 | 275 | margin-right: 10px; |
| 276 | 276 | } | ... | ... |
src/views/carousel/new.vue
| ... | ... | @@ -273,12 +273,11 @@ |
| 273 | 273 | } |
| 274 | 274 | </script> |
| 275 | 275 | |
| 276 | -<style> | |
| 276 | +<style scoped> | |
| 277 | 277 | .seetingsDiv { |
| 278 | 278 | width: 100%; |
| 279 | 279 | height: 60px; |
| 280 | 280 | background: #efefef; |
| 281 | - line-height: 60px; | |
| 282 | 281 | border-radius: 5px; |
| 283 | 282 | box-shadow: 0 0 5px #cdcdcd; |
| 284 | 283 | } |
| ... | ... | @@ -288,7 +287,7 @@ |
| 288 | 287 | border: 0px; |
| 289 | 288 | margin-left: 10px; |
| 290 | 289 | box-shadow: 0 0 5px #cdcdcd; |
| 291 | - float: right; | |
| 290 | + float: left; | |
| 292 | 291 | margin-top: 12px; |
| 293 | 292 | margin-right: 10px; |
| 294 | 293 | } | ... | ... |
src/views/user/adminList.vue
| ... | ... | @@ -345,22 +345,21 @@ |
| 345 | 345 | } |
| 346 | 346 | </script> |
| 347 | 347 | |
| 348 | -<style> | |
| 348 | +<style scoped> | |
| 349 | 349 | .seetingsDiv { |
| 350 | 350 | width: 100%; |
| 351 | 351 | height: 60px; |
| 352 | 352 | background: #efefef; |
| 353 | - line-height: 60px; | |
| 354 | 353 | border-radius: 5px; |
| 355 | 354 | box-shadow: 0 0 5px #cdcdcd; |
| 356 | 355 | } |
| 357 | 356 | |
| 358 | - .seetingsDiv button { | |
| 357 | + .seetingsDiv button { | |
| 359 | 358 | background-color: #304156; |
| 360 | 359 | border: 0px; |
| 361 | 360 | margin-left: 10px; |
| 362 | 361 | box-shadow: 0 0 5px #cdcdcd; |
| 363 | - float: right; | |
| 362 | + float: left; | |
| 364 | 363 | margin-top: 12px; |
| 365 | 364 | margin-right: 10px; |
| 366 | 365 | } | ... | ... |
src/views/user/picuserimport.vue
| 1 | 1 | <template> |
| 2 | - <div style="padding: 10px"> | |
| 3 | - <div class="seetingsDiv" style=""> | |
| 4 | - <div class="flex" style="margin-top: 10px"> | |
| 5 | - <el-form :inline="true" class="demo-form-inline"> | |
| 6 | - <el-form-item label="关键字"> | |
| 7 | - <el-input | |
| 8 | - placeholder="输入关键字搜索" | |
| 9 | - v-model="query.keyword" | |
| 10 | - ></el-input> | |
| 11 | - </el-form-item> | |
| 2 | + <div style="padding: 10px"> | |
| 3 | + <div class="seetingsDiv" style=""> | |
| 4 | + <div class="flex" style="margin-top: 10px"> | |
| 5 | + <el-form :inline="true" class="demo-form-inline"> | |
| 6 | + <el-form-item label="关键字"> | |
| 7 | + <el-input placeholder="输入关键字搜索" v-model="query.keyword"></el-input> | |
| 8 | + </el-form-item> | |
| 12 | 9 | |
| 13 | - <el-form-item label="最高学历"> | |
| 14 | - <el-select v-model="query.xueli" placeholder="最高学历"> | |
| 15 | - <el-option label="大专" value="dazhuan"></el-option> | |
| 16 | - <el-option label="本科" value="benke"></el-option> | |
| 17 | - <el-option label="博士" value="boshi"></el-option> | |
| 18 | - </el-select> | |
| 19 | - </el-form-item> | |
| 10 | + <el-form-item label="最高学历"> | |
| 11 | + <el-select v-model="query.xueli" placeholder="最高学历"> | |
| 12 | + <el-option label="大专" value="dazhuan"></el-option> | |
| 13 | + <el-option label="本科" value="benke"></el-option> | |
| 14 | + <el-option label="博士" value="boshi"></el-option> | |
| 15 | + </el-select> | |
| 16 | + </el-form-item> | |
| 20 | 17 | |
| 21 | - <el-form-item label="性别"> | |
| 22 | - <el-select v-model="query.sex" placeholder="性别"> | |
| 23 | - <el-option label="男" value="1"></el-option> | |
| 24 | - <el-option label="女" value="0"></el-option> | |
| 25 | - </el-select> | |
| 26 | - </el-form-item> | |
| 27 | - </el-form> | |
| 28 | - </div> | |
| 29 | - <div class="flex align-center" style="margin-top: 10px"> | |
| 30 | - <el-button type="success" @click="search">搜索</el-button> | |
| 31 | - <el-button size="mini" @click="handleshare()" type="primary" | |
| 32 | - >批量入库</el-button | |
| 33 | - > | |
| 34 | - <el-button size="mini" @click="handleAdd()" type="primary" | |
| 35 | - >新增一行</el-button | |
| 36 | - > | |
| 37 | - <el-upload | |
| 38 | - class="upload-demo" | |
| 39 | - ref="uploader" | |
| 40 | - action="/api//UserInfo/ResumeIdentification" | |
| 41 | - multiple | |
| 42 | - :headers="{ | |
| 18 | + <el-form-item label="性别"> | |
| 19 | + <el-select v-model="query.sex" placeholder="性别"> | |
| 20 | + <el-option label="男" value="1"></el-option> | |
| 21 | + <el-option label="女" value="0"></el-option> | |
| 22 | + </el-select> | |
| 23 | + </el-form-item> | |
| 24 | + </el-form> | |
| 25 | + </div> | |
| 26 | + <div class="flex align-center" style="margin-top: 10px"> | |
| 27 | + <el-button type="success" @click="search">搜索</el-button> | |
| 28 | + <el-button size="mini" @click="handleshare()" type="primary">批量入库</el-button> | |
| 29 | + <el-button size="mini" @click="handleAdd()" type="primary">新增一行</el-button> | |
| 30 | + <el-upload class="upload-demo" ref="uploader" action="/api//UserInfo/ResumeIdentification" multiple | |
| 31 | + :headers="{ | |
| 43 | 32 | Authorization: Authorization, |
| 44 | - }" | |
| 45 | - :limit="100" | |
| 46 | - :show-file-list="false" | |
| 47 | - :on-exceed="handleExceed" | |
| 48 | - :on-success="handleSuccess" | |
| 49 | - > | |
| 50 | - <el-button size="small" type="primary">上传简历</el-button> | |
| 51 | - </el-upload> | |
| 52 | - </div> | |
| 53 | - </div> | |
| 54 | - <div class="main-box"> | |
| 55 | - <div class="doc-view" v-if="currentFilePath"> | |
| 56 | - <iframe | |
| 57 | - style="width: 100%; height: 100%" | |
| 58 | - v-if="currentFilePath && currentFilePath.indexOf('.pdf') !=-1" | |
| 59 | - :src=" | |
| 33 | + }" :limit="100" :show-file-list="false" :on-exceed="handleExceed" :on-success="handleSuccess"> | |
| 34 | + <el-button size="small" type="primary">上传简历</el-button> | |
| 35 | + </el-upload> | |
| 36 | + </div> | |
| 37 | + </div> | |
| 38 | + <div class="main-box"> | |
| 39 | + <div class="doc-view" v-if="currentFilePath"> | |
| 40 | + <iframe style="width: 100%; height: 100%" | |
| 41 | + v-if="currentFilePath && currentFilePath.indexOf('.pdf') !=-1" :src=" | |
| 60 | 42 | BASE_ROOT_DOMAIN + '/pdf/web/viewer.html?file=' + BASE_ROOT_DOMAIN +currentFilePath |
| 61 | - " | |
| 62 | - frameborder="0" | |
| 63 | - ></iframe> | |
| 64 | - <el-image v-else :src=" BASE_ROOT_DOMAIN +currentFilePath"> | |
| 43 | + " frameborder="0"></iframe> | |
| 44 | + <el-image v-else :src=" BASE_ROOT_DOMAIN +currentFilePath"> | |
| 65 | 45 | |
| 66 | - </el-image> | |
| 67 | - </div> | |
| 68 | - <el-table | |
| 69 | - ref="mytable" | |
| 70 | - :data="table_data" | |
| 71 | - style="width: 100%;height:calc(100vh - 260px)" | |
| 72 | - border | |
| 73 | - @selection-change="handleSelectionChange" | |
| 74 | - > | |
| 75 | - <el-table-column v-if="radio" type="index" width="50"></el-table-column> | |
| 76 | - <el-table-column | |
| 77 | - v-if="selection" | |
| 78 | - type="selection" | |
| 79 | - width="55" | |
| 80 | - ></el-table-column> | |
| 81 | - <el-table-column | |
| 82 | - align="center" | |
| 83 | - v-for="(item, index, key) in table_columns" | |
| 84 | - :width="item.width" | |
| 85 | - :item="item" | |
| 86 | - :key="key" | |
| 87 | - :index="index" | |
| 88 | - :label="item.label" | |
| 89 | - > | |
| 90 | - <template slot-scope="scope"> | |
| 91 | - <el-input | |
| 92 | - v-if="scope.row.edit" | |
| 93 | - size="small" | |
| 94 | - v-model="scope.row[item.prop]" | |
| 95 | - :placeholder="'请输入' + item.label" | |
| 96 | - > | |
| 97 | - </el-input> | |
| 98 | - <span v-if="!scope.row.edit" | |
| 99 | - >{{ scope.row[item.prop] }}</span | |
| 100 | - > | |
| 101 | - </template> | |
| 102 | - </el-table-column> | |
| 103 | - <el-table-column label="操作" align="center" width="300" fixed="right"> | |
| 104 | - <template slot-scope="scope"> | |
| 105 | - <!-- 全局控制的编辑 --> | |
| 106 | - <div | |
| 107 | - v-if="is_edit && scope.row.add == undefined" | |
| 108 | - style="display: inline-block" | |
| 109 | - > | |
| 110 | - <!-- 编辑 --> | |
| 111 | - <el-button | |
| 112 | - size="mini" | |
| 113 | - v-if="!scope.row.edit" | |
| 114 | - @click="handleEdit(scope.$index, scope.row)" | |
| 115 | - type="primary" | |
| 116 | - >编辑 | |
| 117 | - </el-button> | |
| 118 | - <!-- 保存 --> | |
| 119 | - <el-button | |
| 120 | - size="mini" | |
| 121 | - type="success" | |
| 122 | - :plain="true" | |
| 123 | - v-if="scope.row.edit" | |
| 124 | - @click="handleSave(scope.$index, scope.row)" | |
| 125 | - >保存</el-button | |
| 126 | - > | |
| 127 | - <el-button | |
| 128 | - size="mini" | |
| 129 | - :plain="true" | |
| 130 | - v-if="scope.row.edit" | |
| 131 | - @click="handleCancelSave(scope.$index, scope.row)" | |
| 132 | - >取消</el-button | |
| 133 | - > | |
| 134 | - </div> | |
| 135 | - <!-- 添加控制 --> | |
| 136 | - <div | |
| 137 | - v-if="scope.row.add != undefined && scope.row.add" | |
| 138 | - style="display: inline-block" | |
| 139 | - > | |
| 140 | - <!-- 保存 --> | |
| 141 | - <el-button | |
| 142 | - size="mini" | |
| 143 | - type="success" | |
| 144 | - :plain="true" | |
| 145 | - v-if="scope.row.edit" | |
| 146 | - @click="handleSave(scope.$index, scope.row)" | |
| 147 | - >保存</el-button | |
| 148 | - > | |
| 149 | - </div> | |
| 150 | - <!-- 全局控制删除 --> | |
| 151 | - <el-button | |
| 152 | - size="mini" | |
| 153 | - v-if="is_delete && scope.row.add == undefined" | |
| 154 | - :plain="true" | |
| 155 | - type="warning" | |
| 156 | - style="margin-left: 10px" | |
| 157 | - @click="handleshare(scope.$index, scope.row)" | |
| 158 | - >确认入库</el-button | |
| 159 | - > | |
| 160 | - <el-button | |
| 161 | - size="mini" | |
| 162 | - v-if="is_delete && scope.row.add == undefined" | |
| 163 | - :plain="true" | |
| 164 | - type="danger" | |
| 165 | - style="margin-left: 10px" | |
| 166 | - @click="handleDelete(scope.$index, scope.row)" | |
| 167 | - >删除</el-button | |
| 168 | - > | |
| 169 | - </template> | |
| 170 | - </el-table-column> | |
| 171 | - </el-table> | |
| 172 | - | |
| 173 | - </div> | |
| 174 | - <div class="page-box"> | |
| 175 | - <el-pagination | |
| 176 | - background | |
| 177 | - layout="prev, pager, next" | |
| 178 | - :total="queryResult.totalCount" | |
| 179 | - > | |
| 180 | - </el-pagination> | |
| 181 | - </div> | |
| 182 | - </div> | |
| 46 | + </el-image> | |
| 47 | + </div> | |
| 48 | + <el-table ref="mytable" :data="table_data" style="width: 100%;height:calc(100vh - 260px)" border | |
| 49 | + @selection-change="handleSelectionChange"> | |
| 50 | + <el-table-column v-if="radio" type="index" width="50"></el-table-column> | |
| 51 | + <el-table-column v-if="selection" type="selection" width="55"></el-table-column> | |
| 52 | + <el-table-column align="center" v-for="(item, index, key) in table_columns" :width="item.width" | |
| 53 | + :item="item" :key="key" :index="index" :label="item.label"> | |
| 54 | + <template slot-scope="scope"> | |
| 55 | + <el-input v-if="scope.row.edit" size="small" v-model="scope.row[item.prop]" | |
| 56 | + :placeholder="'请输入' + item.label"> | |
| 57 | + </el-input> | |
| 58 | + <span v-if="!scope.row.edit">{{ scope.row[item.prop] }}</span> | |
| 59 | + </template> | |
| 60 | + </el-table-column> | |
| 61 | + <el-table-column label="操作" align="center" width="300" fixed="right"> | |
| 62 | + <template slot-scope="scope"> | |
| 63 | + <!-- 全局控制的编辑 --> | |
| 64 | + <div v-if="is_edit && scope.row.add == undefined" style="display: inline-block"> | |
| 65 | + <!-- 编辑 --> | |
| 66 | + <el-button size="mini" v-if="!scope.row.edit" @click="handleEdit(scope.$index, scope.row)" | |
| 67 | + type="primary">编辑 | |
| 68 | + </el-button> | |
| 69 | + <!-- 保存 --> | |
| 70 | + <el-button size="mini" type="success" :plain="true" v-if="scope.row.edit" | |
| 71 | + @click="handleSave(scope.$index, scope.row)">保存</el-button> | |
| 72 | + <el-button size="mini" :plain="true" v-if="scope.row.edit" | |
| 73 | + @click="handleCancelSave(scope.$index, scope.row)">取消</el-button> | |
| 74 | + </div> | |
| 75 | + <!-- 添加控制 --> | |
| 76 | + <div v-if="scope.row.add != undefined && scope.row.add" style="display: inline-block"> | |
| 77 | + <!-- 保存 --> | |
| 78 | + <el-button size="mini" type="success" :plain="true" v-if="scope.row.edit" | |
| 79 | + @click="handleSave(scope.$index, scope.row)">保存</el-button> | |
| 80 | + </div> | |
| 81 | + <!-- 全局控制删除 --> | |
| 82 | + <el-button size="mini" v-if="is_delete && scope.row.add == undefined" :plain="true" | |
| 83 | + type="warning" style="margin-left: 10px" @click="handleshare(scope.$index, scope.row)">确认入库 | |
| 84 | + </el-button> | |
| 85 | + <el-button size="mini" v-if="is_delete && scope.row.add == undefined" :plain="true" | |
| 86 | + type="danger" style="margin-left: 10px" @click="handleDelete(scope.$index, scope.row)">删除 | |
| 87 | + </el-button> | |
| 88 | + </template> | |
| 89 | + </el-table-column> | |
| 90 | + </el-table> | |
| 91 | + | |
| 92 | + </div> | |
| 93 | + <div class="page-box"> | |
| 94 | + <el-pagination background layout="prev, pager, next" :total="queryResult.totalCount"> | |
| 95 | + </el-pagination> | |
| 96 | + </div> | |
| 97 | + </div> | |
| 183 | 98 | </template> |
| 184 | 99 | |
| 185 | 100 | <script> |
| 186 | -import { | |
| 187 | - UserInfo_BatchToUser, | |
| 188 | - UserInfo_Delete, | |
| 189 | - UserInfo_Update, | |
| 190 | - UserInfo_List, | |
| 191 | -} from "@/api/user"; | |
| 192 | -export default { | |
| 193 | - data() { | |
| 194 | - return { | |
| 195 | - currentFilePath: "", | |
| 196 | - queryResult: {}, | |
| 197 | - queryModel: { | |
| 198 | - pageIndex: 1, | |
| 199 | - pageSize: 10, | |
| 200 | - }, | |
| 201 | - query: {}, | |
| 202 | - new_date_json: {}, //数据结构 | |
| 203 | - multipleSelection: [], //复选框,数据 | |
| 204 | - is_edit: true, //是否可编辑 | |
| 205 | - is_delete: true, //是否可删除 | |
| 206 | - selection: true, //是否需要复选框 | |
| 207 | - radio: false, //单选变色 | |
| 208 | - space_color: true, //隔行变色 | |
| 209 | - //表头信息 | |
| 210 | - table_columns: [ | |
| 211 | - { | |
| 212 | - prop: "FullName", | |
| 213 | - label: "姓名", | |
| 214 | - width: "150", | |
| 215 | - }, | |
| 216 | - { | |
| 217 | - prop: "PhoneNumber", | |
| 218 | - label: "手机号", | |
| 219 | - width: "150", | |
| 220 | - }, | |
| 221 | - { | |
| 222 | - prop: "DateBirth", | |
| 223 | - label: "出生日期", | |
| 224 | - width: "180", | |
| 225 | - }, | |
| 226 | - { | |
| 227 | - prop: "Gender", | |
| 228 | - label: "性别", | |
| 229 | - width: "80", | |
| 230 | - }, | |
| 231 | - { | |
| 232 | - prop: "GraduationSchool", | |
| 233 | - label: "毕业学校", | |
| 234 | - width: "200", | |
| 235 | - }, | |
| 236 | - { | |
| 237 | - prop: "GraduationMajor", | |
| 238 | - label: "专业", | |
| 239 | - width: "200", | |
| 240 | - }, | |
| 241 | - { | |
| 242 | - prop: "Education", | |
| 243 | - label: "最高学历", | |
| 244 | - width: "", | |
| 245 | - }, | |
| 246 | - { | |
| 247 | - prop: "IntendedCity", | |
| 248 | - label: "城市", | |
| 249 | - width: "150", | |
| 250 | - }, | |
| 251 | - ], | |
| 252 | - //表格数据 | |
| 253 | - table_data: [], | |
| 254 | - }; | |
| 255 | - }, | |
| 256 | - methods: { | |
| 257 | - handleExceed() {}, | |
| 258 | - handleSuccess(res) { | |
| 259 | - this.$refs.uploader.clearFiles(); | |
| 260 | - this.search(); | |
| 261 | - }, | |
| 262 | - search() { | |
| 263 | - this.queryModel.pageIndex = 1; | |
| 264 | - this.getList(); | |
| 265 | - }, | |
| 266 | - getList() { | |
| 267 | - UserInfo_List(this.queryModel).then((res) => { | |
| 268 | - this.queryResult = res.data; | |
| 269 | - if (res.data.data && res.data.data.length) { | |
| 270 | - res.data.data = res.data.data.map((t) => { | |
| 271 | - t.DataJsonObj = JSON.parse(t.DataJson); | |
| 272 | - return t; | |
| 273 | - }); | |
| 274 | - } | |
| 275 | - this.table_data = res.data.data; | |
| 276 | - }); | |
| 277 | - }, | |
| 278 | - //隔行变色 | |
| 279 | - tableRowClassName() { | |
| 280 | - //选取DOM节点 | |
| 281 | - var trs = this.$refs.mytable.$el | |
| 282 | - .getElementsByTagName("tbody")[0] | |
| 283 | - .getElementsByTagName("tr"); | |
| 284 | - for (var i in trs) { | |
| 285 | - if (i % 2 == 0) { | |
| 286 | - //当隔行变色未true时改变颜色 | |
| 287 | - if (this.space_color) { | |
| 288 | - trs[i].style.backgroundColor = "#f0f9eb"; | |
| 289 | - } else { | |
| 290 | - trs[i].style.backgroundColor = ""; | |
| 291 | - } | |
| 292 | - } | |
| 293 | - } | |
| 294 | - }, | |
| 101 | + import { | |
| 102 | + UserInfo_BatchToUser, | |
| 103 | + UserInfo_Delete, | |
| 104 | + UserInfo_Update, | |
| 105 | + UserInfo_List, | |
| 106 | + } from "@/api/user"; | |
| 107 | +import { formatTime } from '@/utils/util' | |
| 108 | + export default { | |
| 109 | + data() { | |
| 110 | + return { | |
| 111 | + currentFilePath: "", | |
| 112 | + queryResult: {}, | |
| 113 | + queryModel: { | |
| 114 | + pageIndex: 1, | |
| 115 | + pageSize: 10, | |
| 116 | + }, | |
| 117 | + query: {}, | |
| 118 | + new_date_json: {}, //数据结构 | |
| 119 | + multipleSelection: [], //复选框,数据 | |
| 120 | + is_edit: true, //是否可编辑 | |
| 121 | + is_delete: true, //是否可删除 | |
| 122 | + selection: true, //是否需要复选框 | |
| 123 | + radio: false, //单选变色 | |
| 124 | + space_color: true, //隔行变色 | |
| 125 | + //表头信息 | |
| 126 | + table_columns: [{ | |
| 127 | + prop: "FullName", | |
| 128 | + label: "姓名", | |
| 129 | + width: "150", | |
| 130 | + }, | |
| 131 | + { | |
| 132 | + prop: "PhoneNumber", | |
| 133 | + label: "手机号", | |
| 134 | + width: "150", | |
| 135 | + }, | |
| 136 | + { | |
| 137 | + prop: "DateBirth", | |
| 138 | + label: "出生日期", | |
| 139 | + width: "180", | |
| 140 | + }, | |
| 141 | + { | |
| 142 | + prop: "Gender", | |
| 143 | + label: "性别", | |
| 144 | + width: "80", | |
| 145 | + }, | |
| 146 | + { | |
| 147 | + prop: "GraduationSchool", | |
| 148 | + label: "毕业学校", | |
| 149 | + width: "200", | |
| 150 | + }, | |
| 151 | + { | |
| 152 | + prop: "GraduationMajor", | |
| 153 | + label: "专业", | |
| 154 | + width: "200", | |
| 155 | + }, | |
| 156 | + { | |
| 157 | + prop: "Education", | |
| 158 | + label: "最高学历", | |
| 159 | + width: "", | |
| 160 | + }, | |
| 161 | + { | |
| 162 | + prop: "IntendedCity", | |
| 163 | + label: "城市", | |
| 164 | + width: "150", | |
| 165 | + }, | |
| 166 | + ], | |
| 167 | + //表格数据 | |
| 168 | + table_data: [], | |
| 169 | + }; | |
| 170 | + }, | |
| 171 | + methods: { | |
| 172 | + handleExceed() {}, | |
| 173 | + handleSuccess(res) { | |
| 174 | + this.$refs.uploader.clearFiles(); | |
| 175 | + this.search(); | |
| 176 | + }, | |
| 177 | + search() { | |
| 178 | + this.queryModel.pageIndex = 1; | |
| 179 | + this.getList(); | |
| 180 | + }, | |
| 181 | + getList() { | |
| 182 | + UserInfo_List(this.queryModel).then((res) => { | |
| 183 | + this.queryResult = res.data; | |
| 184 | + if (res.data.data && res.data.data.length) { | |
| 185 | + res.data.data = res.data.data.map((t) => { | |
| 186 | + t.DataJsonObj = JSON.parse(t.DataJson); | |
| 187 | + return t; | |
| 188 | + }); | |
| 189 | + } | |
| 190 | + this.table_data = res.data.data.map(t => { | |
| 191 | + t.DateBirth = formatTime(t.DateBirth,'yyyy-MM-dd'); | |
| 192 | + return t; | |
| 193 | + }); | |
| 194 | + }); | |
| 195 | + }, | |
| 196 | + //隔行变色 | |
| 197 | + tableRowClassName() { | |
| 198 | + //选取DOM节点 | |
| 199 | + var trs = this.$refs.mytable.$el | |
| 200 | + .getElementsByTagName("tbody")[0] | |
| 201 | + .getElementsByTagName("tr"); | |
| 202 | + for (var i in trs) { | |
| 203 | + if (i % 2 == 0) { | |
| 204 | + //当隔行变色未true时改变颜色 | |
| 205 | + if (this.space_color) { | |
| 206 | + trs[i].style.backgroundColor = "#f0f9eb"; | |
| 207 | + } else { | |
| 208 | + trs[i].style.backgroundColor = ""; | |
| 209 | + } | |
| 210 | + } | |
| 211 | + } | |
| 212 | + }, | |
| 213 | + | |
| 214 | + //多选框 | |
| 215 | + handleSelectionChange(val) { | |
| 216 | + this.multipleSelection = val; | |
| 217 | + console.log("selection:", this.multipleSelection); | |
| 218 | + }, | |
| 295 | 219 | |
| 296 | - //多选框 | |
| 297 | - handleSelectionChange(val) { | |
| 298 | - this.multipleSelection = val; | |
| 299 | - console.log("selection:", this.multipleSelection); | |
| 300 | - }, | |
| 220 | + //编辑 | |
| 221 | + handleEdit(index, row) { | |
| 222 | + if (row.ViewPath) { | |
| 223 | + this.currentFilePath = row.ViewPath; | |
| 224 | + } else { | |
| 225 | + this.currentFilePath = ''; | |
| 226 | + } | |
| 227 | + // debugger; | |
| 228 | + // if(this.table_data) | |
| 229 | + // this.table_data = this.table_data.map(t=>{ | |
| 230 | + // t.edit = false; | |
| 231 | + // return t; | |
| 232 | + // }) | |
| 233 | + this.table_data.forEach((o, i) => { | |
| 234 | + this.$set(this.table_data[i], 'edit', i == index) | |
| 235 | + }); | |
| 236 | + // this.table_data = Object.assign({},this.table_data); | |
| 237 | + // this.table_data[index].edit = true; | |
| 238 | + // this.table_data.push(this.table_data.pop()); | |
| 239 | + // this.$forceUpdate(); | |
| 301 | 240 | |
| 302 | - //编辑 | |
| 303 | - handleEdit(index, row) { | |
| 304 | - if (row.ViewPath) { | |
| 305 | - this.currentFilePath = row.ViewPath; | |
| 306 | - }else{ | |
| 307 | - this.currentFilePath = ''; | |
| 308 | - } | |
| 309 | - // debugger; | |
| 310 | - // if(this.table_data) | |
| 311 | - // this.table_data = this.table_data.map(t=>{ | |
| 312 | - // t.edit = false; | |
| 313 | - // return t; | |
| 314 | - // }) | |
| 315 | - this.table_data.forEach((o,i)=>{ | |
| 316 | - this.$set(this.table_data[i],'edit',i==index) | |
| 317 | - }); | |
| 318 | - // this.table_data = Object.assign({},this.table_data); | |
| 319 | - // this.table_data[index].edit = true; | |
| 320 | - // this.table_data.push(this.table_data.pop()); | |
| 321 | - // this.$forceUpdate(); | |
| 241 | + // this.$set(this.table_data[index],'edit',true) | |
| 242 | + }, | |
| 243 | + //删除 | |
| 244 | + handleDelete(index, row) { | |
| 245 | + console.log(index, row); | |
| 322 | 246 | |
| 323 | - // this.$set(this.table_data[index],'edit',true) | |
| 324 | - }, | |
| 325 | - //删除 | |
| 326 | - handleDelete(index, row) { | |
| 327 | - console.log(index, row); | |
| 247 | + this.table_data.splice(index, 1); | |
| 248 | + UserInfo_Delete(row.id); | |
| 249 | + this.$message({ | |
| 250 | + message: "删除成功!", | |
| 251 | + type: "success", | |
| 252 | + }); | |
| 253 | + }, | |
| 328 | 254 | |
| 329 | - this.table_data.splice(index, 1); | |
| 330 | - UserInfo_Delete(row.id); | |
| 331 | - this.$message({ | |
| 332 | - message: "删除成功!", | |
| 333 | - type: "success", | |
| 334 | - }); | |
| 335 | - }, | |
| 255 | + handleshare(index, row) { | |
| 256 | + if (!row) { | |
| 257 | + this.table_data = []; | |
| 258 | + } else { | |
| 259 | + console.log(index, row); | |
| 336 | 260 | |
| 337 | - handleshare(index, row) { | |
| 338 | - if (!row) { | |
| 339 | - this.table_data = []; | |
| 340 | - } else { | |
| 341 | - console.log(index, row); | |
| 342 | - | |
| 343 | - } | |
| 344 | - UserInfo_BatchToUser(row.id).then(res=>{ | |
| 345 | - this.table_data.splice(index, 1); | |
| 346 | - }); | |
| 347 | - }, | |
| 261 | + } | |
| 262 | + UserInfo_BatchToUser(row.id).then(res => { | |
| 263 | + this.table_data.splice(index, 1); | |
| 264 | + }); | |
| 265 | + }, | |
| 348 | 266 | |
| 349 | - //保存 | |
| 350 | - handleSave(index, row) { | |
| 351 | - delete this.table_data[index].edit; | |
| 352 | - let formData = { ...row }; | |
| 353 | - delete formData.DataJsonObj; | |
| 354 | - UserInfo_Update(row); | |
| 355 | - this.table_data.push(this.table_data.pop()); | |
| 356 | - this.$forceUpdate(); | |
| 357 | - this.$message({ | |
| 358 | - message: "保存成功!", | |
| 359 | - type: "success", | |
| 360 | - }); | |
| 361 | - }, | |
| 362 | - handleCancelSave(index, row){ | |
| 363 | - delete this.table_data[index].edit; | |
| 364 | - if(this.currentFilePath == row.ViewPath){ | |
| 365 | - this.currentFilePath = ''; | |
| 366 | - } | |
| 367 | - this.table_data.push(this.table_data.pop()); | |
| 368 | - }, | |
| 369 | - handleAdd() { | |
| 370 | - var addDataJson = {}; | |
| 371 | - for (var key in this.new_date_json) { | |
| 372 | - if (key === "edit") { | |
| 373 | - delete addDataJson[key]; | |
| 374 | - } else if (key === "add") { | |
| 375 | - delete addDataJson[key]; | |
| 376 | - } else { | |
| 377 | - addDataJson[key] = ""; | |
| 378 | - } | |
| 379 | - } | |
| 380 | - addDataJson.edit = true; | |
| 381 | - addDataJson.add = true; | |
| 382 | - this.table_data.push(addDataJson); | |
| 383 | - }, | |
| 384 | - //初始化编辑属性 | |
| 385 | - initEditAttribute() { | |
| 386 | - var self = this; | |
| 387 | - var edit = self.edit; | |
| 388 | - }, | |
| 389 | - initAddDataJson(dataArray) { | |
| 390 | - //新增时,初始化数据结构 | |
| 391 | - var dataJson = dataArray; | |
| 392 | - var newDateJson = {}; | |
| 393 | - for (var key in dataJson) { | |
| 394 | - if (key === "edit") { | |
| 395 | - newDateJson[key] = "true"; | |
| 396 | - } else { | |
| 397 | - newDateJson[key] = ""; | |
| 398 | - } | |
| 399 | - } | |
| 400 | - newDateJson["add"] = true; | |
| 401 | - this.new_date_json = newDateJson; | |
| 402 | - }, | |
| 403 | - }, | |
| 404 | - created() { | |
| 405 | - this.getList(); | |
| 406 | - }, | |
| 407 | - mounted: function () { | |
| 408 | - this.initEditAttribute(); | |
| 409 | - //确保方法在页面渲染后调用 | |
| 410 | - this.$nextTick(function () { | |
| 411 | - /////方法 | |
| 412 | - this.tableRowClassName(); | |
| 413 | - }); | |
| 414 | - }, | |
| 415 | - watch: { | |
| 416 | - space_color: function () { | |
| 417 | - //监听数据变化 | |
| 418 | - this.$nextTick(function () { | |
| 419 | - /////方法 | |
| 420 | - this.tableRowClassName(); | |
| 421 | - }); | |
| 422 | - }, | |
| 423 | - table_data: function () { | |
| 424 | - //监听数据变化f | |
| 425 | - this.$nextTick(function () { | |
| 426 | - /////方法 | |
| 427 | - this.tableRowClassName(); | |
| 428 | - }); | |
| 429 | - }, | |
| 430 | - }, | |
| 431 | -}; | |
| 267 | + //保存 | |
| 268 | + handleSave(index, row) { | |
| 269 | + delete this.table_data[index].edit; | |
| 270 | + let formData = { | |
| 271 | + ...row | |
| 272 | + }; | |
| 273 | + delete formData.DataJsonObj; | |
| 274 | + UserInfo_Update(row); | |
| 275 | + this.table_data.push(this.table_data.pop()); | |
| 276 | + this.$forceUpdate(); | |
| 277 | + this.$message({ | |
| 278 | + message: "保存成功!", | |
| 279 | + type: "success", | |
| 280 | + }); | |
| 281 | + }, | |
| 282 | + handleCancelSave(index, row) { | |
| 283 | + delete this.table_data[index].edit; | |
| 284 | + if (this.currentFilePath == row.ViewPath) { | |
| 285 | + this.currentFilePath = ''; | |
| 286 | + } | |
| 287 | + this.table_data.push(this.table_data.pop()); | |
| 288 | + }, | |
| 289 | + handleAdd() { | |
| 290 | + var addDataJson = {}; | |
| 291 | + for (var key in this.new_date_json) { | |
| 292 | + if (key === "edit") { | |
| 293 | + delete addDataJson[key]; | |
| 294 | + } else if (key === "add") { | |
| 295 | + delete addDataJson[key]; | |
| 296 | + } else { | |
| 297 | + addDataJson[key] = ""; | |
| 298 | + } | |
| 299 | + } | |
| 300 | + addDataJson.edit = true; | |
| 301 | + addDataJson.add = true; | |
| 302 | + this.table_data.push(addDataJson); | |
| 303 | + }, | |
| 304 | + //初始化编辑属性 | |
| 305 | + initEditAttribute() { | |
| 306 | + var self = this; | |
| 307 | + var edit = self.edit; | |
| 308 | + }, | |
| 309 | + initAddDataJson(dataArray) { | |
| 310 | + //新增时,初始化数据结构 | |
| 311 | + var dataJson = dataArray; | |
| 312 | + var newDateJson = {}; | |
| 313 | + for (var key in dataJson) { | |
| 314 | + if (key === "edit") { | |
| 315 | + newDateJson[key] = "true"; | |
| 316 | + } else { | |
| 317 | + newDateJson[key] = ""; | |
| 318 | + } | |
| 319 | + } | |
| 320 | + newDateJson["add"] = true; | |
| 321 | + this.new_date_json = newDateJson; | |
| 322 | + }, | |
| 323 | + }, | |
| 324 | + created() { | |
| 325 | + this.getList(); | |
| 326 | + }, | |
| 327 | + mounted: function() { | |
| 328 | + this.initEditAttribute(); | |
| 329 | + //确保方法在页面渲染后调用 | |
| 330 | + this.$nextTick(function() { | |
| 331 | + /////方法 | |
| 332 | + this.tableRowClassName(); | |
| 333 | + }); | |
| 334 | + }, | |
| 335 | + watch: { | |
| 336 | + space_color: function() { | |
| 337 | + //监听数据变化 | |
| 338 | + this.$nextTick(function() { | |
| 339 | + /////方法 | |
| 340 | + this.tableRowClassName(); | |
| 341 | + }); | |
| 342 | + }, | |
| 343 | + table_data: function() { | |
| 344 | + //监听数据变化f | |
| 345 | + this.$nextTick(function() { | |
| 346 | + /////方法 | |
| 347 | + this.tableRowClassName(); | |
| 348 | + }); | |
| 349 | + }, | |
| 350 | + }, | |
| 351 | + }; | |
| 432 | 352 | </script> |
| 433 | 353 | <style scoped> |
| 434 | - /deep/.el-table__body-wrapper{ | |
| 435 | - height:92% !important; | |
| 436 | - } | |
| 354 | + /deep/.el-table__body-wrapper { | |
| 355 | + height: 92% !important; | |
| 356 | + } | |
| 437 | 357 | </style> |
| 438 | 358 | <style lang="scss" scoped> |
| 439 | - | |
| 440 | -.main-box{ | |
| 441 | - display: flex; | |
| 442 | -} | |
| 443 | -.doc-view { | |
| 444 | - margin-left: 10px; | |
| 445 | - width: 100%; | |
| 446 | - flex: 1; | |
| 447 | - overflow: hidden; | |
| 448 | -} | |
| 449 | -.el-table__expanded-cell { | |
| 450 | - padding: 10px; | |
| 451 | -} | |
| 452 | -.demo-table-expand { | |
| 453 | - display: flex; | |
| 454 | - justify-content: space-between; | |
| 455 | - flex-wrap: wrap; | |
| 456 | - box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); | |
| 457 | - padding: 20px; | |
| 458 | - border-radius: 10px; | |
| 459 | -} | |
| 460 | -.demo-table-expand .el-form-item { | |
| 461 | - margin-bottom: 10px !important; | |
| 462 | - min-width: 20%; | |
| 463 | - max-width: 50%; | |
| 464 | -} | |
| 465 | -.demo-form-inline { | |
| 466 | - display: flex; | |
| 467 | - align-items: center; | |
| 468 | -} | |
| 469 | -.el-form--inline .el-form-item { | |
| 470 | - display: flex; | |
| 471 | - align-items: center; | |
| 472 | - margin-bottom: 0; | |
| 473 | -} | |
| 474 | -.aligin-center { | |
| 475 | - align-items: center; | |
| 476 | -} | |
| 477 | -.seetingsDiv { | |
| 478 | - display: flex; | |
| 479 | - align-items: center; | |
| 480 | - width: 100%; | |
| 481 | - height: auto; | |
| 482 | - padding: 30px; | |
| 483 | - background: #efefef; | |
| 484 | - /* line-height: 60px; */ | |
| 485 | - border-radius: 5px; | |
| 486 | - box-shadow: 0 0 5px #cdcdcd; | |
| 487 | - justify-content: space-between; | |
| 488 | - flex-wrap: wrap; | |
| 489 | - margin-bottom: 20px; | |
| 490 | -} | |
| 491 | - | |
| 492 | -.seetingsDiv button { | |
| 493 | - height: 40px; | |
| 494 | - background-color: #304156; | |
| 495 | - border: 0px; | |
| 496 | - margin-left: 10px; | |
| 497 | - box-shadow: 0 0 5px #cdcdcd; | |
| 498 | - float: none; | |
| 499 | - margin-right: 10px; | |
| 500 | - margin-top: 0; | |
| 501 | -} | |
| 502 | -</style> | |
| 503 | 359 | \ No newline at end of file |
| 360 | + .main-box { | |
| 361 | + display: flex; | |
| 362 | + } | |
| 363 | + .doc-view { | |
| 364 | + margin-left: 10px; | |
| 365 | + width: 100%; | |
| 366 | + flex: 1; | |
| 367 | + overflow: hidden; | |
| 368 | + } | |
| 369 | + .el-table__expanded-cell { | |
| 370 | + padding: 10px; | |
| 371 | + } | |
| 372 | + .demo-table-expand { | |
| 373 | + display: flex; | |
| 374 | + justify-content: space-between; | |
| 375 | + flex-wrap: wrap; | |
| 376 | + box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); | |
| 377 | + padding: 20px; | |
| 378 | + border-radius: 10px; | |
| 379 | + } | |
| 380 | + .demo-table-expand .el-form-item { | |
| 381 | + margin-bottom: 10px !important; | |
| 382 | + min-width: 20%; | |
| 383 | + max-width: 50%; | |
| 384 | + } | |
| 385 | + .demo-form-inline { | |
| 386 | + display: flex; | |
| 387 | + align-items: center; | |
| 388 | + } | |
| 389 | + .el-form--inline .el-form-item { | |
| 390 | + display: flex; | |
| 391 | + align-items: center; | |
| 392 | + margin-bottom: 0; | |
| 393 | + } | |
| 394 | + .aligin-center { | |
| 395 | + align-items: center; | |
| 396 | + } | |
| 397 | + .seetingsDiv { | |
| 398 | + display: flex; | |
| 399 | + align-items: center; | |
| 400 | + width: 100%; | |
| 401 | + height: auto; | |
| 402 | + padding: 30px; | |
| 403 | + background: #efefef; | |
| 404 | + /* line-height: 60px; */ | |
| 405 | + border-radius: 5px; | |
| 406 | + box-shadow: 0 0 5px #cdcdcd; | |
| 407 | + justify-content: space-between; | |
| 408 | + flex-wrap: wrap; | |
| 409 | + margin-bottom: 20px; | |
| 410 | + } | |
| 411 | + .seetingsDiv button { | |
| 412 | + height: 40px; | |
| 413 | + background-color: #304156; | |
| 414 | + border: 0px; | |
| 415 | + margin-left: 10px; | |
| 416 | + box-shadow: 0 0 5px #cdcdcd; | |
| 417 | + float: none; | |
| 418 | + margin-right: 10px; | |
| 419 | + margin-top: 0; | |
| 420 | + } | |
| 421 | +</style> | ... | ... |
src/views/user/userlist.vue
| 1 | 1 | <template> |
| 2 | - <div class="app-container"> | |
| 2 | + <div class="app-container" style="clear: both;"> | |
| 3 | + | |
| 3 | 4 | <div class="seetingsDiv" style=""> |
| 4 | 5 | <div class="flex" style="width: 85%"> |
| 5 | 6 | <el-form :inline="true" class="demo-form-inline"> |
| ... | ... | @@ -432,7 +433,8 @@ |
| 432 | 433 | AddInvitationAnswerMultiple, |
| 433 | 434 | AddInvitationCompanyMultiple, |
| 434 | 435 | UsersDelete, |
| 435 | - ChangeTags | |
| 436 | + ChangeTags, | |
| 437 | + SelectPhoneBool | |
| 436 | 438 | } from "@/api/user"; |
| 437 | 439 | import { |
| 438 | 440 | GetUserClassList, |
| ... | ... | @@ -692,10 +694,17 @@ |
| 692 | 694 | let formData = { ...this.adminUserInfo }; |
| 693 | 695 | console.log('submitForm', JSON.stringify(formData)); |
| 694 | 696 | if (formData.id) { |
| 695 | - UsersUpdate(formData).then((res) => { | |
| 696 | - this.GetUser(); | |
| 697 | - console.log(res); | |
| 698 | - }); | |
| 697 | + | |
| 698 | + SelectPhoneBool(formData.id,formData.phone).then(res=>{ | |
| 699 | + if(res.data==true){ | |
| 700 | + this.$message.error("电话号码已存在!"); | |
| 701 | + }else{ | |
| 702 | + UsersUpdate(formData).then((res) => { | |
| 703 | + this.GetUser(); | |
| 704 | + console.log(res); | |
| 705 | + }); | |
| 706 | + } | |
| 707 | + }); | |
| 699 | 708 | } |
| 700 | 709 | this.dialogClassIVIsible = false; |
| 701 | 710 | }, |
| ... | ... | @@ -932,9 +941,9 @@ |
| 932 | 941 | width: 100%; |
| 933 | 942 | padding-top: 10px; |
| 934 | 943 | padding-left: 10px; |
| 935 | - /* height: 60px; */ | |
| 944 | + height: 126px; | |
| 936 | 945 | background: #efefef; |
| 937 | - /* line-height: 60px; */ | |
| 946 | + line-height: initial !important; | |
| 938 | 947 | border-radius: 5px; |
| 939 | 948 | box-shadow: 0 0 5px #cdcdcd; |
| 940 | 949 | justify-content: space-between; | ... | ... |
vue.config.js