|
|
|
|
@ -85,7 +85,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="附件" prop="files">
|
|
|
|
|
<el-link v-for="item in form.files" target="_blank" :href="item.url" type="primary">{{item.original_name}}</el-link>
|
|
|
|
|
<el-link v-for="item in form.files" target="_blank" :href="item.url" type="primary">
|
|
|
|
|
{{item.original_name}}
|
|
|
|
|
</el-link>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
@ -261,9 +263,10 @@
|
|
|
|
|
info(obj) {
|
|
|
|
|
var that = this;
|
|
|
|
|
get(obj.id).then(res => {
|
|
|
|
|
console.log("res", res);
|
|
|
|
|
let result = Object.assign(that.form, res);
|
|
|
|
|
// this.$set(that.form,res);
|
|
|
|
|
that.form = result;
|
|
|
|
|
console.log("form", result);
|
|
|
|
|
let _files = [];
|
|
|
|
|
for (var mod of result.files) {
|
|
|
|
|
let m = Object.assign({}, mod);
|
|
|
|
|
@ -273,17 +276,18 @@
|
|
|
|
|
that.form.safety_task_department_id = result.id;
|
|
|
|
|
that.form.safety_task_id = result.safety_task_id;
|
|
|
|
|
that.fileList = _files;
|
|
|
|
|
console.log(this.form);
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
//reject(error)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
edit(obj, isnew) {
|
|
|
|
|
this.form = this.$options.data().form;
|
|
|
|
|
this.form.content = "";
|
|
|
|
|
this.form.file_list = [];
|
|
|
|
|
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
|
|
|
|
|
if (isnew) {
|
|
|
|
|
var that = this;
|
|
|
|
|
that.form.content="";
|
|
|
|
|
that.info(obj);
|
|
|
|
|
this.isReportSave = true;
|
|
|
|
|
} else {
|
|
|
|
|
|