Commit cb3beb5c1801f5226664c1625549d21f251043cd

Authored by wangming
1 parent d1837e7a

志哥在撸猫

Showing 1 changed file with 62 additions and 31 deletions
src/views/user/picuserimport.vue
@@ -36,15 +36,6 @@ @@ -36,15 +36,6 @@
36 </div> 36 </div>
37 </div> 37 </div>
38 <div class="main-box"> 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="  
42 - BASE_ROOT_DOMAIN + '/pdf/web/viewer.html?file=' + BASE_ROOT_DOMAIN +currentFilePath  
43 - " frameborder="0"></iframe>  
44 - <el-image v-else :src=" BASE_ROOT_DOMAIN +currentFilePath">  
45 -  
46 - </el-image>  
47 - </div>  
48 <el-table ref="mytable" :data="table_data" style="width: 100%;height:calc(100vh - 260px)" border 39 <el-table ref="mytable" :data="table_data" style="width: 100%;height:calc(100vh - 260px)" border
49 @selection-change="handleSelectionChange"> 40 @selection-change="handleSelectionChange">
50 <el-table-column v-if="radio" type="index" width="50"></el-table-column> 41 <el-table-column v-if="radio" type="index" width="50"></el-table-column>
@@ -90,6 +81,62 @@ @@ -90,6 +81,62 @@
90 </el-table> 81 </el-table>
91 82
92 </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>
93 <div class="page-box"> 140 <div class="page-box">
94 <el-pagination background layout="prev, pager, next" :total="queryResult.totalCount"> 141 <el-pagination background layout="prev, pager, next" :total="queryResult.totalCount">
95 </el-pagination> 142 </el-pagination>
@@ -166,6 +213,8 @@ import { formatTime } from &#39;@/utils/util&#39; @@ -166,6 +213,8 @@ import { formatTime } from &#39;@/utils/util&#39;
166 ], 213 ],
167 //表格数据 214 //表格数据
168 table_data: [], 215 table_data: [],
  216 + dialogVisible:false,
  217 + form:{},
169 }; 218 };
170 }, 219 },
171 methods: { 220 methods: {
@@ -219,26 +268,13 @@ import { formatTime } from &#39;@/utils/util&#39; @@ -219,26 +268,13 @@ import { formatTime } from &#39;@/utils/util&#39;
219 268
220 //编辑 269 //编辑
221 handleEdit(index, row) { 270 handleEdit(index, row) {
  271 + this.dialogVisible = true;
222 if (row.ViewPath) { 272 if (row.ViewPath) {
223 this.currentFilePath = row.ViewPath; 273 this.currentFilePath = row.ViewPath;
224 } else { 274 } else {
225 this.currentFilePath = ''; 275 this.currentFilePath = '';
226 } 276 }
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();  
240 -  
241 - // this.$set(this.table_data[index],'edit',true) 277 + this.form=row;
242 }, 278 },
243 //删除 279 //删除
244 handleDelete(index, row) { 280 handleDelete(index, row) {
@@ -266,18 +302,13 @@ import { formatTime } from &#39;@/utils/util&#39; @@ -266,18 +302,13 @@ import { formatTime } from &#39;@/utils/util&#39;
266 302
267 //保存 303 //保存
268 handleSave(index, row) { 304 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()); 305 + UserInfo_Update(this.form);
276 this.$forceUpdate(); 306 this.$forceUpdate();
277 this.$message({ 307 this.$message({
278 message: "保存成功!", 308 message: "保存成功!",
279 type: "success", 309 type: "success",
280 }); 310 });
  311 + this.dialogVisible = false;
281 }, 312 },
282 handleCancelSave(index, row) { 313 handleCancelSave(index, row) {
283 delete this.table_data[index].edit; 314 delete this.table_data[index].edit;