Commit ea20c9cf627a9be585573c42fe85ea20c2e2715f

Authored by yangzhi
2 parents 833b6879 cb3beb5c

Merge branch 'develop_interview' of 39.98.150.180:antissoft/antissoft.dati.admin…

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