见习之星考核过程(上传文件)

This commit is contained in:
paidaxing444 2020-09-01 00:18:33 +08:00
parent 77d127f37b
commit fe5b1262ab
2 changed files with 24 additions and 1 deletions

View File

@ -71,10 +71,19 @@ public class TsbzJxzxkhgcsjController extends BaseController {
@PreAuthorize("@ss.hasPermi('jxzxkhgl:jxzxkhgcsj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) {
AjaxResult ajax = AjaxResult.success();
TsbzJxzxkhgcsj tsbzJxzxkhgcsj = new TsbzJxzxkhgcsj();
tsbzJxzxkhgcsj.setId(id);
tsbzJxzxkhgcsj.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
return AjaxResult.success(tsbzJxzxkhgcsjService.selectTsbzJxzxkhgcsjById(tsbzJxzxkhgcsj));
//获取文件信息
TsbzJxzxkhgcwjsj tsbzJxzxkhgcwjsj = new TsbzJxzxkhgcwjsj();
tsbzJxzxkhgcwjsj.setGcid(id);
List<TsbzJxzxkhgcwjsj> list = tsbzJxzxkhgcwjsjService.selectTsbzJxzxkhgcwjsjList(tsbzJxzxkhgcwjsj);
ajax.put("file", list);
ajax.put(AjaxResult.DATA_TAG, tsbzJxzxkhgcsjService.selectTsbzJxzxkhgcsjById(tsbzJxzxkhgcsj));
return ajax;
}
/**

View File

@ -325,6 +325,20 @@ export default {
this.open = true;
this.title = "修改考核过程数据";
this.form.khnr = row.tsbzJxzxkhzbx.khnr;
console.log(response.file);
var array = [];
var path = "";
var name = "";
response.file.forEach(function (value, key, arr) {
//console.log(value); // 123
array.push({ name: value.filename, url: value.filepath });
path = path + value.filepath + ";";
name = name + value.filename + ";";
});
this.filecount = response.file.length;
this.form.filepath = path;
this.form.filename = name;
this.fileList = array;
});
} else {
this.reset();